convex-effect-workflows 0.1.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 (190) hide show
  1. package/README.md +107 -0
  2. package/dist/client/ConvexCtx.d.ts +12 -0
  3. package/dist/client/ConvexCtx.d.ts.map +1 -0
  4. package/dist/client/ConvexCtx.js +6 -0
  5. package/dist/client/ConvexCtx.js.map +1 -0
  6. package/dist/client/ConvexLogger.d.ts +7 -0
  7. package/dist/client/ConvexLogger.d.ts.map +1 -0
  8. package/dist/client/ConvexLogger.js +39 -0
  9. package/dist/client/ConvexLogger.js.map +1 -0
  10. package/dist/client/ConvexTracer.d.ts +7 -0
  11. package/dist/client/ConvexTracer.d.ts.map +1 -0
  12. package/dist/client/ConvexTracer.js +60 -0
  13. package/dist/client/ConvexTracer.js.map +1 -0
  14. package/dist/client/ConvexWorkflowEngine.d.ts +308 -0
  15. package/dist/client/ConvexWorkflowEngine.d.ts.map +1 -0
  16. package/dist/client/ConvexWorkflowEngine.js +88 -0
  17. package/dist/client/ConvexWorkflowEngine.js.map +1 -0
  18. package/dist/client/activityWorker.d.ts +23 -0
  19. package/dist/client/activityWorker.d.ts.map +1 -0
  20. package/dist/client/activityWorker.js +41 -0
  21. package/dist/client/activityWorker.js.map +1 -0
  22. package/dist/client/boundaries.d.ts +27 -0
  23. package/dist/client/boundaries.d.ts.map +1 -0
  24. package/dist/client/boundaries.js +17 -0
  25. package/dist/client/boundaries.js.map +1 -0
  26. package/dist/client/encoded.d.ts +22 -0
  27. package/dist/client/encoded.d.ts.map +1 -0
  28. package/dist/client/encoded.js +276 -0
  29. package/dist/client/encoded.js.map +1 -0
  30. package/dist/client/index.d.ts +13 -0
  31. package/dist/client/index.d.ts.map +1 -0
  32. package/dist/client/index.js +11 -0
  33. package/dist/client/index.js.map +1 -0
  34. package/dist/client/registry.d.ts +17 -0
  35. package/dist/client/registry.d.ts.map +1 -0
  36. package/dist/client/registry.js +21 -0
  37. package/dist/client/registry.js.map +1 -0
  38. package/dist/client/runner.d.ts +27 -0
  39. package/dist/client/runner.d.ts.map +1 -0
  40. package/dist/client/runner.js +90 -0
  41. package/dist/client/runner.js.map +1 -0
  42. package/dist/client/runtime.d.ts +10 -0
  43. package/dist/client/runtime.d.ts.map +1 -0
  44. package/dist/client/runtime.js +15 -0
  45. package/dist/client/runtime.js.map +1 -0
  46. package/dist/component/_generated/api.d.ts +148 -0
  47. package/dist/component/_generated/api.d.ts.map +1 -0
  48. package/dist/component/_generated/api.js +31 -0
  49. package/dist/component/_generated/api.js.map +1 -0
  50. package/dist/component/_generated/component.d.ts +921 -0
  51. package/dist/component/_generated/component.d.ts.map +1 -0
  52. package/dist/component/_generated/component.js +11 -0
  53. package/dist/component/_generated/component.js.map +1 -0
  54. package/dist/component/_generated/dataModel.d.ts +46 -0
  55. package/dist/component/_generated/dataModel.d.ts.map +1 -0
  56. package/dist/component/_generated/dataModel.js +11 -0
  57. package/dist/component/_generated/dataModel.js.map +1 -0
  58. package/dist/component/_generated/server.d.ts +121 -0
  59. package/dist/component/_generated/server.d.ts.map +1 -0
  60. package/dist/component/_generated/server.js +78 -0
  61. package/dist/component/_generated/server.js.map +1 -0
  62. package/dist/component/activityCompletions.d.ts +27 -0
  63. package/dist/component/activityCompletions.d.ts.map +1 -0
  64. package/dist/component/activityCompletions.js +70 -0
  65. package/dist/component/activityCompletions.js.map +1 -0
  66. package/dist/component/boundaries.d.ts +20 -0
  67. package/dist/component/boundaries.d.ts.map +1 -0
  68. package/dist/component/boundaries.js +17 -0
  69. package/dist/component/boundaries.js.map +1 -0
  70. package/dist/component/cleanup.d.ts +11 -0
  71. package/dist/component/cleanup.d.ts.map +1 -0
  72. package/dist/component/cleanup.js +163 -0
  73. package/dist/component/cleanup.js.map +1 -0
  74. package/dist/component/clocks.d.ts +12 -0
  75. package/dist/component/clocks.d.ts.map +1 -0
  76. package/dist/component/clocks.js +26 -0
  77. package/dist/component/clocks.js.map +1 -0
  78. package/dist/component/config.d.ts +25 -0
  79. package/dist/component/config.d.ts.map +1 -0
  80. package/dist/component/config.js +110 -0
  81. package/dist/component/config.js.map +1 -0
  82. package/dist/component/convex.config.d.ts +3 -0
  83. package/dist/component/convex.config.d.ts.map +1 -0
  84. package/dist/component/convex.config.js +6 -0
  85. package/dist/component/convex.config.js.map +1 -0
  86. package/dist/component/dashboard.d.ts +268 -0
  87. package/dist/component/dashboard.d.ts.map +1 -0
  88. package/dist/component/dashboard.js +622 -0
  89. package/dist/component/dashboard.js.map +1 -0
  90. package/dist/component/deferreds.d.ts +31 -0
  91. package/dist/component/deferreds.d.ts.map +1 -0
  92. package/dist/component/deferreds.js +138 -0
  93. package/dist/component/deferreds.js.map +1 -0
  94. package/dist/component/executions.d.ts +77 -0
  95. package/dist/component/executions.d.ts.map +1 -0
  96. package/dist/component/executions.js +186 -0
  97. package/dist/component/executions.js.map +1 -0
  98. package/dist/component/journalSteps.d.ts +261 -0
  99. package/dist/component/journalSteps.d.ts.map +1 -0
  100. package/dist/component/journalSteps.js +203 -0
  101. package/dist/component/journalSteps.js.map +1 -0
  102. package/dist/component/logs.d.ts +68 -0
  103. package/dist/component/logs.d.ts.map +1 -0
  104. package/dist/component/logs.js +123 -0
  105. package/dist/component/logs.js.map +1 -0
  106. package/dist/component/onComplete.d.ts +31 -0
  107. package/dist/component/onComplete.d.ts.map +1 -0
  108. package/dist/component/onComplete.js +146 -0
  109. package/dist/component/onComplete.js.map +1 -0
  110. package/dist/component/payloads.d.ts +26 -0
  111. package/dist/component/payloads.d.ts.map +1 -0
  112. package/dist/component/payloads.js +57 -0
  113. package/dist/component/payloads.js.map +1 -0
  114. package/dist/component/queries.d.ts +2 -0
  115. package/dist/component/queries.d.ts.map +1 -0
  116. package/dist/component/queries.js +2 -0
  117. package/dist/component/queries.js.map +1 -0
  118. package/dist/component/runner.d.ts +31 -0
  119. package/dist/component/runner.d.ts.map +1 -0
  120. package/dist/component/runner.js +87 -0
  121. package/dist/component/runner.js.map +1 -0
  122. package/dist/component/schema.d.ts +282 -0
  123. package/dist/component/schema.d.ts.map +1 -0
  124. package/dist/component/schema.js +119 -0
  125. package/dist/component/schema.js.map +1 -0
  126. package/dist/component/spans.d.ts +105 -0
  127. package/dist/component/spans.d.ts.map +1 -0
  128. package/dist/component/spans.js +190 -0
  129. package/dist/component/spans.js.map +1 -0
  130. package/dist/component/utils.d.ts +15 -0
  131. package/dist/component/utils.d.ts.map +1 -0
  132. package/dist/component/utils.js +53 -0
  133. package/dist/component/utils.js.map +1 -0
  134. package/dist/shared/constants.d.ts +12 -0
  135. package/dist/shared/constants.d.ts.map +1 -0
  136. package/dist/shared/constants.js +12 -0
  137. package/dist/shared/constants.js.map +1 -0
  138. package/dist/shared/validators.d.ts +69 -0
  139. package/dist/shared/validators.d.ts.map +1 -0
  140. package/dist/shared/validators.js +30 -0
  141. package/dist/shared/validators.js.map +1 -0
  142. package/package.json +74 -0
  143. package/src/client/ConvexCtx.ts +21 -0
  144. package/src/client/ConvexLogger.ts +52 -0
  145. package/src/client/ConvexTracer.ts +75 -0
  146. package/src/client/ConvexWorkflowEngine.test.ts +124 -0
  147. package/src/client/ConvexWorkflowEngine.ts +209 -0
  148. package/src/client/activityWorker.ts +62 -0
  149. package/src/client/boundaries.test.ts +83 -0
  150. package/src/client/boundaries.ts +79 -0
  151. package/src/client/encoded.lifecycle.test.ts +336 -0
  152. package/src/client/encoded.test.ts +153 -0
  153. package/src/client/encoded.ts +484 -0
  154. package/src/client/index.ts +47 -0
  155. package/src/client/registry.ts +35 -0
  156. package/src/client/runner.ts +165 -0
  157. package/src/client/runtime.ts +30 -0
  158. package/src/component/_generated/api.ts +179 -0
  159. package/src/component/_generated/component.ts +1216 -0
  160. package/src/component/_generated/dataModel.ts +60 -0
  161. package/src/component/_generated/server.ts +156 -0
  162. package/src/component/activityCompletions.ts +73 -0
  163. package/src/component/boundaries.ts +55 -0
  164. package/src/component/cleanup.test.ts +219 -0
  165. package/src/component/cleanup.ts +218 -0
  166. package/src/component/clocks.ts +26 -0
  167. package/src/component/config.test.ts +159 -0
  168. package/src/component/config.ts +145 -0
  169. package/src/component/convex.config.ts +7 -0
  170. package/src/component/core.test.ts +829 -0
  171. package/src/component/dashboard.scaling.test.ts +268 -0
  172. package/src/component/dashboard.ts +743 -0
  173. package/src/component/deferreds.ts +162 -0
  174. package/src/component/executions.ts +225 -0
  175. package/src/component/journalSteps.ts +252 -0
  176. package/src/component/logs.ts +152 -0
  177. package/src/component/onComplete.ts +170 -0
  178. package/src/component/payloads.ts +83 -0
  179. package/src/component/queries.ts +8 -0
  180. package/src/component/runner.ts +122 -0
  181. package/src/component/schema.ts +155 -0
  182. package/src/component/setup.test.ts +15 -0
  183. package/src/component/spans.ts +241 -0
  184. package/src/component/utils.test.ts +32 -0
  185. package/src/component/utils.ts +73 -0
  186. package/src/shared/constants.test.ts +14 -0
  187. package/src/shared/constants.ts +15 -0
  188. package/src/shared/validators.ts +98 -0
  189. package/src/test.d.ts +8 -0
  190. package/src/test.ts +17 -0
