@flowmarkdev/core 0.0.0-stage → 0.1.0-alpha.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.
- package/LICENSE +21 -0
- package/README.md +8 -2
- package/dist/errors.d.ts +10 -0
- package/dist/errors.js +6 -0
- package/dist/events.d.ts +344 -0
- package/dist/events.js +108 -0
- package/dist/identifiers.d.ts +12 -0
- package/dist/identifiers.js +8 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +5 -0
- package/dist/json.d.ts +31 -0
- package/dist/json.js +80 -0
- package/dist/telemetry.d.ts +21 -0
- package/dist/telemetry.js +13 -0
- package/package.json +48 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Martin Persson
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @flowmarkdev/core
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Shared workflow event contracts for Flowmark. Application code should depend on
|
|
4
|
+
[`@flowmarkdev/node`](https://www.npmjs.com/package/@flowmarkdev/node) instead of
|
|
5
|
+
importing this package directly.
|
|
6
|
+
|
|
7
|
+
This package is published so the Node SDK can resolve a normal registry
|
|
8
|
+
dependency. The schemas and types here define the telemetry envelope that the
|
|
9
|
+
API accepts.
|
package/dist/errors.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
export declare const WorkflowFailureSchema: Schema.Struct<{
|
|
3
|
+
code: Schema.filter<Schema.filter<typeof Schema.String>>;
|
|
4
|
+
message: Schema.optional<Schema.filter<typeof Schema.String>>;
|
|
5
|
+
retryable: Schema.optional<typeof Schema.Boolean>;
|
|
6
|
+
}>;
|
|
7
|
+
/** Structured details for a terminal `failed` event. */
|
|
8
|
+
export type WorkflowFailure = Schema.Schema.Type<typeof WorkflowFailureSchema>;
|
|
9
|
+
/** A bounded operation failure code and optional diagnostic detail. */
|
|
10
|
+
export type WorkflowOperationFailure = WorkflowFailure;
|
package/dist/errors.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
export const WorkflowFailureSchema = Schema.Struct({
|
|
3
|
+
code: Schema.String.pipe(Schema.minLength(1), Schema.maxLength(128)),
|
|
4
|
+
message: Schema.optional(Schema.String.pipe(Schema.maxLength(2048))),
|
|
5
|
+
retryable: Schema.optional(Schema.Boolean),
|
|
6
|
+
});
|
package/dist/events.d.ts
ADDED
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
import { Effect, Schema } from "effect";
|
|
2
|
+
export declare const WorkflowEventSchema: Schema.Union<[Schema.filter<Schema.Struct<{
|
|
3
|
+
type: Schema.Literal<["started"]>;
|
|
4
|
+
workflow: typeof Schema.String;
|
|
5
|
+
runId: typeof Schema.String;
|
|
6
|
+
timestamp: typeof Schema.String;
|
|
7
|
+
properties: Schema.optional<Schema.refine<{
|
|
8
|
+
readonly [x: string]: unknown;
|
|
9
|
+
} & import("./json.js").WorkflowProperties, Schema.Schema<unknown, {
|
|
10
|
+
readonly [x: string]: unknown;
|
|
11
|
+
}, never>>>;
|
|
12
|
+
environment: Schema.optional<Schema.filter<typeof Schema.String>>;
|
|
13
|
+
release: Schema.optional<Schema.filter<typeof Schema.String>>;
|
|
14
|
+
correlationId: Schema.optional<Schema.filter<Schema.filter<typeof Schema.String>>>;
|
|
15
|
+
parentRunId: Schema.optional<Schema.filter<Schema.filter<typeof Schema.String>>>;
|
|
16
|
+
}>>, Schema.Struct<{
|
|
17
|
+
type: Schema.Literal<["step"]>;
|
|
18
|
+
workflow: typeof Schema.String;
|
|
19
|
+
runId: typeof Schema.String;
|
|
20
|
+
step: typeof Schema.String;
|
|
21
|
+
timestamp: typeof Schema.String;
|
|
22
|
+
properties: Schema.optional<Schema.refine<{
|
|
23
|
+
readonly [x: string]: unknown;
|
|
24
|
+
} & import("./json.js").WorkflowProperties, Schema.Schema<unknown, {
|
|
25
|
+
readonly [x: string]: unknown;
|
|
26
|
+
}, never>>>;
|
|
27
|
+
}>, Schema.Struct<{
|
|
28
|
+
type: Schema.Literal<["properties"]>;
|
|
29
|
+
workflow: typeof Schema.String;
|
|
30
|
+
runId: typeof Schema.String;
|
|
31
|
+
timestamp: typeof Schema.String;
|
|
32
|
+
properties: Schema.refine<{
|
|
33
|
+
readonly [x: string]: unknown;
|
|
34
|
+
} & import("./json.js").WorkflowProperties, Schema.Schema<unknown, {
|
|
35
|
+
readonly [x: string]: unknown;
|
|
36
|
+
}, never>>;
|
|
37
|
+
}>, Schema.Struct<{
|
|
38
|
+
type: Schema.Literal<["completed"]>;
|
|
39
|
+
workflow: typeof Schema.String;
|
|
40
|
+
runId: typeof Schema.String;
|
|
41
|
+
timestamp: typeof Schema.String;
|
|
42
|
+
result: Schema.optional<Schema.refine<{
|
|
43
|
+
readonly [x: string]: unknown;
|
|
44
|
+
} & import("./json.js").WorkflowProperties, Schema.Schema<unknown, {
|
|
45
|
+
readonly [x: string]: unknown;
|
|
46
|
+
}, never>>>;
|
|
47
|
+
}>, Schema.Struct<{
|
|
48
|
+
type: Schema.Literal<["failed"]>;
|
|
49
|
+
workflow: typeof Schema.String;
|
|
50
|
+
runId: typeof Schema.String;
|
|
51
|
+
timestamp: typeof Schema.String;
|
|
52
|
+
reason: Schema.optional<Schema.filter<typeof Schema.String>>;
|
|
53
|
+
failure: Schema.optional<Schema.Struct<{
|
|
54
|
+
code: Schema.filter<Schema.filter<typeof Schema.String>>;
|
|
55
|
+
message: Schema.optional<Schema.filter<typeof Schema.String>>;
|
|
56
|
+
retryable: Schema.optional<typeof Schema.Boolean>;
|
|
57
|
+
}>>;
|
|
58
|
+
result: Schema.optional<Schema.refine<{
|
|
59
|
+
readonly [x: string]: unknown;
|
|
60
|
+
} & import("./json.js").WorkflowProperties, Schema.Schema<unknown, {
|
|
61
|
+
readonly [x: string]: unknown;
|
|
62
|
+
}, never>>>;
|
|
63
|
+
}>, Schema.Struct<{
|
|
64
|
+
type: Schema.Literal<["error"]>;
|
|
65
|
+
workflow: typeof Schema.String;
|
|
66
|
+
runId: typeof Schema.String;
|
|
67
|
+
timestamp: typeof Schema.String;
|
|
68
|
+
error: Schema.Struct<{
|
|
69
|
+
code: Schema.filter<Schema.filter<typeof Schema.String>>;
|
|
70
|
+
message: Schema.optional<Schema.filter<typeof Schema.String>>;
|
|
71
|
+
retryable: Schema.optional<typeof Schema.Boolean>;
|
|
72
|
+
handled: typeof Schema.Boolean;
|
|
73
|
+
}>;
|
|
74
|
+
}>, Schema.Struct<{
|
|
75
|
+
type: Schema.Literal<["operation_started"]>;
|
|
76
|
+
workflow: typeof Schema.String;
|
|
77
|
+
runId: typeof Schema.String;
|
|
78
|
+
timestamp: typeof Schema.String;
|
|
79
|
+
operationId: typeof Schema.UUID;
|
|
80
|
+
operationName: Schema.filter<Schema.filter<Schema.filter<typeof Schema.String>>>;
|
|
81
|
+
properties: Schema.optional<Schema.refine<{
|
|
82
|
+
readonly [x: string]: unknown;
|
|
83
|
+
} & import("./json.js").WorkflowProperties, Schema.Schema<unknown, {
|
|
84
|
+
readonly [x: string]: unknown;
|
|
85
|
+
}, never>>>;
|
|
86
|
+
}>, Schema.Struct<{
|
|
87
|
+
type: Schema.Literal<["operation_completed"]>;
|
|
88
|
+
workflow: typeof Schema.String;
|
|
89
|
+
runId: typeof Schema.String;
|
|
90
|
+
timestamp: typeof Schema.String;
|
|
91
|
+
operationId: typeof Schema.UUID;
|
|
92
|
+
operationName: Schema.filter<Schema.filter<Schema.filter<typeof Schema.String>>>;
|
|
93
|
+
durationMs: Schema.filter<typeof Schema.Number>;
|
|
94
|
+
}>, Schema.Struct<{
|
|
95
|
+
type: Schema.Literal<["operation_failed"]>;
|
|
96
|
+
workflow: typeof Schema.String;
|
|
97
|
+
runId: typeof Schema.String;
|
|
98
|
+
timestamp: typeof Schema.String;
|
|
99
|
+
operationId: typeof Schema.UUID;
|
|
100
|
+
operationName: Schema.filter<Schema.filter<Schema.filter<typeof Schema.String>>>;
|
|
101
|
+
durationMs: Schema.filter<typeof Schema.Number>;
|
|
102
|
+
failure: Schema.Struct<{
|
|
103
|
+
code: Schema.filter<Schema.filter<typeof Schema.String>>;
|
|
104
|
+
message: Schema.optional<Schema.filter<typeof Schema.String>>;
|
|
105
|
+
retryable: Schema.optional<typeof Schema.Boolean>;
|
|
106
|
+
}>;
|
|
107
|
+
}>, Schema.filter<Schema.Struct<{
|
|
108
|
+
completed: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
109
|
+
total: Schema.optional<Schema.filter<Schema.filter<typeof Schema.Number>>>;
|
|
110
|
+
unit: Schema.optional<Schema.filter<Schema.filter<typeof Schema.String>>>;
|
|
111
|
+
type: Schema.Literal<["progress"]>;
|
|
112
|
+
workflow: typeof Schema.String;
|
|
113
|
+
runId: typeof Schema.String;
|
|
114
|
+
timestamp: typeof Schema.String;
|
|
115
|
+
}>>]>;
|
|
116
|
+
export type WorkflowEvent = Schema.Schema.Type<typeof WorkflowEventSchema>;
|
|
117
|
+
export declare const EventEnvelopeSchema: Schema.Struct<{
|
|
118
|
+
eventId: typeof Schema.UUID;
|
|
119
|
+
event: Schema.filter<Schema.Union<[Schema.filter<Schema.Struct<{
|
|
120
|
+
type: Schema.Literal<["started"]>;
|
|
121
|
+
workflow: typeof Schema.String;
|
|
122
|
+
runId: typeof Schema.String;
|
|
123
|
+
timestamp: typeof Schema.String;
|
|
124
|
+
properties: Schema.optional<Schema.refine<{
|
|
125
|
+
readonly [x: string]: unknown;
|
|
126
|
+
} & import("./json.js").WorkflowProperties, Schema.Schema<unknown, {
|
|
127
|
+
readonly [x: string]: unknown;
|
|
128
|
+
}, never>>>;
|
|
129
|
+
environment: Schema.optional<Schema.filter<typeof Schema.String>>;
|
|
130
|
+
release: Schema.optional<Schema.filter<typeof Schema.String>>;
|
|
131
|
+
correlationId: Schema.optional<Schema.filter<Schema.filter<typeof Schema.String>>>;
|
|
132
|
+
parentRunId: Schema.optional<Schema.filter<Schema.filter<typeof Schema.String>>>;
|
|
133
|
+
}>>, Schema.Struct<{
|
|
134
|
+
type: Schema.Literal<["step"]>;
|
|
135
|
+
workflow: typeof Schema.String;
|
|
136
|
+
runId: typeof Schema.String;
|
|
137
|
+
step: typeof Schema.String;
|
|
138
|
+
timestamp: typeof Schema.String;
|
|
139
|
+
properties: Schema.optional<Schema.refine<{
|
|
140
|
+
readonly [x: string]: unknown;
|
|
141
|
+
} & import("./json.js").WorkflowProperties, Schema.Schema<unknown, {
|
|
142
|
+
readonly [x: string]: unknown;
|
|
143
|
+
}, never>>>;
|
|
144
|
+
}>, Schema.Struct<{
|
|
145
|
+
type: Schema.Literal<["properties"]>;
|
|
146
|
+
workflow: typeof Schema.String;
|
|
147
|
+
runId: typeof Schema.String;
|
|
148
|
+
timestamp: typeof Schema.String;
|
|
149
|
+
properties: Schema.refine<{
|
|
150
|
+
readonly [x: string]: unknown;
|
|
151
|
+
} & import("./json.js").WorkflowProperties, Schema.Schema<unknown, {
|
|
152
|
+
readonly [x: string]: unknown;
|
|
153
|
+
}, never>>;
|
|
154
|
+
}>, Schema.Struct<{
|
|
155
|
+
type: Schema.Literal<["completed"]>;
|
|
156
|
+
workflow: typeof Schema.String;
|
|
157
|
+
runId: typeof Schema.String;
|
|
158
|
+
timestamp: typeof Schema.String;
|
|
159
|
+
result: Schema.optional<Schema.refine<{
|
|
160
|
+
readonly [x: string]: unknown;
|
|
161
|
+
} & import("./json.js").WorkflowProperties, Schema.Schema<unknown, {
|
|
162
|
+
readonly [x: string]: unknown;
|
|
163
|
+
}, never>>>;
|
|
164
|
+
}>, Schema.Struct<{
|
|
165
|
+
type: Schema.Literal<["failed"]>;
|
|
166
|
+
workflow: typeof Schema.String;
|
|
167
|
+
runId: typeof Schema.String;
|
|
168
|
+
timestamp: typeof Schema.String;
|
|
169
|
+
reason: Schema.optional<Schema.filter<typeof Schema.String>>;
|
|
170
|
+
failure: Schema.optional<Schema.Struct<{
|
|
171
|
+
code: Schema.filter<Schema.filter<typeof Schema.String>>;
|
|
172
|
+
message: Schema.optional<Schema.filter<typeof Schema.String>>;
|
|
173
|
+
retryable: Schema.optional<typeof Schema.Boolean>;
|
|
174
|
+
}>>;
|
|
175
|
+
result: Schema.optional<Schema.refine<{
|
|
176
|
+
readonly [x: string]: unknown;
|
|
177
|
+
} & import("./json.js").WorkflowProperties, Schema.Schema<unknown, {
|
|
178
|
+
readonly [x: string]: unknown;
|
|
179
|
+
}, never>>>;
|
|
180
|
+
}>, Schema.Struct<{
|
|
181
|
+
type: Schema.Literal<["error"]>;
|
|
182
|
+
workflow: typeof Schema.String;
|
|
183
|
+
runId: typeof Schema.String;
|
|
184
|
+
timestamp: typeof Schema.String;
|
|
185
|
+
error: Schema.Struct<{
|
|
186
|
+
code: Schema.filter<Schema.filter<typeof Schema.String>>;
|
|
187
|
+
message: Schema.optional<Schema.filter<typeof Schema.String>>;
|
|
188
|
+
retryable: Schema.optional<typeof Schema.Boolean>;
|
|
189
|
+
handled: typeof Schema.Boolean;
|
|
190
|
+
}>;
|
|
191
|
+
}>, Schema.Struct<{
|
|
192
|
+
type: Schema.Literal<["operation_started"]>;
|
|
193
|
+
workflow: typeof Schema.String;
|
|
194
|
+
runId: typeof Schema.String;
|
|
195
|
+
timestamp: typeof Schema.String;
|
|
196
|
+
operationId: typeof Schema.UUID;
|
|
197
|
+
operationName: Schema.filter<Schema.filter<Schema.filter<typeof Schema.String>>>;
|
|
198
|
+
properties: Schema.optional<Schema.refine<{
|
|
199
|
+
readonly [x: string]: unknown;
|
|
200
|
+
} & import("./json.js").WorkflowProperties, Schema.Schema<unknown, {
|
|
201
|
+
readonly [x: string]: unknown;
|
|
202
|
+
}, never>>>;
|
|
203
|
+
}>, Schema.Struct<{
|
|
204
|
+
type: Schema.Literal<["operation_completed"]>;
|
|
205
|
+
workflow: typeof Schema.String;
|
|
206
|
+
runId: typeof Schema.String;
|
|
207
|
+
timestamp: typeof Schema.String;
|
|
208
|
+
operationId: typeof Schema.UUID;
|
|
209
|
+
operationName: Schema.filter<Schema.filter<Schema.filter<typeof Schema.String>>>;
|
|
210
|
+
durationMs: Schema.filter<typeof Schema.Number>;
|
|
211
|
+
}>, Schema.Struct<{
|
|
212
|
+
type: Schema.Literal<["operation_failed"]>;
|
|
213
|
+
workflow: typeof Schema.String;
|
|
214
|
+
runId: typeof Schema.String;
|
|
215
|
+
timestamp: typeof Schema.String;
|
|
216
|
+
operationId: typeof Schema.UUID;
|
|
217
|
+
operationName: Schema.filter<Schema.filter<Schema.filter<typeof Schema.String>>>;
|
|
218
|
+
durationMs: Schema.filter<typeof Schema.Number>;
|
|
219
|
+
failure: Schema.Struct<{
|
|
220
|
+
code: Schema.filter<Schema.filter<typeof Schema.String>>;
|
|
221
|
+
message: Schema.optional<Schema.filter<typeof Schema.String>>;
|
|
222
|
+
retryable: Schema.optional<typeof Schema.Boolean>;
|
|
223
|
+
}>;
|
|
224
|
+
}>, Schema.filter<Schema.Struct<{
|
|
225
|
+
completed: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
226
|
+
total: Schema.optional<Schema.filter<Schema.filter<typeof Schema.Number>>>;
|
|
227
|
+
unit: Schema.optional<Schema.filter<Schema.filter<typeof Schema.String>>>;
|
|
228
|
+
type: Schema.Literal<["progress"]>;
|
|
229
|
+
workflow: typeof Schema.String;
|
|
230
|
+
runId: typeof Schema.String;
|
|
231
|
+
timestamp: typeof Schema.String;
|
|
232
|
+
}>>]>>;
|
|
233
|
+
}>;
|
|
234
|
+
declare const WorkflowEventValidationError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
235
|
+
readonly _tag: "WorkflowEventValidationError";
|
|
236
|
+
} & Readonly<A>;
|
|
237
|
+
export declare class WorkflowEventValidationError extends WorkflowEventValidationError_base<{
|
|
238
|
+
readonly input: unknown;
|
|
239
|
+
readonly cause: unknown;
|
|
240
|
+
}> {
|
|
241
|
+
}
|
|
242
|
+
export declare const decodeWorkflowEvent: (input: unknown) => Effect.Effect<{
|
|
243
|
+
readonly type: "started";
|
|
244
|
+
readonly workflow: string;
|
|
245
|
+
readonly runId: string;
|
|
246
|
+
readonly timestamp: string;
|
|
247
|
+
readonly properties?: ({
|
|
248
|
+
readonly [x: string]: unknown;
|
|
249
|
+
} & import("./json.js").WorkflowProperties) | undefined;
|
|
250
|
+
readonly environment?: string | undefined;
|
|
251
|
+
readonly release?: string | undefined;
|
|
252
|
+
readonly correlationId?: string | undefined;
|
|
253
|
+
readonly parentRunId?: string | undefined;
|
|
254
|
+
} | {
|
|
255
|
+
readonly completed: number;
|
|
256
|
+
readonly total?: number | undefined;
|
|
257
|
+
readonly unit?: string | undefined;
|
|
258
|
+
readonly type: "progress";
|
|
259
|
+
readonly workflow: string;
|
|
260
|
+
readonly runId: string;
|
|
261
|
+
readonly timestamp: string;
|
|
262
|
+
} | {
|
|
263
|
+
readonly type: "step";
|
|
264
|
+
readonly workflow: string;
|
|
265
|
+
readonly runId: string;
|
|
266
|
+
readonly timestamp: string;
|
|
267
|
+
readonly properties?: ({
|
|
268
|
+
readonly [x: string]: unknown;
|
|
269
|
+
} & import("./json.js").WorkflowProperties) | undefined;
|
|
270
|
+
readonly step: string;
|
|
271
|
+
} | {
|
|
272
|
+
readonly type: "properties";
|
|
273
|
+
readonly workflow: string;
|
|
274
|
+
readonly runId: string;
|
|
275
|
+
readonly timestamp: string;
|
|
276
|
+
readonly properties: {
|
|
277
|
+
readonly [x: string]: unknown;
|
|
278
|
+
} & import("./json.js").WorkflowProperties;
|
|
279
|
+
} | {
|
|
280
|
+
readonly type: "completed";
|
|
281
|
+
readonly workflow: string;
|
|
282
|
+
readonly runId: string;
|
|
283
|
+
readonly timestamp: string;
|
|
284
|
+
readonly result?: ({
|
|
285
|
+
readonly [x: string]: unknown;
|
|
286
|
+
} & import("./json.js").WorkflowProperties) | undefined;
|
|
287
|
+
} | {
|
|
288
|
+
readonly type: "failed";
|
|
289
|
+
readonly workflow: string;
|
|
290
|
+
readonly runId: string;
|
|
291
|
+
readonly timestamp: string;
|
|
292
|
+
readonly result?: ({
|
|
293
|
+
readonly [x: string]: unknown;
|
|
294
|
+
} & import("./json.js").WorkflowProperties) | undefined;
|
|
295
|
+
readonly reason?: string | undefined;
|
|
296
|
+
readonly failure?: {
|
|
297
|
+
readonly code: string;
|
|
298
|
+
readonly message?: string | undefined;
|
|
299
|
+
readonly retryable?: boolean | undefined;
|
|
300
|
+
} | undefined;
|
|
301
|
+
} | {
|
|
302
|
+
readonly type: "error";
|
|
303
|
+
readonly workflow: string;
|
|
304
|
+
readonly runId: string;
|
|
305
|
+
readonly timestamp: string;
|
|
306
|
+
readonly error: {
|
|
307
|
+
readonly code: string;
|
|
308
|
+
readonly message?: string | undefined;
|
|
309
|
+
readonly retryable?: boolean | undefined;
|
|
310
|
+
readonly handled: boolean;
|
|
311
|
+
};
|
|
312
|
+
} | {
|
|
313
|
+
readonly type: "operation_started";
|
|
314
|
+
readonly workflow: string;
|
|
315
|
+
readonly runId: string;
|
|
316
|
+
readonly timestamp: string;
|
|
317
|
+
readonly properties?: ({
|
|
318
|
+
readonly [x: string]: unknown;
|
|
319
|
+
} & import("./json.js").WorkflowProperties) | undefined;
|
|
320
|
+
readonly operationId: string;
|
|
321
|
+
readonly operationName: string;
|
|
322
|
+
} | {
|
|
323
|
+
readonly type: "operation_completed";
|
|
324
|
+
readonly workflow: string;
|
|
325
|
+
readonly runId: string;
|
|
326
|
+
readonly timestamp: string;
|
|
327
|
+
readonly operationId: string;
|
|
328
|
+
readonly operationName: string;
|
|
329
|
+
readonly durationMs: number;
|
|
330
|
+
} | {
|
|
331
|
+
readonly type: "operation_failed";
|
|
332
|
+
readonly workflow: string;
|
|
333
|
+
readonly runId: string;
|
|
334
|
+
readonly timestamp: string;
|
|
335
|
+
readonly failure: {
|
|
336
|
+
readonly code: string;
|
|
337
|
+
readonly message?: string | undefined;
|
|
338
|
+
readonly retryable?: boolean | undefined;
|
|
339
|
+
};
|
|
340
|
+
readonly operationId: string;
|
|
341
|
+
readonly operationName: string;
|
|
342
|
+
readonly durationMs: number;
|
|
343
|
+
}, WorkflowEventValidationError, never>;
|
|
344
|
+
export {};
|
package/dist/events.js
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { Data, Effect, Match, Schema } from "effect";
|
|
2
|
+
import { IngestionIdentifierSchema, WorkflowCorrelationIdSchema, WorkflowLinkIdSchema, WorkflowNameSchema, WorkflowRunIdSchema, WorkflowStepNameSchema, } from "./identifiers.js";
|
|
3
|
+
import { WorkflowPropertiesSchema, WorkflowResultSchema } from "./json.js";
|
|
4
|
+
import { WorkflowErrorSchema, WorkflowProgressFields } from "./telemetry.js";
|
|
5
|
+
import { WorkflowFailureSchema } from "./errors.js";
|
|
6
|
+
const StartedEventSchema = Schema.Struct({
|
|
7
|
+
type: Schema.Literal("started"),
|
|
8
|
+
workflow: WorkflowNameSchema,
|
|
9
|
+
runId: WorkflowRunIdSchema,
|
|
10
|
+
timestamp: Schema.String,
|
|
11
|
+
properties: Schema.optional(WorkflowPropertiesSchema),
|
|
12
|
+
environment: Schema.optional(Schema.String.pipe(Schema.maxLength(128))),
|
|
13
|
+
release: Schema.optional(Schema.String.pipe(Schema.maxLength(256))),
|
|
14
|
+
correlationId: Schema.optional(WorkflowCorrelationIdSchema),
|
|
15
|
+
parentRunId: Schema.optional(WorkflowLinkIdSchema),
|
|
16
|
+
}).pipe(Schema.filter(({ runId, parentRunId }) => parentRunId === undefined || parentRunId !== runId));
|
|
17
|
+
const StepEventSchema = Schema.Struct({
|
|
18
|
+
type: Schema.Literal("step"),
|
|
19
|
+
workflow: WorkflowNameSchema,
|
|
20
|
+
runId: WorkflowRunIdSchema,
|
|
21
|
+
step: WorkflowStepNameSchema,
|
|
22
|
+
timestamp: Schema.String,
|
|
23
|
+
properties: Schema.optional(WorkflowPropertiesSchema),
|
|
24
|
+
});
|
|
25
|
+
const PropertiesEventSchema = Schema.Struct({
|
|
26
|
+
type: Schema.Literal("properties"),
|
|
27
|
+
workflow: WorkflowNameSchema,
|
|
28
|
+
runId: WorkflowRunIdSchema,
|
|
29
|
+
timestamp: Schema.String,
|
|
30
|
+
properties: WorkflowPropertiesSchema,
|
|
31
|
+
});
|
|
32
|
+
const CompletedEventSchema = Schema.Struct({
|
|
33
|
+
type: Schema.Literal("completed"),
|
|
34
|
+
workflow: WorkflowNameSchema,
|
|
35
|
+
runId: WorkflowRunIdSchema,
|
|
36
|
+
timestamp: Schema.String,
|
|
37
|
+
result: Schema.optional(WorkflowResultSchema),
|
|
38
|
+
});
|
|
39
|
+
const FailedEventSchema = Schema.Struct({
|
|
40
|
+
type: Schema.Literal("failed"),
|
|
41
|
+
workflow: WorkflowNameSchema,
|
|
42
|
+
runId: WorkflowRunIdSchema,
|
|
43
|
+
timestamp: Schema.String,
|
|
44
|
+
reason: Schema.optional(Schema.String.pipe(Schema.maxLength(2048))),
|
|
45
|
+
failure: Schema.optional(WorkflowFailureSchema),
|
|
46
|
+
result: Schema.optional(WorkflowResultSchema),
|
|
47
|
+
});
|
|
48
|
+
const ErrorEventSchema = Schema.Struct({
|
|
49
|
+
type: Schema.Literal("error"),
|
|
50
|
+
workflow: WorkflowNameSchema,
|
|
51
|
+
runId: WorkflowRunIdSchema,
|
|
52
|
+
timestamp: Schema.String,
|
|
53
|
+
error: WorkflowErrorSchema,
|
|
54
|
+
});
|
|
55
|
+
const OperationDurationSchema = Schema.Number.pipe(Schema.filter((duration) => Number.isFinite(duration) && duration >= 0));
|
|
56
|
+
const OperationNameSchema = Schema.String.pipe(Schema.minLength(1), Schema.maxLength(200), Schema.filter((value) => value.trim().length > 0));
|
|
57
|
+
const OperationStartedEventSchema = Schema.Struct({
|
|
58
|
+
type: Schema.Literal("operation_started"),
|
|
59
|
+
workflow: WorkflowNameSchema,
|
|
60
|
+
runId: WorkflowRunIdSchema,
|
|
61
|
+
timestamp: Schema.String,
|
|
62
|
+
operationId: Schema.UUID,
|
|
63
|
+
operationName: OperationNameSchema,
|
|
64
|
+
properties: Schema.optional(WorkflowPropertiesSchema),
|
|
65
|
+
});
|
|
66
|
+
const OperationCompletedEventSchema = Schema.Struct({
|
|
67
|
+
type: Schema.Literal("operation_completed"),
|
|
68
|
+
workflow: WorkflowNameSchema,
|
|
69
|
+
runId: WorkflowRunIdSchema,
|
|
70
|
+
timestamp: Schema.String,
|
|
71
|
+
operationId: Schema.UUID,
|
|
72
|
+
operationName: OperationNameSchema,
|
|
73
|
+
durationMs: OperationDurationSchema,
|
|
74
|
+
});
|
|
75
|
+
const OperationFailedEventSchema = Schema.Struct({
|
|
76
|
+
type: Schema.Literal("operation_failed"),
|
|
77
|
+
workflow: WorkflowNameSchema,
|
|
78
|
+
runId: WorkflowRunIdSchema,
|
|
79
|
+
timestamp: Schema.String,
|
|
80
|
+
operationId: Schema.UUID,
|
|
81
|
+
operationName: OperationNameSchema,
|
|
82
|
+
durationMs: OperationDurationSchema,
|
|
83
|
+
failure: WorkflowFailureSchema,
|
|
84
|
+
});
|
|
85
|
+
const ProgressEventSchema = Schema.Struct({
|
|
86
|
+
type: Schema.Literal("progress"),
|
|
87
|
+
workflow: WorkflowNameSchema,
|
|
88
|
+
runId: WorkflowRunIdSchema,
|
|
89
|
+
timestamp: Schema.String,
|
|
90
|
+
...WorkflowProgressFields,
|
|
91
|
+
}).pipe(Schema.filter(({ completed, total }) => total === undefined || completed <= total));
|
|
92
|
+
export const WorkflowEventSchema = Schema.Union(StartedEventSchema, StepEventSchema, PropertiesEventSchema, CompletedEventSchema, FailedEventSchema, ErrorEventSchema, OperationStartedEventSchema, OperationCompletedEventSchema, OperationFailedEventSchema, ProgressEventSchema);
|
|
93
|
+
export const EventEnvelopeSchema = Schema.Struct({
|
|
94
|
+
eventId: Schema.UUID,
|
|
95
|
+
event: WorkflowEventSchema.pipe(Schema.filter((event) => Number.isFinite(Date.parse(event.timestamp)) &&
|
|
96
|
+
Schema.is(IngestionIdentifierSchema)(event.workflow) &&
|
|
97
|
+
Schema.is(IngestionIdentifierSchema)(event.runId) &&
|
|
98
|
+
(event.type !== "started" ||
|
|
99
|
+
((event.correlationId === undefined ||
|
|
100
|
+
Schema.is(WorkflowCorrelationIdSchema)(event.correlationId)) &&
|
|
101
|
+
(event.parentRunId === undefined ||
|
|
102
|
+
(Schema.is(WorkflowLinkIdSchema)(event.parentRunId) &&
|
|
103
|
+
event.parentRunId !== event.runId)))) &&
|
|
104
|
+
Match.value(event).pipe(Match.when({ type: "step" }, ({ step }) => Schema.is(IngestionIdentifierSchema)(step)), Match.when({ type: "operation_started" }, ({ operationName }) => Schema.is(IngestionIdentifierSchema)(operationName)), Match.when({ type: "operation_completed" }, ({ operationName }) => Schema.is(IngestionIdentifierSchema)(operationName)), Match.when({ type: "operation_failed" }, ({ operationName }) => Schema.is(IngestionIdentifierSchema)(operationName)), Match.orElse(() => true)))),
|
|
105
|
+
});
|
|
106
|
+
export class WorkflowEventValidationError extends Data.TaggedError("WorkflowEventValidationError") {
|
|
107
|
+
}
|
|
108
|
+
export const decodeWorkflowEvent = Effect.fn("Flowmark.decodeWorkflowEvent")((input) => Schema.decodeUnknown(WorkflowEventSchema)(input).pipe(Effect.mapError((cause) => new WorkflowEventValidationError({ input, cause }))));
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
export declare const WorkflowNameSchema: typeof Schema.String;
|
|
3
|
+
export declare const WorkflowRunIdSchema: typeof Schema.String;
|
|
4
|
+
export declare const WorkflowStepNameSchema: typeof Schema.String;
|
|
5
|
+
export type WorkflowName = Schema.Schema.Type<typeof WorkflowNameSchema>;
|
|
6
|
+
export type WorkflowRunId = Schema.Schema.Type<typeof WorkflowRunIdSchema>;
|
|
7
|
+
export type WorkflowStepName = Schema.Schema.Type<typeof WorkflowStepNameSchema>;
|
|
8
|
+
export declare const WorkflowLinkIdSchema: Schema.filter<Schema.filter<typeof Schema.String>>;
|
|
9
|
+
/** Optional explicit grouping identifier; do not use secrets or personal data. */
|
|
10
|
+
export declare const WorkflowCorrelationIdSchema: Schema.filter<Schema.filter<typeof Schema.String>>;
|
|
11
|
+
export type WorkflowCorrelationId = Schema.Schema.Type<typeof WorkflowCorrelationIdSchema>;
|
|
12
|
+
export declare const IngestionIdentifierSchema: Schema.filter<Schema.filter<typeof Schema.String>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
export const WorkflowNameSchema = Schema.String;
|
|
3
|
+
export const WorkflowRunIdSchema = Schema.String;
|
|
4
|
+
export const WorkflowStepNameSchema = Schema.String;
|
|
5
|
+
export const WorkflowLinkIdSchema = Schema.String.pipe(Schema.maxLength(200), Schema.filter((value) => value.trim().length > 0));
|
|
6
|
+
/** Optional explicit grouping identifier; do not use secrets or personal data. */
|
|
7
|
+
export const WorkflowCorrelationIdSchema = Schema.String.pipe(Schema.maxLength(128), Schema.filter((value) => value.trim().length > 0));
|
|
8
|
+
export const IngestionIdentifierSchema = Schema.String.pipe(Schema.maxLength(200), Schema.filter((value) => value.trim().length > 0));
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { WorkflowCorrelationIdSchema, WorkflowNameSchema, WorkflowRunIdSchema, WorkflowStepNameSchema, } from "./identifiers.js";
|
|
2
|
+
export type { WorkflowCorrelationId, WorkflowName, WorkflowRunId, WorkflowStepName, } from "./identifiers.js";
|
|
3
|
+
export { WORKFLOW_JSON_LIMITS, WorkflowPropertiesSchema, WorkflowResultSchema, } from "./json.js";
|
|
4
|
+
export type { JsonValue, WorkflowProperties, WorkflowResult } from "./json.js";
|
|
5
|
+
export { WorkflowErrorSchema, WorkflowProgressSchema } from "./telemetry.js";
|
|
6
|
+
export type { WorkflowError, WorkflowProgress } from "./telemetry.js";
|
|
7
|
+
export { WorkflowFailureSchema } from "./errors.js";
|
|
8
|
+
export type { WorkflowFailure, WorkflowOperationFailure } from "./errors.js";
|
|
9
|
+
export { EventEnvelopeSchema, WorkflowEventSchema, WorkflowEventValidationError, decodeWorkflowEvent, } from "./events.js";
|
|
10
|
+
export type { WorkflowEvent } from "./events.js";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { WorkflowCorrelationIdSchema, WorkflowNameSchema, WorkflowRunIdSchema, WorkflowStepNameSchema, } from "./identifiers.js";
|
|
2
|
+
export { WORKFLOW_JSON_LIMITS, WorkflowPropertiesSchema, WorkflowResultSchema, } from "./json.js";
|
|
3
|
+
export { WorkflowErrorSchema, WorkflowProgressSchema } from "./telemetry.js";
|
|
4
|
+
export { WorkflowFailureSchema } from "./errors.js";
|
|
5
|
+
export { EventEnvelopeSchema, WorkflowEventSchema, WorkflowEventValidationError, decodeWorkflowEvent, } from "./events.js";
|
package/dist/json.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
/**
|
|
3
|
+
* Limits applied to properties and results in both the SDK and ingestion API.
|
|
4
|
+
* Nested values allow at most five levels, 128 keys total, 128 characters per
|
|
5
|
+
* key, 2,048 characters per string, and 16 KiB of UTF-8 JSON per object.
|
|
6
|
+
*/
|
|
7
|
+
export declare const WORKFLOW_JSON_LIMITS: {
|
|
8
|
+
readonly maxDepth: 5;
|
|
9
|
+
readonly maxKeys: 128;
|
|
10
|
+
readonly maxKeyLength: 128;
|
|
11
|
+
readonly maxStringLength: 2048;
|
|
12
|
+
readonly maxBytes: number;
|
|
13
|
+
};
|
|
14
|
+
/** Recursive JSON value admitted by the bounded workflow context/result schema. */
|
|
15
|
+
export type JsonValue = null | boolean | number | string | JsonValue[] | {
|
|
16
|
+
readonly [key: string]: JsonValue;
|
|
17
|
+
};
|
|
18
|
+
/** Bounded JSON-safe context object accepted on starts, steps, and amendments. */
|
|
19
|
+
export type WorkflowProperties = Record<string, JsonValue>;
|
|
20
|
+
/** Bounded JSON-safe object recorded when a run completes. */
|
|
21
|
+
export type WorkflowResult = Record<string, JsonValue>;
|
|
22
|
+
export declare const WorkflowPropertiesSchema: Schema.refine<{
|
|
23
|
+
readonly [x: string]: unknown;
|
|
24
|
+
} & WorkflowProperties, Schema.Schema<unknown, {
|
|
25
|
+
readonly [x: string]: unknown;
|
|
26
|
+
}, never>>;
|
|
27
|
+
export declare const WorkflowResultSchema: Schema.refine<{
|
|
28
|
+
readonly [x: string]: unknown;
|
|
29
|
+
} & WorkflowProperties, Schema.Schema<unknown, {
|
|
30
|
+
readonly [x: string]: unknown;
|
|
31
|
+
}, never>>;
|
package/dist/json.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
/**
|
|
3
|
+
* Limits applied to properties and results in both the SDK and ingestion API.
|
|
4
|
+
* Nested values allow at most five levels, 128 keys total, 128 characters per
|
|
5
|
+
* key, 2,048 characters per string, and 16 KiB of UTF-8 JSON per object.
|
|
6
|
+
*/
|
|
7
|
+
export const WORKFLOW_JSON_LIMITS = {
|
|
8
|
+
maxDepth: 5,
|
|
9
|
+
maxKeys: 128,
|
|
10
|
+
maxKeyLength: 128,
|
|
11
|
+
maxStringLength: 2048,
|
|
12
|
+
maxBytes: 16 * 1024,
|
|
13
|
+
};
|
|
14
|
+
const isBoundedJsonObject = (input) => {
|
|
15
|
+
if (input === null || typeof input !== "object" || Array.isArray(input)) {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
let keys = 0;
|
|
19
|
+
const ancestors = new Set();
|
|
20
|
+
try {
|
|
21
|
+
const visit = (value, depth) => {
|
|
22
|
+
if (depth > WORKFLOW_JSON_LIMITS.maxDepth) {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
if (value === null ||
|
|
26
|
+
typeof value === "boolean" ||
|
|
27
|
+
(typeof value === "number" && Number.isFinite(value))) {
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
if (typeof value === "string") {
|
|
31
|
+
return value.length <= WORKFLOW_JSON_LIMITS.maxStringLength;
|
|
32
|
+
}
|
|
33
|
+
if (typeof value !== "object") {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
if (ancestors.has(value)) {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
if (!Array.isArray(value) &&
|
|
40
|
+
Object.getPrototypeOf(value) !== Object.prototype &&
|
|
41
|
+
Object.getPrototypeOf(value) !== null) {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
ancestors.add(value);
|
|
45
|
+
let valid = true;
|
|
46
|
+
if (Array.isArray(value)) {
|
|
47
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
48
|
+
if (!(index in value) || !visit(value[index], depth + 1)) {
|
|
49
|
+
valid = false;
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
const entries = Object.entries(value);
|
|
56
|
+
keys += entries.length;
|
|
57
|
+
valid =
|
|
58
|
+
keys <= WORKFLOW_JSON_LIMITS.maxKeys &&
|
|
59
|
+
entries.every(([key, item]) => key.length <= WORKFLOW_JSON_LIMITS.maxKeyLength &&
|
|
60
|
+
visit(item, depth + 1));
|
|
61
|
+
}
|
|
62
|
+
ancestors.delete(value);
|
|
63
|
+
return valid;
|
|
64
|
+
};
|
|
65
|
+
if (!visit(input, 0)) {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
return (new TextEncoder().encode(JSON.stringify(input)).byteLength <=
|
|
69
|
+
WORKFLOW_JSON_LIMITS.maxBytes);
|
|
70
|
+
}
|
|
71
|
+
catch {
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
const WorkflowJsonObjectSchema = Schema.Record({
|
|
76
|
+
key: Schema.String,
|
|
77
|
+
value: Schema.Unknown,
|
|
78
|
+
}).pipe(Schema.filter(isBoundedJsonObject));
|
|
79
|
+
export const WorkflowPropertiesSchema = WorkflowJsonObjectSchema;
|
|
80
|
+
export const WorkflowResultSchema = WorkflowJsonObjectSchema;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
export declare const WorkflowErrorSchema: Schema.Struct<{
|
|
3
|
+
code: Schema.filter<Schema.filter<typeof Schema.String>>;
|
|
4
|
+
message: Schema.optional<Schema.filter<typeof Schema.String>>;
|
|
5
|
+
retryable: Schema.optional<typeof Schema.Boolean>;
|
|
6
|
+
handled: typeof Schema.Boolean;
|
|
7
|
+
}>;
|
|
8
|
+
export declare const WorkflowProgressFields: {
|
|
9
|
+
completed: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
10
|
+
total: Schema.optional<Schema.filter<Schema.filter<typeof Schema.Number>>>;
|
|
11
|
+
unit: Schema.optional<Schema.filter<Schema.filter<typeof Schema.String>>>;
|
|
12
|
+
};
|
|
13
|
+
export declare const WorkflowProgressSchema: Schema.filter<Schema.Struct<{
|
|
14
|
+
completed: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
15
|
+
total: Schema.optional<Schema.filter<Schema.filter<typeof Schema.Number>>>;
|
|
16
|
+
unit: Schema.optional<Schema.filter<Schema.filter<typeof Schema.String>>>;
|
|
17
|
+
}>>;
|
|
18
|
+
/** A recoverable error event; `handled` records whether application code handled it. */
|
|
19
|
+
export type WorkflowError = Schema.Schema.Type<typeof WorkflowErrorSchema>;
|
|
20
|
+
/** Absolute progress snapshot for a workflow run. */
|
|
21
|
+
export type WorkflowProgress = Schema.Schema.Type<typeof WorkflowProgressSchema>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
export const WorkflowErrorSchema = Schema.Struct({
|
|
3
|
+
code: Schema.String.pipe(Schema.minLength(1), Schema.maxLength(128)),
|
|
4
|
+
message: Schema.optional(Schema.String.pipe(Schema.maxLength(2048))),
|
|
5
|
+
retryable: Schema.optional(Schema.Boolean),
|
|
6
|
+
handled: Schema.Boolean,
|
|
7
|
+
});
|
|
8
|
+
export const WorkflowProgressFields = {
|
|
9
|
+
completed: Schema.Number.pipe(Schema.filter(Number.isSafeInteger), Schema.nonNegative()),
|
|
10
|
+
total: Schema.optional(Schema.Number.pipe(Schema.filter(Number.isSafeInteger), Schema.nonNegative())),
|
|
11
|
+
unit: Schema.optional(Schema.String.pipe(Schema.minLength(1), Schema.maxLength(64))),
|
|
12
|
+
};
|
|
13
|
+
export const WorkflowProgressSchema = Schema.Struct(WorkflowProgressFields).pipe(Schema.filter(({ completed, total }) => total === undefined || completed <= total));
|
package/package.json
CHANGED
|
@@ -1,6 +1,50 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flowmarkdev/core",
|
|
3
|
-
"version": "0.0.0
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0-alpha.0",
|
|
4
|
+
"description": "Shared workflow event contracts for Flowmark",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"README.md",
|
|
12
|
+
"LICENSE"
|
|
13
|
+
],
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"import": "./dist/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./package.json": "./package.json"
|
|
20
|
+
},
|
|
21
|
+
"publishConfig": {
|
|
22
|
+
"access": "public"
|
|
23
|
+
},
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "git+https://github.com/Mumma6/flowmark.git",
|
|
27
|
+
"directory": "packages/core"
|
|
28
|
+
},
|
|
29
|
+
"homepage": "https://flowmark.dev",
|
|
30
|
+
"bugs": {
|
|
31
|
+
"url": "https://github.com/Mumma6/flowmark/issues"
|
|
32
|
+
},
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": ">=20.19"
|
|
35
|
+
},
|
|
36
|
+
"scripts": {
|
|
37
|
+
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput",
|
|
38
|
+
"build": "tsc -p tsconfig.build.json",
|
|
39
|
+
"lint": "eslint src test",
|
|
40
|
+
"test": "vitest run",
|
|
41
|
+
"typecheck": "tsc -p tsconfig.json"
|
|
42
|
+
},
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"effect": "^3.22.4"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"typescript": "^5.9.2",
|
|
48
|
+
"vitest": "^3.2.4"
|
|
49
|
+
}
|
|
50
|
+
}
|