@swirls/looms 0.0.2 → 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.
- package/CHANGELOG.md +9 -2
- package/dist/actor/cell.d.ts +9 -4
- package/dist/actor/cell.js +7 -11
- package/dist/actor/host.d.ts +7 -3
- package/dist/actor/host.js +55 -32
- package/dist/actor/index.d.ts +1 -1
- package/dist/actor/index.js +1 -1
- package/dist/actor/routing.d.ts +12 -1
- package/dist/actor/routing.js +57 -51
- package/dist/agent/agent-session.d.ts +5 -0
- package/dist/agent/agent-session.js +270 -0
- package/dist/agent/definitions-store.d.ts +2 -3
- package/dist/agent/definitions-store.js +2 -4
- package/dist/agent/definitions.d.ts +46 -20
- package/dist/agent/definitions.js +36 -8
- package/dist/agent/effects.d.ts +359 -2
- package/dist/agent/effects.js +60 -34
- package/dist/agent/events.d.ts +175 -19
- package/dist/agent/events.js +45 -10
- package/dist/agent/index.d.ts +1 -0
- package/dist/agent/index.js +1 -0
- package/dist/agent/llm.d.ts +11 -2
- package/dist/agent/llm.js +13 -3
- package/dist/agent/module.d.ts +812 -78
- package/dist/agent/module.js +16 -4
- package/dist/agent/scope.d.ts +174 -18
- package/dist/agent/signals.d.ts +24 -1
- package/dist/agent/signals.js +77 -0
- package/dist/agent/threads.d.ts +3 -33
- package/dist/agent/threads.js +20 -25
- package/dist/agent/tool-schema.js +0 -1
- package/dist/agent/types.d.ts +49 -4
- package/dist/agent/types.js +5 -5
- package/dist/ai-vercel/index.d.ts +1 -0
- package/dist/ai-vercel/index.js +1 -0
- package/dist/ai-vercel/messages.js +22 -7
- package/dist/ai-vercel/vercel-evaluator.d.ts +23 -0
- package/dist/ai-vercel/vercel-evaluator.js +68 -0
- package/dist/ai-vercel/vercel-llm.js +64 -44
- package/dist/approval/effects.d.ts +89 -0
- package/dist/approval/module.d.ts +179 -29
- package/dist/approval/projections.d.ts +0 -14
- package/dist/approval/projections.js +20 -3
- package/dist/approval/signals.d.ts +2 -0
- package/dist/approval/signals.js +18 -2
- package/dist/cli/cli.js +2 -0
- package/dist/cli/commands.js +12 -16
- package/dist/client/client.d.ts +1195 -18
- package/dist/client/client.js +118 -120
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client/sse.d.ts +13 -0
- package/dist/client/sse.js +38 -44
- package/dist/cloudflare/alarm-scheduler.d.ts +12 -2
- package/dist/cloudflare/alarm-scheduler.js +34 -7
- package/dist/cloudflare/durable-object.d.ts +10 -2
- package/dist/cloudflare/durable-object.js +59 -28
- package/dist/cloudflare/event-store.d.ts +7 -2
- package/dist/cloudflare/event-store.js +8 -7
- package/dist/cloudflare/index.d.ts +2 -2
- package/dist/cloudflare/index.js +2 -2
- package/dist/cloudflare/router.js +13 -14
- package/dist/core/catalog.d.ts +3 -3
- package/dist/core/catalog.js +2 -5
- package/dist/core/coalesce.js +5 -3
- package/dist/core/compose.d.ts +2 -1
- package/dist/core/compose.js +18 -2
- package/dist/core/definition-store.d.ts +11 -0
- package/dist/core/definition-store.js +6 -0
- package/dist/core/effects.d.ts +127 -15
- package/dist/core/effects.js +89 -17
- package/dist/core/envelope.d.ts +27 -7
- package/dist/core/envelope.js +20 -6
- package/dist/core/event-codec.d.ts +4 -2
- package/dist/core/event-codec.js +10 -5
- package/dist/core/event-index.js +1 -3
- package/dist/core/fold.d.ts +3 -0
- package/dist/core/fold.js +171 -24
- package/dist/core/ids.d.ts +5 -0
- package/dist/core/ids.js +35 -2
- package/dist/core/index.d.ts +5 -1
- package/dist/core/index.js +5 -1
- package/dist/core/kind.d.ts +22 -0
- package/dist/core/kind.js +17 -0
- package/dist/core/limits.d.ts +34 -0
- package/dist/core/limits.js +46 -0
- package/dist/core/match.d.ts +1 -0
- package/dist/core/match.js +10 -1
- package/dist/core/module-scope.d.ts +22 -20
- package/dist/core/module-scope.js +38 -28
- package/dist/core/module.d.ts +16 -5
- package/dist/core/module.js +4 -0
- package/dist/core/projection.d.ts +13 -13
- package/dist/core/projection.js +9 -5
- package/dist/core/protocol.d.ts +68 -11
- package/dist/core/protocol.js +82 -11
- package/dist/core/replay.d.ts +312 -3
- package/dist/core/replay.js +11 -1
- package/dist/core/schema.d.ts +8 -19
- package/dist/core/schema.js +25 -80
- package/dist/core/serialize.js +2 -4
- package/dist/core/snapshot-store.d.ts +2 -1
- package/dist/core/snapshot-store.js +8 -2
- package/dist/core/snapshots.d.ts +5 -1
- package/dist/core/snapshots.js +10 -15
- package/dist/core/sqlite-store.js +56 -11
- package/dist/core/state.d.ts +142 -4
- package/dist/core/state.js +78 -0
- package/dist/core/store.d.ts +38 -3
- package/dist/core/store.js +77 -22
- package/dist/core/thread.d.ts +10 -9
- package/dist/core/types.d.ts +5 -8
- package/dist/core/types.js +28 -24
- package/dist/core/validate-event.js +14 -4
- package/dist/core/worker-callback.d.ts +17 -0
- package/dist/core/worker-callback.js +1 -0
- package/dist/debugger/components/event-stream.js +9 -10
- package/dist/debugger/events/protocol-summarize.js +26 -0
- package/dist/debugger/lib/event-meta.js +1 -2
- package/dist/evaluator/definitions-store.d.ts +11 -0
- package/dist/evaluator/definitions-store.js +8 -0
- package/dist/evaluator/definitions.d.ts +18 -0
- package/dist/evaluator/definitions.js +4 -0
- package/dist/evaluator/effects.d.ts +226 -0
- package/dist/evaluator/effects.js +132 -0
- package/dist/evaluator/evaluator.d.ts +24 -0
- package/dist/evaluator/evaluator.js +67 -0
- package/dist/evaluator/events.d.ts +59 -0
- package/dist/evaluator/events.js +21 -0
- package/dist/evaluator/index.d.ts +11 -0
- package/dist/evaluator/index.js +11 -0
- package/dist/evaluator/module.d.ts +606 -0
- package/dist/evaluator/module.js +25 -0
- package/dist/evaluator/projections.d.ts +50 -0
- package/dist/evaluator/projections.js +20 -0
- package/dist/evaluator/scope.d.ts +59 -0
- package/dist/evaluator/scope.js +7 -0
- package/dist/evaluator/signals.d.ts +3 -0
- package/dist/evaluator/signals.js +17 -0
- package/dist/evaluator/threads.d.ts +62 -0
- package/dist/evaluator/threads.js +117 -0
- package/dist/evaluator/types.d.ts +125 -0
- package/dist/evaluator/types.js +51 -0
- package/dist/projectors/delivery.d.ts +83 -0
- package/dist/projectors/delivery.js +182 -0
- package/dist/projectors/index-model.d.ts +1 -1
- package/dist/projectors/index-model.js +4 -6
- package/dist/projectors/index.d.ts +2 -0
- package/dist/projectors/index.js +2 -0
- package/dist/projectors/memory.d.ts +1 -1
- package/dist/projectors/memory.js +10 -8
- package/dist/projectors/postgres.js +44 -58
- package/dist/projectors/projector.d.ts +17 -0
- package/dist/projectors/projector.js +26 -1
- package/dist/projectors/sqlite-delivery.d.ts +4 -0
- package/dist/projectors/sqlite-delivery.js +147 -0
- package/dist/projectors/sqlite.js +23 -23
- package/dist/projectors/with-projectors.d.ts +7 -2
- package/dist/projectors/with-projectors.js +27 -28
- package/dist/react/notify.js +11 -8
- package/dist/react/react.d.ts +2 -3
- package/dist/react/react.js +14 -30
- package/dist/react/sse.d.ts +1 -1
- package/dist/react/sse.js +1 -1
- package/dist/react/store.d.ts +2 -2
- package/dist/react/store.js +109 -119
- package/dist/runtime/cancellation.d.ts +16 -0
- package/dist/runtime/cancellation.js +129 -0
- package/dist/runtime/deadline-transition-planner.d.ts +31 -0
- package/dist/runtime/deadline-transition-planner.js +139 -0
- package/dist/runtime/dispatch-effect.d.ts +3 -2
- package/dist/runtime/dispatch-effect.js +7 -13
- package/dist/runtime/errors.d.ts +51 -0
- package/dist/runtime/errors.js +39 -0
- package/dist/runtime/{runtime-helpers.d.ts → helpers.d.ts} +24 -4
- package/dist/runtime/{runtime-helpers.js → helpers.js} +56 -19
- package/dist/runtime/index.d.ts +3 -3
- package/dist/runtime/index.js +3 -3
- package/dist/runtime/ingress.d.ts +15 -0
- package/dist/runtime/ingress.js +42 -0
- package/dist/runtime/local-effect-executor.d.ts +21 -0
- package/dist/runtime/local-effect-executor.js +137 -0
- package/dist/runtime/looms.d.ts +22 -4
- package/dist/runtime/looms.js +54 -36
- package/dist/runtime/observer.d.ts +45 -0
- package/dist/runtime/observer.js +11 -0
- package/dist/runtime/repository.d.ts +55 -0
- package/dist/runtime/repository.js +278 -0
- package/dist/runtime/retry-policy.d.ts +16 -0
- package/dist/runtime/retry-policy.js +29 -0
- package/dist/runtime/run-execution-context.d.ts +30 -0
- package/dist/runtime/run-execution-context.js +56 -0
- package/dist/runtime/run-start.d.ts +4 -0
- package/dist/runtime/run-start.js +44 -0
- package/dist/runtime/runtime.d.ts +6 -87
- package/dist/runtime/runtime.js +233 -470
- package/dist/runtime/server/auth.d.ts +40 -0
- package/dist/runtime/server/auth.js +40 -0
- package/dist/runtime/server/fetch-handler.d.ts +14 -0
- package/dist/runtime/server/fetch-handler.js +51 -0
- package/dist/runtime/server/http.d.ts +37 -0
- package/dist/runtime/server/http.js +62 -0
- package/dist/runtime/server/route-table.d.ts +55 -0
- package/dist/runtime/server/route-table.js +74 -0
- package/dist/runtime/server/routes/effects.d.ts +3 -0
- package/dist/runtime/server/routes/effects.js +59 -0
- package/dist/runtime/server/routes/operations.d.ts +3 -0
- package/dist/runtime/server/routes/operations.js +14 -0
- package/dist/runtime/server/routes/runs.d.ts +3 -0
- package/dist/runtime/server/routes/runs.js +192 -0
- package/dist/runtime/server.d.ts +2 -8
- package/dist/runtime/server.js +4 -211
- package/dist/runtime/sse.d.ts +2 -1
- package/dist/runtime/sse.js +24 -17
- package/dist/runtime/types.d.ts +115 -0
- package/dist/runtime/types.js +1 -0
- package/dist/runtime/wake-engine.d.ts +20 -0
- package/dist/runtime/wake-engine.js +311 -0
- package/dist/runtime/wake-scheduler.d.ts +3 -4
- package/dist/runtime/wake-scheduler.js +25 -31
- package/dist/runtime/worker-callbacks.d.ts +16 -0
- package/dist/runtime/worker-callbacks.js +167 -0
- package/dist/runtime/worker-effect-dispatch.d.ts +36 -0
- package/dist/runtime/worker-effect-dispatch.js +126 -0
- package/dist/s2/config.d.ts +1 -1
- package/dist/s2/config.js +1 -1
- package/dist/s2/lite.js +70 -82
- package/dist/s2/pagination.d.ts +15 -0
- package/dist/s2/pagination.js +36 -0
- package/dist/s2/projector.js +6 -5
- package/dist/s2/snapshot-store.js +148 -163
- package/dist/s2/store.d.ts +3 -21
- package/dist/s2/store.js +71 -165
- package/dist/testing/index.d.ts +15 -0
- package/dist/testing/index.js +53 -16
- package/dist/workflow/definitions-store.d.ts +2 -3
- package/dist/workflow/definitions-store.js +2 -2
- package/dist/workflow/definitions.d.ts +78 -22
- package/dist/workflow/definitions.js +80 -14
- package/dist/workflow/effects.d.ts +453 -107
- package/dist/workflow/effects.js +214 -115
- package/dist/workflow/events.d.ts +149 -5
- package/dist/workflow/events.js +27 -5
- package/dist/workflow/graph.d.ts +56 -0
- package/dist/workflow/graph.js +207 -0
- package/dist/workflow/index.d.ts +1 -0
- package/dist/workflow/index.js +1 -0
- package/dist/workflow/module.d.ts +1047 -266
- package/dist/workflow/projections.d.ts +14 -12
- package/dist/workflow/projections.js +30 -8
- package/dist/workflow/scope.d.ts +146 -4
- package/dist/workflow/threads.d.ts +383 -155
- package/dist/workflow/threads.js +308 -110
- package/package.json +7 -2
- package/dist/runtime/events-api.d.ts +0 -4
- package/dist/runtime/events-api.js +0 -84
|
@@ -4,6 +4,13 @@ export declare const NodesProjectionSchema: Schema.Struct<{
|
|
|
4
4
|
readonly status: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"running">, Schema.Literal<"completed">, Schema.Literal<"failed">, Schema.Literal<"skipped">]>;
|
|
5
5
|
readonly result: Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
6
6
|
readonly error: Schema.NullOr<Schema.String>;
|
|
7
|
+
readonly attempts: Schema.optional<Schema.Finite>;
|
|
8
|
+
readonly branch: Schema.optional<Schema.String>;
|
|
9
|
+
readonly skipCause: Schema.optional<Schema.Union<readonly [Schema.Literal<"inactive">, Schema.Literal<"policy">]>>;
|
|
10
|
+
readonly iteration: Schema.optional<Schema.Struct<{
|
|
11
|
+
readonly index: Schema.Finite;
|
|
12
|
+
readonly previous: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
13
|
+
}>>;
|
|
7
14
|
}>>;
|
|
8
15
|
}>;
|
|
9
16
|
export type NodesProjectionState = Schema.Schema.Type<typeof NodesProjectionSchema>;
|
|
@@ -13,18 +20,13 @@ export declare const nodes: import("@swirls/looms/core").ProjectionDefinition<{
|
|
|
13
20
|
readonly status: "completed" | "failed" | "pending" | "running" | "skipped";
|
|
14
21
|
readonly result: Schema.Json;
|
|
15
22
|
readonly error: string | null;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
readonly error: string | null;
|
|
24
|
-
} | {
|
|
25
|
-
status: string;
|
|
26
|
-
result: string | number | boolean | Schema.JsonArray | Schema.JsonObject | null;
|
|
27
|
-
error: string | null;
|
|
23
|
+
readonly attempts?: number | undefined;
|
|
24
|
+
readonly branch?: string | undefined;
|
|
25
|
+
readonly skipCause?: "inactive" | "policy" | undefined;
|
|
26
|
+
readonly iteration?: {
|
|
27
|
+
readonly index: number;
|
|
28
|
+
readonly previous: Schema.Json;
|
|
29
|
+
} | undefined;
|
|
28
30
|
};
|
|
29
31
|
};
|
|
30
32
|
}>;
|
|
@@ -13,27 +13,49 @@ export const nodes = workflowModule.projection({
|
|
|
13
13
|
case 'workflow.node.started': {
|
|
14
14
|
const { nodeId } = event.payload;
|
|
15
15
|
return {
|
|
16
|
-
nodes: {
|
|
16
|
+
nodes: {
|
|
17
|
+
...state.nodes,
|
|
18
|
+
[nodeId]: {
|
|
19
|
+
status: 'running',
|
|
20
|
+
result: null,
|
|
21
|
+
error: null,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
17
24
|
};
|
|
18
25
|
}
|
|
19
26
|
case 'workflow.node.finished': {
|
|
20
|
-
const { nodeId, result, error } = event.payload;
|
|
27
|
+
const { nodeId, result, error, branch } = event.payload;
|
|
21
28
|
const failed = Predicate.isString(error) && error.length > 0;
|
|
29
|
+
const nodeState = branch === undefined
|
|
30
|
+
? {
|
|
31
|
+
status: failed ? 'failed' : 'completed',
|
|
32
|
+
result: result ?? null,
|
|
33
|
+
error: failed ? error : null,
|
|
34
|
+
}
|
|
35
|
+
: {
|
|
36
|
+
status: failed ? 'failed' : 'completed',
|
|
37
|
+
result: result ?? null,
|
|
38
|
+
error: failed ? error : null,
|
|
39
|
+
branch,
|
|
40
|
+
};
|
|
22
41
|
return {
|
|
23
42
|
nodes: {
|
|
24
43
|
...state.nodes,
|
|
25
|
-
[nodeId]:
|
|
26
|
-
status: failed ? 'failed' : 'completed',
|
|
27
|
-
result: result ?? null,
|
|
28
|
-
error: failed ? error : null,
|
|
29
|
-
},
|
|
44
|
+
[nodeId]: nodeState,
|
|
30
45
|
},
|
|
31
46
|
};
|
|
32
47
|
}
|
|
33
48
|
case 'workflow.node.skipped': {
|
|
34
49
|
const { nodeId } = event.payload;
|
|
35
50
|
return {
|
|
36
|
-
nodes: {
|
|
51
|
+
nodes: {
|
|
52
|
+
...state.nodes,
|
|
53
|
+
[nodeId]: {
|
|
54
|
+
status: 'skipped',
|
|
55
|
+
result: null,
|
|
56
|
+
error: null,
|
|
57
|
+
},
|
|
58
|
+
},
|
|
37
59
|
};
|
|
38
60
|
}
|
|
39
61
|
default:
|
package/dist/workflow/scope.d.ts
CHANGED
|
@@ -7,26 +7,97 @@ export declare const workflowModule: import("@swirls/looms/core").ModuleScope<"w
|
|
|
7
7
|
readonly nodeId: import("effect/Schema").String;
|
|
8
8
|
readonly result: import("effect/Schema").NullOr<import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>;
|
|
9
9
|
readonly error: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
10
|
+
readonly branch: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
10
11
|
}>;
|
|
11
12
|
'node.skipped': import("effect/Schema").Struct<{
|
|
12
13
|
readonly nodeId: import("effect/Schema").String;
|
|
13
14
|
readonly reason: import("effect/Schema").String;
|
|
15
|
+
readonly cause: import("effect/Schema").withDecodingDefaultKey<import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"inactive">, import("effect/Schema").Literal<"policy">]>, never>;
|
|
14
16
|
}>;
|
|
15
17
|
'spawn.requested': import("effect/Schema").Struct<{
|
|
16
18
|
readonly nodeId: import("effect/Schema").String;
|
|
19
|
+
readonly attempt: import("effect/Schema").withDecodingDefaultKey<import("effect/Schema").Finite, never>;
|
|
17
20
|
readonly childThreadId: import("effect/Schema").String;
|
|
18
21
|
readonly kind: import("effect/Schema").String;
|
|
19
22
|
readonly definitionName: import("effect/Schema").String;
|
|
23
|
+
readonly definitionVersion: import("effect/Schema").withDecodingDefaultKey<import("effect/Schema").String, never>;
|
|
20
24
|
readonly input: import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>;
|
|
25
|
+
readonly loopIndex: import("effect/Schema").withDecodingDefaultKey<import("effect/Schema").NullOr<import("effect/Schema").Finite>, never>;
|
|
26
|
+
}>;
|
|
27
|
+
'map.requested': import("effect/Schema").Struct<{
|
|
28
|
+
readonly nodeId: import("effect/Schema").String;
|
|
29
|
+
readonly attempt: import("effect/Schema").withDecodingDefaultKey<import("effect/Schema").Finite, never>;
|
|
30
|
+
readonly kind: import("effect/Schema").String;
|
|
31
|
+
readonly definitionName: import("effect/Schema").String;
|
|
32
|
+
readonly definitionVersion: import("effect/Schema").withDecodingDefaultKey<import("effect/Schema").String, never>;
|
|
33
|
+
readonly items: import("effect/Schema").$Array<import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>;
|
|
34
|
+
readonly concurrency: import("effect/Schema").Finite;
|
|
35
|
+
readonly limitBytes: import("effect/Schema").Finite;
|
|
21
36
|
}>;
|
|
22
37
|
'sleep.requested': import("effect/Schema").Struct<{
|
|
23
38
|
readonly nodeId: import("effect/Schema").String;
|
|
24
39
|
readonly waitId: import("effect/Schema").String;
|
|
25
|
-
readonly wakeAt: import("effect/Schema").
|
|
40
|
+
readonly wakeAt: import("effect/Schema").Finite;
|
|
26
41
|
}>;
|
|
27
42
|
'effects.requested': import("effect/Schema").Struct<{
|
|
28
43
|
readonly nodeId: import("effect/Schema").String;
|
|
29
|
-
readonly effects: import("effect/Schema").$Array<import("effect/Schema").
|
|
44
|
+
readonly effects: import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
45
|
+
readonly type: import("effect/Schema").Literal<"runtime.spawn">;
|
|
46
|
+
readonly childThreadId: import("effect/Schema").String;
|
|
47
|
+
readonly kind: import("effect/Schema").String;
|
|
48
|
+
readonly definitionName: import("effect/Schema").String;
|
|
49
|
+
readonly definitionVersion: import("effect/Schema").withDecodingDefaultKey<import("effect/Schema").String, never>;
|
|
50
|
+
readonly input: import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>;
|
|
51
|
+
}>, import("effect/Schema").Struct<{
|
|
52
|
+
readonly type: import("effect/Schema").Literal<"runtime.wait">;
|
|
53
|
+
readonly waitId: import("effect/Schema").String;
|
|
54
|
+
readonly on: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
55
|
+
readonly type: import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>]>;
|
|
56
|
+
readonly match: import("effect/Schema").optional<import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>;
|
|
57
|
+
}>, import("effect/Schema").Struct<{
|
|
58
|
+
readonly timerAt: import("effect/Schema").Finite;
|
|
59
|
+
}>]>;
|
|
60
|
+
readonly tag: import("effect/Schema").optional<import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>;
|
|
61
|
+
}>, import("effect/Schema").Struct<{
|
|
62
|
+
readonly type: import("effect/Schema").Literal<"runtime.emit">;
|
|
63
|
+
readonly event: import("effect/Schema").Struct<{
|
|
64
|
+
readonly type: import("effect/Schema").String;
|
|
65
|
+
readonly payload: import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>;
|
|
66
|
+
readonly threadId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
67
|
+
readonly parentThreadId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
68
|
+
readonly causationId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
69
|
+
readonly correlationId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
70
|
+
readonly effectId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
71
|
+
readonly origin: import("effect/Schema").optional<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
72
|
+
readonly type: import("effect/Schema").Literal<"thread">;
|
|
73
|
+
readonly threadId: import("effect/Schema").String;
|
|
74
|
+
}>, import("effect/Schema").Struct<{
|
|
75
|
+
readonly type: import("effect/Schema").Literal<"external">;
|
|
76
|
+
readonly actorId: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
77
|
+
}>, import("effect/Schema").Struct<{
|
|
78
|
+
readonly type: import("effect/Schema").Literal<"system">;
|
|
79
|
+
}>]>>;
|
|
80
|
+
readonly ephemeral: import("effect/Schema").optional<import("effect/Schema").Boolean>;
|
|
81
|
+
readonly id: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
82
|
+
readonly ts: import("effect/Schema").optional<import("effect/Schema").Finite>;
|
|
83
|
+
readonly idempotencyKey: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
84
|
+
}>;
|
|
85
|
+
readonly tag: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
86
|
+
}>, import("effect/Schema").Struct<{
|
|
87
|
+
readonly type: import("effect/Schema").Literal<"runtime.complete">;
|
|
88
|
+
readonly output: import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>;
|
|
89
|
+
}>, import("effect/Schema").Struct<{
|
|
90
|
+
readonly type: import("effect/Schema").Literal<"runtime.fail">;
|
|
91
|
+
readonly error: import("effect/Schema").String;
|
|
92
|
+
}>, import("effect/Schema").Struct<{
|
|
93
|
+
readonly type: import("effect/Schema").Literal<"runtime.cancel">;
|
|
94
|
+
readonly threadId: import("effect/Schema").String;
|
|
95
|
+
readonly tag: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
96
|
+
}>, import("effect/Schema").Struct<{
|
|
97
|
+
readonly type: import("effect/Schema").String;
|
|
98
|
+
readonly input: import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>;
|
|
99
|
+
readonly tag: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
100
|
+
}>]>>;
|
|
30
101
|
}>;
|
|
31
102
|
}>, undefined>, import("@swirls/looms/core").EventCatalog<"workflow", {
|
|
32
103
|
'node.started': import("effect/Schema").Struct<{
|
|
@@ -36,26 +107,97 @@ export declare const workflowModule: import("@swirls/looms/core").ModuleScope<"w
|
|
|
36
107
|
readonly nodeId: import("effect/Schema").String;
|
|
37
108
|
readonly result: import("effect/Schema").NullOr<import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>;
|
|
38
109
|
readonly error: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
110
|
+
readonly branch: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
39
111
|
}>;
|
|
40
112
|
'node.skipped': import("effect/Schema").Struct<{
|
|
41
113
|
readonly nodeId: import("effect/Schema").String;
|
|
42
114
|
readonly reason: import("effect/Schema").String;
|
|
115
|
+
readonly cause: import("effect/Schema").withDecodingDefaultKey<import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"inactive">, import("effect/Schema").Literal<"policy">]>, never>;
|
|
43
116
|
}>;
|
|
44
117
|
'spawn.requested': import("effect/Schema").Struct<{
|
|
45
118
|
readonly nodeId: import("effect/Schema").String;
|
|
119
|
+
readonly attempt: import("effect/Schema").withDecodingDefaultKey<import("effect/Schema").Finite, never>;
|
|
46
120
|
readonly childThreadId: import("effect/Schema").String;
|
|
47
121
|
readonly kind: import("effect/Schema").String;
|
|
48
122
|
readonly definitionName: import("effect/Schema").String;
|
|
123
|
+
readonly definitionVersion: import("effect/Schema").withDecodingDefaultKey<import("effect/Schema").String, never>;
|
|
49
124
|
readonly input: import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>;
|
|
125
|
+
readonly loopIndex: import("effect/Schema").withDecodingDefaultKey<import("effect/Schema").NullOr<import("effect/Schema").Finite>, never>;
|
|
126
|
+
}>;
|
|
127
|
+
'map.requested': import("effect/Schema").Struct<{
|
|
128
|
+
readonly nodeId: import("effect/Schema").String;
|
|
129
|
+
readonly attempt: import("effect/Schema").withDecodingDefaultKey<import("effect/Schema").Finite, never>;
|
|
130
|
+
readonly kind: import("effect/Schema").String;
|
|
131
|
+
readonly definitionName: import("effect/Schema").String;
|
|
132
|
+
readonly definitionVersion: import("effect/Schema").withDecodingDefaultKey<import("effect/Schema").String, never>;
|
|
133
|
+
readonly items: import("effect/Schema").$Array<import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>;
|
|
134
|
+
readonly concurrency: import("effect/Schema").Finite;
|
|
135
|
+
readonly limitBytes: import("effect/Schema").Finite;
|
|
50
136
|
}>;
|
|
51
137
|
'sleep.requested': import("effect/Schema").Struct<{
|
|
52
138
|
readonly nodeId: import("effect/Schema").String;
|
|
53
139
|
readonly waitId: import("effect/Schema").String;
|
|
54
|
-
readonly wakeAt: import("effect/Schema").
|
|
140
|
+
readonly wakeAt: import("effect/Schema").Finite;
|
|
55
141
|
}>;
|
|
56
142
|
'effects.requested': import("effect/Schema").Struct<{
|
|
57
143
|
readonly nodeId: import("effect/Schema").String;
|
|
58
|
-
readonly effects: import("effect/Schema").$Array<import("effect/Schema").
|
|
144
|
+
readonly effects: import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
145
|
+
readonly type: import("effect/Schema").Literal<"runtime.spawn">;
|
|
146
|
+
readonly childThreadId: import("effect/Schema").String;
|
|
147
|
+
readonly kind: import("effect/Schema").String;
|
|
148
|
+
readonly definitionName: import("effect/Schema").String;
|
|
149
|
+
readonly definitionVersion: import("effect/Schema").withDecodingDefaultKey<import("effect/Schema").String, never>;
|
|
150
|
+
readonly input: import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>;
|
|
151
|
+
}>, import("effect/Schema").Struct<{
|
|
152
|
+
readonly type: import("effect/Schema").Literal<"runtime.wait">;
|
|
153
|
+
readonly waitId: import("effect/Schema").String;
|
|
154
|
+
readonly on: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
155
|
+
readonly type: import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>]>;
|
|
156
|
+
readonly match: import("effect/Schema").optional<import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>;
|
|
157
|
+
}>, import("effect/Schema").Struct<{
|
|
158
|
+
readonly timerAt: import("effect/Schema").Finite;
|
|
159
|
+
}>]>;
|
|
160
|
+
readonly tag: import("effect/Schema").optional<import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>;
|
|
161
|
+
}>, import("effect/Schema").Struct<{
|
|
162
|
+
readonly type: import("effect/Schema").Literal<"runtime.emit">;
|
|
163
|
+
readonly event: import("effect/Schema").Struct<{
|
|
164
|
+
readonly type: import("effect/Schema").String;
|
|
165
|
+
readonly payload: import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>;
|
|
166
|
+
readonly threadId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
167
|
+
readonly parentThreadId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
168
|
+
readonly causationId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
169
|
+
readonly correlationId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
170
|
+
readonly effectId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
171
|
+
readonly origin: import("effect/Schema").optional<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
172
|
+
readonly type: import("effect/Schema").Literal<"thread">;
|
|
173
|
+
readonly threadId: import("effect/Schema").String;
|
|
174
|
+
}>, import("effect/Schema").Struct<{
|
|
175
|
+
readonly type: import("effect/Schema").Literal<"external">;
|
|
176
|
+
readonly actorId: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
177
|
+
}>, import("effect/Schema").Struct<{
|
|
178
|
+
readonly type: import("effect/Schema").Literal<"system">;
|
|
179
|
+
}>]>>;
|
|
180
|
+
readonly ephemeral: import("effect/Schema").optional<import("effect/Schema").Boolean>;
|
|
181
|
+
readonly id: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
182
|
+
readonly ts: import("effect/Schema").optional<import("effect/Schema").Finite>;
|
|
183
|
+
readonly idempotencyKey: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
184
|
+
}>;
|
|
185
|
+
readonly tag: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
186
|
+
}>, import("effect/Schema").Struct<{
|
|
187
|
+
readonly type: import("effect/Schema").Literal<"runtime.complete">;
|
|
188
|
+
readonly output: import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>;
|
|
189
|
+
}>, import("effect/Schema").Struct<{
|
|
190
|
+
readonly type: import("effect/Schema").Literal<"runtime.fail">;
|
|
191
|
+
readonly error: import("effect/Schema").String;
|
|
192
|
+
}>, import("effect/Schema").Struct<{
|
|
193
|
+
readonly type: import("effect/Schema").Literal<"runtime.cancel">;
|
|
194
|
+
readonly threadId: import("effect/Schema").String;
|
|
195
|
+
readonly tag: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
196
|
+
}>, import("effect/Schema").Struct<{
|
|
197
|
+
readonly type: import("effect/Schema").String;
|
|
198
|
+
readonly input: import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>;
|
|
199
|
+
readonly tag: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
200
|
+
}>]>>;
|
|
59
201
|
}>;
|
|
60
202
|
}>, undefined>;
|
|
61
203
|
export type WorkflowEvent = EventOf<typeof workflowModule>;
|