@@ -0,0 +1,282 @@
1
+ declare const _default: import("convex/server").SchemaDefinition<{
2
+ executions: import("convex/server").TableDefinition<import("convex/values").VObject<{
3
+ error?: string | undefined;
4
+ tenantId?: string | undefined;
5
+ parentExecutionId?: string | undefined;
6
+ runnerHandle?: string | undefined;
7
+ payloadRef?: import("convex/values").GenericId<"payloads"> | undefined;
8
+ payloadPreview?: any;
9
+ resultKind?: "success" | "failure" | undefined;
10
+ resultRef?: import("convex/values").GenericId<"payloads"> | undefined;
11
+ resultPreview?: any;
12
+ completedAt?: number | undefined;
13
+ lastResumedAt?: number | undefined;
14
+ lastSuspendedAt?: number | undefined;
15
+ executionId: string;
16
+ workflowName: string;
17
+ status: "pending" | "running" | "suspended" | "completed" | "failed" | "interrupted";
18
+ generation: number;
19
+ traceId: string;
20
+ startedAt: number;
21
+ payloadSize: number;
22
+ }, {
23
+ workflowName: import("convex/values").VString<string, "required">;
24
+ executionId: import("convex/values").VString<string, "required">;
25
+ status: import("convex/values").VUnion<"pending" | "running" | "suspended" | "completed" | "failed" | "interrupted", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"running", "required">, import("convex/values").VLiteral<"suspended", "required">, import("convex/values").VLiteral<"completed", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"interrupted", "required">], "required", never>;
26
+ generation: import("convex/values").VFloat64<number, "required">;
27
+ tenantId: import("convex/values").VString<string | undefined, "optional">;
28
+ parentExecutionId: import("convex/values").VString<string | undefined, "optional">;
29
+ payloadRef: import("convex/values").VId<import("convex/values").GenericId<"payloads"> | undefined, "optional">;
30
+ payloadPreview: import("convex/values").VAny<any, "optional", string>;
31
+ payloadSize: import("convex/values").VFloat64<number, "required">;
32
+ resultKind: import("convex/values").VUnion<"success" | "failure" | undefined, [import("convex/values").VLiteral<"success", "required">, import("convex/values").VLiteral<"failure", "required">], "optional", never>;
33
+ resultRef: import("convex/values").VId<import("convex/values").GenericId<"payloads"> | undefined, "optional">;
34
+ resultPreview: import("convex/values").VAny<any, "optional", string>;
35
+ error: import("convex/values").VString<string | undefined, "optional">;
36
+ traceId: import("convex/values").VString<string, "required">;
37
+ runnerHandle: import("convex/values").VString<string | undefined, "optional">;
38
+ startedAt: import("convex/values").VFloat64<number, "required">;
39
+ completedAt: import("convex/values").VFloat64<number | undefined, "optional">;
40
+ lastResumedAt: import("convex/values").VFloat64<number | undefined, "optional">;
41
+ lastSuspendedAt: import("convex/values").VFloat64<number | undefined, "optional">;
42
+ }, "required", "executionId" | "error" | "workflowName" | "status" | "tenantId" | "generation" | "parentExecutionId" | "runnerHandle" | "traceId" | "startedAt" | "payloadRef" | "payloadPreview" | "payloadSize" | "resultKind" | "resultRef" | "resultPreview" | "completedAt" | "lastResumedAt" | "lastSuspendedAt" | `payloadPreview.${string}` | `resultPreview.${string}`>, {
43
+ by_execution_id: ["executionId", "_creationTime"];
44
+ by_workflow_started: ["workflowName", "startedAt", "_creationTime"];
45
+ by_status_started: ["status", "startedAt", "_creationTime"];
46
+ by_started: ["startedAt", "_creationTime"];
47
+ by_tenant_started: ["tenantId", "startedAt", "_creationTime"];
48
+ }, {}, {}>;
49
+ journalSteps: import("convex/server").TableDefinition<import("convex/values").VObject<{
50
+ workId?: string | undefined;
51
+ spanId?: string | undefined;
52
+ attempt?: number | undefined;
53
+ runResult?: {
54
+ valueRef?: import("convex/values").GenericId<"payloads"> | undefined;
55
+ valuePreview?: any;
56
+ kind: "success";
57
+ } | {
58
+ valueRef?: import("convex/values").GenericId<"payloads"> | undefined;
59
+ valuePreview?: any;
60
+ error: string;
61
+ kind: "failed";
62
+ } | {
63
+ kind: "canceled";
64
+ } | undefined;
65
+ resumeToken?: string | undefined;
66
+ completedAt?: number | undefined;
67
+ inputRef?: import("convex/values").GenericId<"payloads"> | undefined;
68
+ inputPreview?: any;
69
+ executionId: string;
70
+ stepNumber: number;
71
+ kind: "activity" | "system" | "deferred" | "clock" | "nestedWorkflow";
72
+ state: "suspended" | "completed" | "failed" | "started" | "canceled";
73
+ startedAt: number;
74
+ name: string;
75
+ signature: {
76
+ attempt?: number | undefined;
77
+ scheduleMeta?: any;
78
+ schemaVersion?: number | undefined;
79
+ kind: "activity" | "system" | "deferred" | "clock" | "nestedWorkflow";
80
+ opName: string;
81
+ };
82
+ inputSize: number;
83
+ }, {
84
+ executionId: import("convex/values").VString<string, "required">;
85
+ stepNumber: import("convex/values").VFloat64<number, "required">;
86
+ kind: import("convex/values").VUnion<"activity" | "system" | "deferred" | "clock" | "nestedWorkflow", [import("convex/values").VLiteral<"activity", "required">, import("convex/values").VLiteral<"deferred", "required">, import("convex/values").VLiteral<"clock", "required">, import("convex/values").VLiteral<"nestedWorkflow", "required">, import("convex/values").VLiteral<"system", "required">], "required", never>;
87
+ name: import("convex/values").VString<string, "required">;
88
+ signature: import("convex/values").VObject<{
89
+ attempt?: number | undefined;
90
+ scheduleMeta?: any;
91
+ schemaVersion?: number | undefined;
92
+ kind: "activity" | "system" | "deferred" | "clock" | "nestedWorkflow";
93
+ opName: string;
94
+ }, {
95
+ kind: import("convex/values").VUnion<"activity" | "system" | "deferred" | "clock" | "nestedWorkflow", [import("convex/values").VLiteral<"activity", "required">, import("convex/values").VLiteral<"deferred", "required">, import("convex/values").VLiteral<"clock", "required">, import("convex/values").VLiteral<"nestedWorkflow", "required">, import("convex/values").VLiteral<"system", "required">], "required", never>;
96
+ opName: import("convex/values").VString<string, "required">;
97
+ attempt: import("convex/values").VFloat64<number | undefined, "optional">;
98
+ scheduleMeta: import("convex/values").VAny<any, "optional", string>;
99
+ schemaVersion: import("convex/values").VFloat64<number | undefined, "optional">;
100
+ }, "required", "kind" | "attempt" | "opName" | "scheduleMeta" | "schemaVersion" | `scheduleMeta.${string}`>;
101
+ state: import("convex/values").VUnion<"suspended" | "completed" | "failed" | "started" | "canceled", [import("convex/values").VLiteral<"started", "required">, import("convex/values").VLiteral<"suspended", "required">, import("convex/values").VLiteral<"completed", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"canceled", "required">], "required", never>;
102
+ attempt: import("convex/values").VFloat64<number | undefined, "optional">;
103
+ workId: import("convex/values").VString<string | undefined, "optional">;
104
+ spanId: import("convex/values").VString<string | undefined, "optional">;
105
+ inputRef: import("convex/values").VId<import("convex/values").GenericId<"payloads"> | undefined, "optional">;
106
+ inputPreview: import("convex/values").VAny<any, "optional", string>;
107
+ inputSize: import("convex/values").VFloat64<number, "required">;
108
+ runResult: import("convex/values").VUnion<{
109
+ valueRef?: import("convex/values").GenericId<"payloads"> | undefined;
110
+ valuePreview?: any;
111
+ kind: "success";
112
+ } | {
113
+ valueRef?: import("convex/values").GenericId<"payloads"> | undefined;
114
+ valuePreview?: any;
115
+ error: string;
116
+ kind: "failed";
117
+ } | {
118
+ kind: "canceled";
119
+ } | undefined, [import("convex/values").VObject<{
120
+ valueRef?: import("convex/values").GenericId<"payloads"> | undefined;
121
+ valuePreview?: any;
122
+ kind: "success";
123
+ }, {
124
+ kind: import("convex/values").VLiteral<"success", "required">;
125
+ valueRef: import("convex/values").VId<import("convex/values").GenericId<"payloads"> | undefined, "optional">;
126
+ valuePreview: import("convex/values").VAny<any, "optional", string>;
127
+ }, "required", "kind" | "valueRef" | "valuePreview" | `valuePreview.${string}`>, import("convex/values").VObject<{
128
+ valueRef?: import("convex/values").GenericId<"payloads"> | undefined;
129
+ valuePreview?: any;
130
+ error: string;
131
+ kind: "failed";
132
+ }, {
133
+ kind: import("convex/values").VLiteral<"failed", "required">;
134
+ error: import("convex/values").VString<string, "required">;
135
+ valueRef: import("convex/values").VId<import("convex/values").GenericId<"payloads"> | undefined, "optional">;
136
+ valuePreview: import("convex/values").VAny<any, "optional", string>;
137
+ }, "required", "error" | "kind" | "valueRef" | "valuePreview" | `valuePreview.${string}`>, import("convex/values").VObject<{
138
+ kind: "canceled";
139
+ }, {
140
+ kind: import("convex/values").VLiteral<"canceled", "required">;
141
+ }, "required", "kind">], "optional", "error" | "kind" | "valueRef" | "valuePreview" | `valuePreview.${string}`>;
142
+ startedAt: import("convex/values").VFloat64<number, "required">;
143
+ completedAt: import("convex/values").VFloat64<number | undefined, "optional">;
144
+ resumeToken: import("convex/values").VString<string | undefined, "optional">;
145
+ }, "required", "workId" | "executionId" | "stepNumber" | "spanId" | "kind" | "state" | "startedAt" | "attempt" | "name" | "signature" | "runResult" | "resumeToken" | "completedAt" | "inputRef" | "inputPreview" | "inputSize" | "signature.kind" | "signature.attempt" | "signature.opName" | "signature.scheduleMeta" | "signature.schemaVersion" | `signature.scheduleMeta.${string}` | "runResult.error" | "runResult.kind" | "runResult.valueRef" | "runResult.valuePreview" | `runResult.valuePreview.${string}` | `inputPreview.${string}`>, {
146
+ by_execution_step: ["executionId", "stepNumber", "_creationTime"];
147
+ by_execution_state: ["executionId", "state", "_creationTime"];
148
+ by_work_id: ["workId", "_creationTime"];
149
+ }, {}, {}>;
150
+ activityCompletions: import("convex/server").TableDefinition<import("convex/values").VObject<{
151
+ workId: string;
152
+ executionId: string;
153
+ stepNumber: number;
154
+ processedAt: number;
155
+ }, {
156
+ workId: import("convex/values").VString<string, "required">;
157
+ executionId: import("convex/values").VString<string, "required">;
158
+ stepNumber: import("convex/values").VFloat64<number, "required">;
159
+ processedAt: import("convex/values").VFloat64<number, "required">;
160
+ }, "required", "workId" | "executionId" | "stepNumber" | "processedAt">, {
161
+ by_work_id: ["workId", "_creationTime"];
162
+ }, {}, {}>;
163
+ spans: import("convex/server").TableDefinition<import("convex/values").VObject<{
164
+ stepNumber?: number | undefined;
165
+ error?: string | undefined;
166
+ attempt?: number | undefined;
167
+ attributes?: any;
168
+ parentSpanId?: string | undefined;
169
+ endTime?: number | undefined;
170
+ inputRef?: import("convex/values").GenericId<"payloads"> | undefined;
171
+ inputPreview?: any;
172
+ inputSize?: number | undefined;
173
+ outputRef?: import("convex/values").GenericId<"payloads"> | undefined;
174
+ outputPreview?: any;
175
+ outputSize?: number | undefined;
176
+ executionId: string;
177
+ spanId: string;
178
+ status: "started" | "ended";
179
+ kind: "workflow" | "activity" | "system" | "deferred" | "clock";
180
+ traceId: string;
181
+ name: string;
182
+ startTime: number;
183
+ }, {
184
+ executionId: import("convex/values").VString<string, "required">;
185
+ traceId: import("convex/values").VString<string, "required">;
186
+ spanId: import("convex/values").VString<string, "required">;
187
+ parentSpanId: import("convex/values").VString<string | undefined, "optional">;
188
+ stepNumber: import("convex/values").VFloat64<number | undefined, "optional">;
189
+ name: import("convex/values").VString<string, "required">;
190
+ kind: import("convex/values").VUnion<"workflow" | "activity" | "system" | "deferred" | "clock", [import("convex/values").VLiteral<"workflow", "required">, import("convex/values").VLiteral<"activity", "required">, import("convex/values").VLiteral<"deferred", "required">, import("convex/values").VLiteral<"clock", "required">, import("convex/values").VLiteral<"system", "required">], "required", never>;
191
+ status: import("convex/values").VUnion<"started" | "ended", [import("convex/values").VLiteral<"started", "required">, import("convex/values").VLiteral<"ended", "required">], "required", never>;
192
+ startTime: import("convex/values").VFloat64<number, "required">;
193
+ endTime: import("convex/values").VFloat64<number | undefined, "optional">;
194
+ attempt: import("convex/values").VFloat64<number | undefined, "optional">;
195
+ attributes: import("convex/values").VAny<any, "optional", string>;
196
+ inputRef: import("convex/values").VId<import("convex/values").GenericId<"payloads"> | undefined, "optional">;
197
+ inputPreview: import("convex/values").VAny<any, "optional", string>;
198
+ inputSize: import("convex/values").VFloat64<number | undefined, "optional">;
199
+ outputRef: import("convex/values").VId<import("convex/values").GenericId<"payloads"> | undefined, "optional">;
200
+ outputPreview: import("convex/values").VAny<any, "optional", string>;
201
+ outputSize: import("convex/values").VFloat64<number | undefined, "optional">;
202
+ error: import("convex/values").VString<string | undefined, "optional">;
203
+ }, "required", "executionId" | "stepNumber" | "error" | "spanId" | "status" | "kind" | "traceId" | "attempt" | "name" | "attributes" | "parentSpanId" | "endTime" | "startTime" | "inputRef" | "inputPreview" | "inputSize" | `inputPreview.${string}` | "outputRef" | "outputPreview" | "outputSize" | `attributes.${string}` | `outputPreview.${string}`>, {
204
+ by_execution_start: ["executionId", "startTime", "_creationTime"];
205
+ by_trace_start: ["traceId", "startTime", "_creationTime"];
206
+ by_execution_span: ["executionId", "spanId", "_creationTime"];
207
+ }, {}, {}>;
208
+ logs: import("convex/server").TableDefinition<import("convex/values").VObject<{
209
+ stepNumber?: number | undefined;
210
+ spanId?: string | undefined;
211
+ traceId?: string | undefined;
212
+ data?: any;
213
+ executionId: string;
214
+ level: "debug" | "info" | "warn" | "error";
215
+ source: "workflow" | "activity" | "engine" | "system";
216
+ message: string;
217
+ timestamp: number;
218
+ }, {
219
+ executionId: import("convex/values").VString<string, "required">;
220
+ traceId: import("convex/values").VString<string | undefined, "optional">;
221
+ spanId: import("convex/values").VString<string | undefined, "optional">;
222
+ stepNumber: import("convex/values").VFloat64<number | undefined, "optional">;
223
+ level: import("convex/values").VUnion<"debug" | "info" | "warn" | "error", [import("convex/values").VLiteral<"debug", "required">, import("convex/values").VLiteral<"info", "required">, import("convex/values").VLiteral<"warn", "required">, import("convex/values").VLiteral<"error", "required">], "required", never>;
224
+ message: import("convex/values").VString<string, "required">;
225
+ data: import("convex/values").VAny<any, "optional", string>;
226
+ source: import("convex/values").VUnion<"workflow" | "activity" | "engine" | "system", [import("convex/values").VLiteral<"workflow", "required">, import("convex/values").VLiteral<"activity", "required">, import("convex/values").VLiteral<"engine", "required">, import("convex/values").VLiteral<"system", "required">], "required", never>;
227
+ timestamp: import("convex/values").VFloat64<number, "required">;
228
+ }, "required", "executionId" | "stepNumber" | "level" | "source" | "spanId" | "traceId" | "data" | "message" | "timestamp" | `data.${string}`>, {
229
+ by_execution_time: ["executionId", "timestamp", "_creationTime"];
230
+ by_span_time: ["spanId", "timestamp", "_creationTime"];
231
+ by_level_time: ["level", "timestamp", "_creationTime"];
232
+ }, {}, {}>;
233
+ deferreds: import("convex/server").TableDefinition<import("convex/values").VObject<{
234
+ completedAt?: number | undefined;
235
+ exitRef?: import("convex/values").GenericId<"payloads"> | undefined;
236
+ exitPreview?: any;
237
+ executionId: string;
238
+ deferredName: string;
239
+ completed: boolean;
240
+ }, {
241
+ executionId: import("convex/values").VString<string, "required">;
242
+ deferredName: import("convex/values").VString<string, "required">;
243
+ completed: import("convex/values").VBoolean<boolean, "required">;
244
+ exitRef: import("convex/values").VId<import("convex/values").GenericId<"payloads"> | undefined, "optional">;
245
+ exitPreview: import("convex/values").VAny<any, "optional", string>;
246
+ completedAt: import("convex/values").VFloat64<number | undefined, "optional">;
247
+ }, "required", "executionId" | "deferredName" | "completed" | "completedAt" | "exitRef" | "exitPreview" | `exitPreview.${string}`>, {
248
+ by_execution_name: ["executionId", "deferredName", "_creationTime"];
249
+ }, {}, {}>;
250
+ payloads: import("convex/server").TableDefinition<import("convex/values").VObject<{
251
+ kind: "executionPayload" | "stepInput" | "stepOutput" | "deferredExit" | "spanInput" | "spanOutput" | "logData";
252
+ data: any;
253
+ size: number;
254
+ createdAt: number;
255
+ }, {
256
+ kind: import("convex/values").VUnion<"executionPayload" | "stepInput" | "stepOutput" | "deferredExit" | "spanInput" | "spanOutput" | "logData", [import("convex/values").VLiteral<"executionPayload", "required">, import("convex/values").VLiteral<"stepInput", "required">, import("convex/values").VLiteral<"stepOutput", "required">, import("convex/values").VLiteral<"deferredExit", "required">, import("convex/values").VLiteral<"spanInput", "required">, import("convex/values").VLiteral<"spanOutput", "required">, import("convex/values").VLiteral<"logData", "required">], "required", never>;
257
+ data: import("convex/values").VAny<any, "required", string>;
258
+ size: import("convex/values").VFloat64<number, "required">;
259
+ createdAt: import("convex/values").VFloat64<number, "required">;
260
+ }, "required", "kind" | "data" | `data.${string}` | "size" | "createdAt">, {
261
+ by_created: ["createdAt", "_creationTime"];
262
+ }, {}, {}>;
263
+ config: import("convex/server").TableDefinition<import("convex/values").VObject<{
264
+ retentionDays?: number | undefined;
265
+ defaultLogLevel?: "debug" | "info" | "warn" | "error" | undefined;
266
+ maxInlineBytes?: number | undefined;
267
+ maxLogDataBytes?: number | undefined;
268
+ maxSpanAttrBytes?: number | undefined;
269
+ key: string;
270
+ }, {
271
+ key: import("convex/values").VString<string, "required">;
272
+ maxInlineBytes: import("convex/values").VFloat64<number | undefined, "optional">;
273
+ maxLogDataBytes: import("convex/values").VFloat64<number | undefined, "optional">;
274
+ maxSpanAttrBytes: import("convex/values").VFloat64<number | undefined, "optional">;
275
+ retentionDays: import("convex/values").VFloat64<number | undefined, "optional">;
276
+ defaultLogLevel: import("convex/values").VUnion<"debug" | "info" | "warn" | "error" | undefined, [import("convex/values").VLiteral<"debug", "required">, import("convex/values").VLiteral<"info", "required">, import("convex/values").VLiteral<"warn", "required">, import("convex/values").VLiteral<"error", "required">], "optional", never>;
277
+ }, "required", "retentionDays" | "defaultLogLevel" | "maxInlineBytes" | "maxLogDataBytes" | "maxSpanAttrBytes" | "key">, {
278
+ by_key: ["key", "_creationTime"];
279
+ }, {}, {}>;
280
+ }, true>;
281
+ export default _default;
282
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/component/schema.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,wBA2IG"}
@@ -0,0 +1,119 @@
1
+ import { defineSchema, defineTable } from "convex/server";
2
+ import { v } from "convex/values";
3
+ import { vDeterminismSignature, vExecutionStatus, vLogLevel, vLogSource, vPayloadKind, vResultEnvelope, vSpanKind, vSpanStatus, vStepKind, vStepState, } from "../shared/validators.js";
4
+ export default defineSchema({
5
+ executions: defineTable({
6
+ workflowName: v.string(),
7
+ executionId: v.string(),
8
+ status: vExecutionStatus,
9
+ generation: v.number(),
10
+ tenantId: v.optional(v.string()),
11
+ parentExecutionId: v.optional(v.string()),
12
+ payloadRef: v.optional(v.id("payloads")),
13
+ payloadPreview: v.optional(v.any()),
14
+ payloadSize: v.number(),
15
+ resultKind: v.optional(v.union(v.literal("success"), v.literal("failure"))),
16
+ resultRef: v.optional(v.id("payloads")),
17
+ resultPreview: v.optional(v.any()),
18
+ error: v.optional(v.string()),
19
+ traceId: v.string(),
20
+ runnerHandle: v.optional(v.string()),
21
+ startedAt: v.number(),
22
+ completedAt: v.optional(v.number()),
23
+ lastResumedAt: v.optional(v.number()),
24
+ lastSuspendedAt: v.optional(v.number()),
25
+ })
26
+ .index("by_execution_id", ["executionId"])
27
+ .index("by_workflow_started", ["workflowName", "startedAt"])
28
+ .index("by_status_started", ["status", "startedAt"])
29
+ .index("by_started", ["startedAt"])
30
+ .index("by_tenant_started", ["tenantId", "startedAt"]),
31
+ journalSteps: defineTable({
32
+ executionId: v.string(),
33
+ stepNumber: v.number(),
34
+ kind: vStepKind,
35
+ name: v.string(),
36
+ signature: vDeterminismSignature,
37
+ state: vStepState,
38
+ attempt: v.optional(v.number()),
39
+ workId: v.optional(v.string()),
40
+ spanId: v.optional(v.string()),
41
+ inputRef: v.optional(v.id("payloads")),
42
+ inputPreview: v.optional(v.any()),
43
+ inputSize: v.number(),
44
+ runResult: v.optional(vResultEnvelope),
45
+ startedAt: v.number(),
46
+ completedAt: v.optional(v.number()),
47
+ resumeToken: v.optional(v.string()),
48
+ })
49
+ .index("by_execution_step", ["executionId", "stepNumber"])
50
+ .index("by_execution_state", ["executionId", "state"])
51
+ .index("by_work_id", ["workId"]),
52
+ activityCompletions: defineTable({
53
+ workId: v.string(),
54
+ executionId: v.string(),
55
+ stepNumber: v.number(),
56
+ processedAt: v.number(),
57
+ }).index("by_work_id", ["workId"]),
58
+ spans: defineTable({
59
+ executionId: v.string(),
60
+ traceId: v.string(),
61
+ spanId: v.string(),
62
+ parentSpanId: v.optional(v.string()),
63
+ stepNumber: v.optional(v.number()),
64
+ name: v.string(),
65
+ kind: vSpanKind,
66
+ status: vSpanStatus,
67
+ startTime: v.number(),
68
+ endTime: v.optional(v.number()),
69
+ attempt: v.optional(v.number()),
70
+ attributes: v.optional(v.any()),
71
+ inputRef: v.optional(v.id("payloads")),
72
+ inputPreview: v.optional(v.any()),
73
+ inputSize: v.optional(v.number()),
74
+ outputRef: v.optional(v.id("payloads")),
75
+ outputPreview: v.optional(v.any()),
76
+ outputSize: v.optional(v.number()),
77
+ error: v.optional(v.string()),
78
+ })
79
+ .index("by_execution_start", ["executionId", "startTime"])
80
+ .index("by_trace_start", ["traceId", "startTime"])
81
+ .index("by_execution_span", ["executionId", "spanId"]),
82
+ logs: defineTable({
83
+ executionId: v.string(),
84
+ traceId: v.optional(v.string()),
85
+ spanId: v.optional(v.string()),
86
+ stepNumber: v.optional(v.number()),
87
+ level: vLogLevel,
88
+ message: v.string(),
89
+ data: v.optional(v.any()),
90
+ source: vLogSource,
91
+ timestamp: v.number(),
92
+ })
93
+ .index("by_execution_time", ["executionId", "timestamp"])
94
+ .index("by_span_time", ["spanId", "timestamp"])
95
+ .index("by_level_time", ["level", "timestamp"]),
96
+ deferreds: defineTable({
97
+ executionId: v.string(),
98
+ deferredName: v.string(),
99
+ completed: v.boolean(),
100
+ exitRef: v.optional(v.id("payloads")),
101
+ exitPreview: v.optional(v.any()),
102
+ completedAt: v.optional(v.number()),
103
+ }).index("by_execution_name", ["executionId", "deferredName"]),
104
+ payloads: defineTable({
105
+ kind: vPayloadKind,
106
+ data: v.any(),
107
+ size: v.number(),
108
+ createdAt: v.number(),
109
+ }).index("by_created", ["createdAt"]),
110
+ config: defineTable({
111
+ key: v.string(),
112
+ maxInlineBytes: v.optional(v.number()),
113
+ maxLogDataBytes: v.optional(v.number()),
114
+ maxSpanAttrBytes: v.optional(v.number()),
115
+ retentionDays: v.optional(v.number()),
116
+ defaultLogLevel: v.optional(vLogLevel),
117
+ }).index("by_key", ["key"]),
118
+ });
119
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/component/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,SAAS,EACT,UAAU,EACV,YAAY,EACZ,eAAe,EACf,SAAS,EACT,WAAW,EACX,SAAS,EACT,UAAU,GACX,MAAM,yBAAyB,CAAC;AAEjC,eAAe,YAAY,CAAC;IAC1B,UAAU,EAAE,WAAW,CAAC;QACtB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;QACxB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;QACvB,MAAM,EAAE,gBAAgB;QACxB,UAAU,EAAE,CAAC,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,EAAE,CAAC,KAAK,CAAC,CAAC;CAC5B,CAAC,CAAC"}
@@ -0,0 +1,105 @@
1
+ export declare const createSpan: import("convex/server").RegisteredMutation<"public", {
2
+ stepNumber?: number | undefined;
3
+ spanId?: string | undefined;
4
+ attempt?: number | undefined;
5
+ input?: any;
6
+ attributes?: any;
7
+ parentSpanId?: string | undefined;
8
+ executionId: string;
9
+ kind: "workflow" | "activity" | "system" | "deferred" | "clock";
10
+ traceId: string;
11
+ name: string;
12
+ }, Promise<{
13
+ spanId: string;
14
+ created: boolean;
15
+ }>>;
16
+ export declare const endSpan: import("convex/server").RegisteredMutation<"public", {
17
+ error?: string | undefined;
18
+ attributes?: any;
19
+ output?: any;
20
+ executionId: string;
21
+ spanId: string;
22
+ }, Promise<{
23
+ changed: boolean;
24
+ }>>;
25
+ export declare const getExecutionSpan: import("convex/server").RegisteredQuery<"public", {
26
+ executionId: string;
27
+ spanId: string;
28
+ }, Promise<{
29
+ _id: import("convex/values").GenericId<"spans">;
30
+ _creationTime: number;
31
+ stepNumber?: number | undefined;
32
+ error?: string | undefined;
33
+ attempt?: number | undefined;
34
+ attributes?: any;
35
+ parentSpanId?: string | undefined;
36
+ endTime?: number | undefined;
37
+ inputRef?: import("convex/values").GenericId<"payloads"> | undefined;
38
+ inputPreview?: any;
39
+ inputSize?: number | undefined;
40
+ outputRef?: import("convex/values").GenericId<"payloads"> | undefined;
41
+ outputPreview?: any;
42
+ outputSize?: number | undefined;
43
+ executionId: string;
44
+ spanId: string;
45
+ status: "started" | "ended";
46
+ kind: "workflow" | "activity" | "system" | "deferred" | "clock";
47
+ traceId: string;
48
+ name: string;
49
+ startTime: number;
50
+ } | null>>;
51
+ export declare const listExecutionSpans: import("convex/server").RegisteredQuery<"public", {
52
+ status?: "started" | "ended" | undefined;
53
+ afterStartTime?: number | undefined;
54
+ kind?: "workflow" | "activity" | "system" | "deferred" | "clock" | undefined;
55
+ executionId: string;
56
+ limit: number;
57
+ }, Promise<{
58
+ page: {
59
+ _id: import("convex/values").GenericId<"spans">;
60
+ _creationTime: number;
61
+ stepNumber?: number | undefined;
62
+ error?: string | undefined;
63
+ attempt?: number | undefined;
64
+ attributes?: any;
65
+ parentSpanId?: string | undefined;
66
+ endTime?: number | undefined;
67
+ inputRef?: import("convex/values").GenericId<"payloads"> | undefined;
68
+ inputPreview?: any;
69
+ inputSize?: number | undefined;
70
+ outputRef?: import("convex/values").GenericId<"payloads"> | undefined;
71
+ outputPreview?: any;
72
+ outputSize?: number | undefined;
73
+ executionId: string;
74
+ spanId: string;
75
+ status: "started" | "ended";
76
+ kind: "workflow" | "activity" | "system" | "deferred" | "clock";
77
+ traceId: string;
78
+ name: string;
79
+ startTime: number;
80
+ }[];
81
+ nextAfterStartTime: number | undefined;
82
+ }>>;
83
+ /**
84
+ * Test helper for creating a span with full control over fields including status, startTime, and endTime.
85
+ */
86
+ export declare const internalCreateSpan: import("convex/server").RegisteredMutation<"public", {
87
+ stepNumber?: number | undefined;
88
+ error?: string | undefined;
89
+ spanId?: string | undefined;
90
+ attempt?: number | undefined;
91
+ input?: any;
92
+ attributes?: any;
93
+ parentSpanId?: string | undefined;
94
+ output?: any;
95
+ endTime?: number | undefined;
96
+ executionId: string;
97
+ status: "started" | "ended";
98
+ kind: "workflow" | "activity" | "system" | "deferred" | "clock";
99
+ traceId: string;
100
+ name: string;
101
+ startTime: number;
102
+ }, Promise<{
103
+ spanId: string;
104
+ }>>;
105
+ //# sourceMappingURL=spans.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spans.d.ts","sourceRoot":"","sources":["../../src/component/spans.ts"],"names":[],"mappings":"AAsBA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;GAuDrB,CAAC;AAEH,eAAO,MAAM,OAAO;;;;;;;;GA4ClB,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;UAS3B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiC7B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;GAkE7B,CAAC"}