@swirls/looms 0.0.2 → 0.2.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 +24 -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 +57 -33
- 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/debugger/agent-chat.d.ts +2 -0
- package/dist/agent/debugger/agent-chat.js +176 -0
- package/dist/agent/debugger/index.d.ts +5 -0
- package/dist/agent/debugger/index.js +19 -0
- package/dist/agent/debugger/summarize.d.ts +2 -0
- package/dist/agent/debugger/summarize.js +51 -0
- package/dist/agent/debugger/token-usage.d.ts +3 -0
- package/dist/agent/debugger/token-usage.js +11 -0
- package/dist/agent/definitions-store.d.ts +2 -3
- package/dist/agent/definitions-store.js +2 -4
- package/dist/agent/definitions.d.ts +47 -29
- package/dist/agent/definitions.js +39 -12
- 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 +26 -1
- package/dist/agent/signals.js +79 -0
- package/dist/agent/threads.d.ts +3 -33
- package/dist/agent/threads.js +20 -25
- package/dist/agent/tool-schema.d.ts +1 -17
- package/dist/agent/tool-schema.js +3 -43
- 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 +36 -0
- package/dist/ai-vercel/vercel-evaluator.js +73 -0
- package/dist/ai-vercel/vercel-llm.js +64 -44
- package/dist/approval/debugger/approvals-view.d.ts +3 -0
- package/dist/approval/debugger/approvals-view.js +16 -0
- package/dist/approval/debugger/index.d.ts +4 -0
- package/dist/approval/debugger/index.js +11 -0
- package/dist/approval/debugger/summarize.d.ts +2 -0
- package/dist/approval/debugger/summarize.js +17 -0
- 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 +1213 -18
- package/dist/client/client.js +120 -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.d.ts +1 -1
- package/dist/cloudflare/router.js +15 -16
- 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 +19 -2
- package/dist/core/debugger-host.d.ts +16 -0
- package/dist/core/debugger-host.js +1 -0
- 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 +7 -1
- package/dist/core/index.js +6 -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 +18 -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/published.d.ts +43 -0
- package/dist/core/published.js +44 -0
- package/dist/core/replay.d.ts +312 -3
- package/dist/core/replay.js +11 -1
- package/dist/core/schema.d.ts +11 -20
- package/dist/core/schema.js +63 -80
- package/dist/core/serialize.js +2 -4
- package/dist/core/snapshot-store.d.ts +6 -1
- package/dist/core/snapshot-store.js +15 -2
- package/dist/core/snapshots.d.ts +5 -1
- package/dist/core/snapshots.js +10 -15
- package/dist/core/sqlite-store.js +95 -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/app/assets/index-B3Ah8WAE.css +2 -0
- package/dist/debugger/app/assets/index-Qb371t_O.js +22 -0
- package/dist/debugger/app/assets/rolldown-runtime-CbXtAM7H.js +1 -0
- package/dist/debugger/app/assets/routes-CjtEHgPQ.js +47 -0
- package/dist/debugger/app/index.html +14 -0
- package/dist/debugger/components/composer.d.ts +17 -0
- package/dist/debugger/components/composer.js +25 -0
- package/dist/debugger/components/debugger-split.d.ts +2 -1
- package/dist/debugger/components/debugger-split.js +2 -2
- package/dist/debugger/components/event-inspector.d.ts +2 -1
- package/dist/debugger/components/event-inspector.js +25 -16
- package/dist/debugger/components/event-stream.d.ts +2 -1
- package/dist/debugger/components/event-stream.js +14 -74
- package/dist/debugger/components/follow-list.d.ts +19 -0
- package/dist/debugger/components/follow-list.js +96 -0
- package/dist/debugger/components/json-tree.d.ts +11 -0
- package/dist/debugger/components/json-tree.js +120 -0
- package/dist/debugger/components/json-view.js +2 -2
- package/dist/debugger/components/run-tree.js +53 -20
- package/dist/debugger/components/status-dot.d.ts +4 -0
- package/dist/debugger/components/status-dot.js +6 -2
- package/dist/debugger/context.d.ts +14 -0
- package/dist/debugger/context.js +17 -0
- package/dist/debugger/contracts.d.ts +7 -4
- package/dist/debugger/events/builtin-families.d.ts +3 -0
- package/dist/debugger/events/builtin-families.js +9 -0
- package/dist/debugger/events/catalog.d.ts +3 -4
- package/dist/debugger/events/catalog.js +27 -17
- package/dist/debugger/events/protocol-summarize.d.ts +1 -2
- package/dist/debugger/events/protocol-summarize.js +42 -24
- package/dist/debugger/index.d.ts +20 -6
- package/dist/debugger/index.js +19 -5
- package/dist/debugger/lib/cn.d.ts +1 -0
- package/dist/debugger/lib/cn.js +3 -0
- package/dist/debugger/lib/event-meta.d.ts +2 -3
- package/dist/debugger/lib/event-meta.js +6 -12
- package/dist/debugger/lib/json.d.ts +25 -0
- package/dist/debugger/lib/json.js +87 -0
- package/dist/debugger/lib/payload.d.ts +7 -0
- package/dist/debugger/lib/payload.js +11 -0
- package/dist/debugger/lib/time.d.ts +3 -0
- package/dist/debugger/lib/time.js +24 -0
- package/dist/debugger/plugin.d.ts +36 -0
- package/dist/debugger/plugin.js +14 -0
- package/dist/debugger/server/index.d.ts +14 -0
- package/dist/debugger/server/index.js +114 -0
- package/dist/debugger/shell/debugger-shell.d.ts +15 -0
- package/dist/debugger/shell/debugger-shell.js +43 -0
- package/dist/debugger/shell/definition-key.d.ts +3 -0
- package/dist/debugger/shell/definition-key.js +4 -0
- package/dist/debugger/shell/events-pane.d.ts +12 -0
- package/dist/debugger/shell/events-pane.js +25 -0
- package/dist/debugger/shell/projections-panel.d.ts +4 -0
- package/dist/debugger/shell/projections-panel.js +59 -0
- package/dist/debugger/shell/run-controls.d.ts +4 -0
- package/dist/debugger/shell/run-controls.js +72 -0
- package/dist/debugger/shell/run-search.d.ts +6 -0
- package/dist/debugger/shell/run-search.js +102 -0
- package/dist/debugger/shell/run-type-menu.d.ts +6 -0
- package/dist/debugger/shell/run-type-menu.js +11 -0
- package/dist/debugger/shell/schema-form.d.ts +31 -0
- package/dist/debugger/shell/schema-form.js +117 -0
- package/dist/debugger/shell/start-form.d.ts +3 -0
- package/dist/debugger/shell/start-form.js +75 -0
- package/dist/debugger/shell/use-start-run.d.ts +14 -0
- package/dist/debugger/shell/use-start-run.js +32 -0
- package/dist/debugger/shell/workspace.d.ts +6 -0
- package/dist/debugger/shell/workspace.js +15 -0
- package/dist/debugger/styles.css +111 -27
- package/dist/debugger/ui/button.d.ts +24 -0
- package/dist/debugger/ui/button.js +24 -0
- package/dist/debugger/ui/command.d.ts +9 -0
- package/dist/debugger/ui/command.js +24 -0
- package/dist/debugger/ui/dropdown-menu.d.ts +13 -0
- package/dist/debugger/ui/dropdown-menu.js +37 -0
- package/dist/debugger/ui/panel.d.ts +14 -0
- package/dist/debugger/ui/panel.js +16 -0
- package/dist/debugger/ui/popover.d.ts +7 -0
- package/dist/debugger/ui/popover.js +17 -0
- package/dist/debugger/ui/resizable.d.ts +7 -0
- package/dist/debugger/ui/resizable.js +14 -0
- package/dist/debugger/ui/scroll-area.d.ts +2 -1
- package/dist/debugger/ui/scroll-area.js +5 -3
- package/dist/debugger/ui/select.d.ts +10 -0
- package/dist/debugger/ui/select.js +21 -0
- package/dist/debugger/ui/tabs.js +2 -2
- package/dist/debugger/ui/textarea.d.ts +3 -0
- package/dist/debugger/ui/textarea.js +7 -0
- 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 +3 -3
- 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 +30 -4
- package/dist/runtime/looms.js +57 -37
- 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 +293 -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 +248 -470
- package/dist/runtime/server/auth.d.ts +41 -0
- package/dist/runtime/server/auth.js +45 -0
- package/dist/runtime/server/debugger-host.d.ts +11 -0
- package/dist/runtime/server/debugger-host.js +32 -0
- package/dist/runtime/server/fetch-handler.d.ts +18 -0
- package/dist/runtime/server/fetch-handler.js +62 -0
- package/dist/runtime/server/http.d.ts +38 -0
- package/dist/runtime/server/http.js +66 -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/definitions.d.ts +3 -0
- package/dist/runtime/server/routes/definitions.js +20 -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 +199 -0
- package/dist/runtime/server.d.ts +4 -8
- package/dist/runtime/server.js +6 -211
- package/dist/runtime/sse.d.ts +2 -1
- package/dist/runtime/sse.js +24 -17
- package/dist/runtime/types.d.ts +117 -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 +188 -161
- 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/debugger/index.d.ts +4 -0
- package/dist/workflow/debugger/index.js +11 -0
- package/dist/workflow/debugger/nodes-view.d.ts +3 -0
- package/dist/workflow/debugger/nodes-view.js +13 -0
- package/dist/workflow/debugger/summarize.d.ts +2 -0
- package/dist/workflow/debugger/summarize.js +30 -0
- 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 +26 -2
- package/dist/debugger/events/domain-summarize.d.ts +0 -3
- package/dist/debugger/events/domain-summarize.js +0 -107
- package/dist/debugger/events/family.d.ts +0 -8
- package/dist/debugger/events/family.js +0 -44
- package/dist/runtime/events-api.d.ts +0 -4
- package/dist/runtime/events-api.js +0 -84
|
@@ -1,171 +1,399 @@
|
|
|
1
1
|
import { Schema } from 'effect';
|
|
2
|
-
import { type EventInput, type JsonValue, type RuntimeEffect } from '@swirls/looms/core';
|
|
3
|
-
import { type NodeState } from './definitions';
|
|
4
2
|
export { NodeStateSchema, NodeStatusSchema, type NodeState, type NodeStatus } from './definitions';
|
|
5
|
-
export
|
|
6
|
-
readonly childThreadId:
|
|
7
|
-
readonly kind:
|
|
8
|
-
readonly definitionName:
|
|
9
|
-
readonly
|
|
10
|
-
readonly
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
readonly
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
readonly
|
|
19
|
-
readonly
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
readonly
|
|
23
|
-
readonly
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
3
|
+
export declare const WorkflowPendingSpawnSchema: Schema.Struct<{
|
|
4
|
+
readonly childThreadId: Schema.String;
|
|
5
|
+
readonly kind: Schema.String;
|
|
6
|
+
readonly definitionName: Schema.String;
|
|
7
|
+
readonly definitionVersion: Schema.String;
|
|
8
|
+
readonly nodeId: Schema.String;
|
|
9
|
+
readonly attempt: Schema.withDecodingDefaultKey<Schema.Finite, never>;
|
|
10
|
+
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
11
|
+
readonly loopIndex: Schema.withDecodingDefaultKey<Schema.NullOr<Schema.Finite>, never>;
|
|
12
|
+
}>;
|
|
13
|
+
export type WorkflowPendingSpawn = Schema.Schema.Type<typeof WorkflowPendingSpawnSchema>;
|
|
14
|
+
export declare const WorkflowPendingMapSchema: Schema.Struct<{
|
|
15
|
+
readonly nodeId: Schema.String;
|
|
16
|
+
readonly attempt: Schema.withDecodingDefaultKey<Schema.Finite, never>;
|
|
17
|
+
readonly kind: Schema.String;
|
|
18
|
+
readonly definitionName: Schema.String;
|
|
19
|
+
readonly definitionVersion: Schema.String;
|
|
20
|
+
readonly items: Schema.$Array<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
21
|
+
readonly concurrency: Schema.Finite;
|
|
22
|
+
readonly limitBytes: Schema.Finite;
|
|
23
|
+
/** Items before this index have been started; later ones wait for a free slot. */
|
|
24
|
+
readonly nextIndex: Schema.Finite;
|
|
25
|
+
readonly outputs: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
26
|
+
}>;
|
|
27
|
+
export type WorkflowPendingMap = Schema.Schema.Type<typeof WorkflowPendingMapSchema>;
|
|
28
|
+
export declare const WorkflowPendingSleepSchema: Schema.Struct<{
|
|
29
|
+
readonly waitId: Schema.String;
|
|
30
|
+
readonly wakeAt: Schema.Finite;
|
|
31
|
+
readonly nodeId: Schema.String;
|
|
32
|
+
}>;
|
|
33
|
+
export type WorkflowPendingSleep = Schema.Schema.Type<typeof WorkflowPendingSleepSchema>;
|
|
34
|
+
export declare const WorkflowPendingEffectsSchema: Schema.Struct<{
|
|
35
|
+
readonly nodeId: Schema.String;
|
|
36
|
+
readonly effects: Schema.mutable<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
37
|
+
readonly type: Schema.Literal<"runtime.spawn">;
|
|
38
|
+
readonly childThreadId: Schema.String;
|
|
39
|
+
readonly kind: Schema.String;
|
|
40
|
+
readonly definitionName: Schema.String;
|
|
41
|
+
readonly definitionVersion: Schema.withDecodingDefaultKey<Schema.String, never>;
|
|
42
|
+
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
43
|
+
}>, Schema.Struct<{
|
|
44
|
+
readonly type: Schema.Literal<"runtime.wait">;
|
|
45
|
+
readonly waitId: Schema.String;
|
|
46
|
+
readonly on: Schema.Union<readonly [Schema.Struct<{
|
|
47
|
+
readonly type: Schema.Union<readonly [Schema.String, Schema.$Array<Schema.String>]>;
|
|
48
|
+
readonly match: Schema.optional<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
49
|
+
}>, Schema.Struct<{
|
|
50
|
+
readonly timerAt: Schema.Finite;
|
|
51
|
+
}>]>;
|
|
52
|
+
readonly tag: Schema.optional<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
53
|
+
}>, Schema.Struct<{
|
|
54
|
+
readonly type: Schema.Literal<"runtime.emit">;
|
|
55
|
+
readonly event: Schema.Struct<{
|
|
56
|
+
readonly type: Schema.String;
|
|
57
|
+
readonly payload: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
58
|
+
readonly threadId: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
59
|
+
readonly parentThreadId: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
60
|
+
readonly causationId: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
61
|
+
readonly correlationId: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
62
|
+
readonly effectId: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
63
|
+
readonly origin: Schema.optional<Schema.Union<readonly [Schema.Struct<{
|
|
64
|
+
readonly type: Schema.Literal<"thread">;
|
|
65
|
+
readonly threadId: Schema.String;
|
|
66
|
+
}>, Schema.Struct<{
|
|
67
|
+
readonly type: Schema.Literal<"external">;
|
|
68
|
+
readonly actorId: Schema.optional<Schema.String>;
|
|
69
|
+
}>, Schema.Struct<{
|
|
70
|
+
readonly type: Schema.Literal<"system">;
|
|
71
|
+
}>]>>;
|
|
72
|
+
readonly ephemeral: Schema.optional<Schema.Boolean>;
|
|
73
|
+
readonly id: Schema.optional<Schema.String>;
|
|
74
|
+
readonly ts: Schema.optional<Schema.Finite>;
|
|
75
|
+
readonly idempotencyKey: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
76
|
+
}>;
|
|
77
|
+
readonly tag: Schema.optional<Schema.String>;
|
|
78
|
+
}>, Schema.Struct<{
|
|
79
|
+
readonly type: Schema.Literal<"runtime.complete">;
|
|
80
|
+
readonly output: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
81
|
+
}>, Schema.Struct<{
|
|
82
|
+
readonly type: Schema.Literal<"runtime.fail">;
|
|
83
|
+
readonly error: Schema.String;
|
|
84
|
+
}>, Schema.Struct<{
|
|
85
|
+
readonly type: Schema.Literal<"runtime.cancel">;
|
|
86
|
+
readonly threadId: Schema.String;
|
|
87
|
+
readonly tag: Schema.optional<Schema.String>;
|
|
88
|
+
}>, Schema.Struct<{
|
|
89
|
+
readonly type: Schema.String;
|
|
90
|
+
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
91
|
+
readonly tag: Schema.optional<Schema.String>;
|
|
92
|
+
}>]>>>;
|
|
93
|
+
}>;
|
|
94
|
+
export type WorkflowPendingEffects = Schema.Schema.Type<typeof WorkflowPendingEffectsSchema>;
|
|
95
|
+
export declare const WorkflowPendingEmitSchema: Schema.Struct<{
|
|
96
|
+
readonly id: Schema.String;
|
|
97
|
+
readonly event: Schema.Struct<{
|
|
98
|
+
readonly type: Schema.String;
|
|
99
|
+
readonly payload: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
100
|
+
readonly threadId: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
101
|
+
readonly parentThreadId: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
102
|
+
readonly causationId: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
103
|
+
readonly correlationId: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
104
|
+
readonly effectId: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
105
|
+
readonly origin: Schema.optional<Schema.Union<readonly [Schema.Struct<{
|
|
106
|
+
readonly type: Schema.Literal<"thread">;
|
|
107
|
+
readonly threadId: Schema.String;
|
|
108
|
+
}>, Schema.Struct<{
|
|
109
|
+
readonly type: Schema.Literal<"external">;
|
|
110
|
+
readonly actorId: Schema.optional<Schema.String>;
|
|
111
|
+
}>, Schema.Struct<{
|
|
112
|
+
readonly type: Schema.Literal<"system">;
|
|
113
|
+
}>]>>;
|
|
114
|
+
readonly ephemeral: Schema.optional<Schema.Boolean>;
|
|
115
|
+
readonly id: Schema.optional<Schema.String>;
|
|
116
|
+
readonly ts: Schema.optional<Schema.Finite>;
|
|
117
|
+
readonly idempotencyKey: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
118
|
+
}>;
|
|
119
|
+
}>;
|
|
120
|
+
export type WorkflowPendingEmit = Schema.Schema.Type<typeof WorkflowPendingEmitSchema>;
|
|
121
|
+
export declare const WorkflowStateSchema: Schema.Struct<{
|
|
122
|
+
readonly definitionName: Schema.optional<Schema.String>;
|
|
123
|
+
readonly definitionVersion: Schema.optional<Schema.String>;
|
|
124
|
+
readonly nodes: Schema.$Record<Schema.String, Schema.Struct<{
|
|
125
|
+
readonly status: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"running">, Schema.Literal<"completed">, Schema.Literal<"failed">, Schema.Literal<"skipped">]>;
|
|
126
|
+
readonly result: Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
127
|
+
readonly error: Schema.NullOr<Schema.String>;
|
|
128
|
+
readonly attempts: Schema.optional<Schema.Finite>;
|
|
129
|
+
readonly branch: Schema.optional<Schema.String>;
|
|
130
|
+
readonly skipCause: Schema.optional<Schema.Union<readonly [Schema.Literal<"inactive">, Schema.Literal<"policy">]>>;
|
|
131
|
+
readonly iteration: Schema.optional<Schema.Struct<{
|
|
132
|
+
readonly index: Schema.Finite;
|
|
133
|
+
readonly previous: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
134
|
+
}>>;
|
|
135
|
+
}>>;
|
|
136
|
+
readonly concurrency: Schema.Finite;
|
|
137
|
+
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
138
|
+
readonly nodeIds: Schema.mutable<Schema.$Array<Schema.String>>;
|
|
139
|
+
readonly needsSchedule: Schema.Boolean;
|
|
140
|
+
readonly runningNodes: Schema.mutable<Schema.$Array<Schema.String>>;
|
|
141
|
+
readonly pendingSpawns: Schema.mutable<Schema.$Array<Schema.Struct<{
|
|
142
|
+
readonly childThreadId: Schema.String;
|
|
143
|
+
readonly kind: Schema.String;
|
|
144
|
+
readonly definitionName: Schema.String;
|
|
145
|
+
readonly definitionVersion: Schema.String;
|
|
146
|
+
readonly nodeId: Schema.String;
|
|
147
|
+
readonly attempt: Schema.withDecodingDefaultKey<Schema.Finite, never>;
|
|
148
|
+
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
149
|
+
readonly loopIndex: Schema.withDecodingDefaultKey<Schema.NullOr<Schema.Finite>, never>;
|
|
150
|
+
}>>>;
|
|
151
|
+
readonly pendingMaps: Schema.withDecodingDefaultKey<Schema.mutable<Schema.$Array<Schema.Struct<{
|
|
152
|
+
readonly nodeId: Schema.String;
|
|
153
|
+
readonly attempt: Schema.withDecodingDefaultKey<Schema.Finite, never>;
|
|
154
|
+
readonly kind: Schema.String;
|
|
155
|
+
readonly definitionName: Schema.String;
|
|
156
|
+
readonly definitionVersion: Schema.String;
|
|
157
|
+
readonly items: Schema.$Array<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
158
|
+
readonly concurrency: Schema.Finite;
|
|
159
|
+
readonly limitBytes: Schema.Finite;
|
|
160
|
+
/** Items before this index have been started; later ones wait for a free slot. */
|
|
161
|
+
readonly nextIndex: Schema.Finite;
|
|
162
|
+
readonly outputs: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
163
|
+
}>>>, never>;
|
|
164
|
+
readonly pendingSleeps: Schema.mutable<Schema.$Array<Schema.Struct<{
|
|
165
|
+
readonly waitId: Schema.String;
|
|
166
|
+
readonly wakeAt: Schema.Finite;
|
|
167
|
+
readonly nodeId: Schema.String;
|
|
168
|
+
}>>>;
|
|
169
|
+
readonly pendingEffects: Schema.mutable<Schema.$Array<Schema.Struct<{
|
|
170
|
+
readonly nodeId: Schema.String;
|
|
171
|
+
readonly effects: Schema.mutable<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
172
|
+
readonly type: Schema.Literal<"runtime.spawn">;
|
|
173
|
+
readonly childThreadId: Schema.String;
|
|
174
|
+
readonly kind: Schema.String;
|
|
175
|
+
readonly definitionName: Schema.String;
|
|
176
|
+
readonly definitionVersion: Schema.withDecodingDefaultKey<Schema.String, never>;
|
|
177
|
+
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
178
|
+
}>, Schema.Struct<{
|
|
179
|
+
readonly type: Schema.Literal<"runtime.wait">;
|
|
180
|
+
readonly waitId: Schema.String;
|
|
181
|
+
readonly on: Schema.Union<readonly [Schema.Struct<{
|
|
182
|
+
readonly type: Schema.Union<readonly [Schema.String, Schema.$Array<Schema.String>]>;
|
|
183
|
+
readonly match: Schema.optional<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
184
|
+
}>, Schema.Struct<{
|
|
185
|
+
readonly timerAt: Schema.Finite;
|
|
186
|
+
}>]>;
|
|
187
|
+
readonly tag: Schema.optional<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
188
|
+
}>, Schema.Struct<{
|
|
189
|
+
readonly type: Schema.Literal<"runtime.emit">;
|
|
190
|
+
readonly event: Schema.Struct<{
|
|
191
|
+
readonly type: Schema.String;
|
|
192
|
+
readonly payload: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
193
|
+
readonly threadId: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
194
|
+
readonly parentThreadId: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
195
|
+
readonly causationId: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
196
|
+
readonly correlationId: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
197
|
+
readonly effectId: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
198
|
+
readonly origin: Schema.optional<Schema.Union<readonly [Schema.Struct<{
|
|
199
|
+
readonly type: Schema.Literal<"thread">;
|
|
200
|
+
readonly threadId: Schema.String;
|
|
201
|
+
}>, Schema.Struct<{
|
|
202
|
+
readonly type: Schema.Literal<"external">;
|
|
203
|
+
readonly actorId: Schema.optional<Schema.String>;
|
|
204
|
+
}>, Schema.Struct<{
|
|
205
|
+
readonly type: Schema.Literal<"system">;
|
|
206
|
+
}>]>>;
|
|
207
|
+
readonly ephemeral: Schema.optional<Schema.Boolean>;
|
|
208
|
+
readonly id: Schema.optional<Schema.String>;
|
|
209
|
+
readonly ts: Schema.optional<Schema.Finite>;
|
|
210
|
+
readonly idempotencyKey: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
211
|
+
}>;
|
|
212
|
+
readonly tag: Schema.optional<Schema.String>;
|
|
213
|
+
}>, Schema.Struct<{
|
|
214
|
+
readonly type: Schema.Literal<"runtime.complete">;
|
|
215
|
+
readonly output: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
216
|
+
}>, Schema.Struct<{
|
|
217
|
+
readonly type: Schema.Literal<"runtime.fail">;
|
|
218
|
+
readonly error: Schema.String;
|
|
219
|
+
}>, Schema.Struct<{
|
|
220
|
+
readonly type: Schema.Literal<"runtime.cancel">;
|
|
221
|
+
readonly threadId: Schema.String;
|
|
222
|
+
readonly tag: Schema.optional<Schema.String>;
|
|
223
|
+
}>, Schema.Struct<{
|
|
224
|
+
readonly type: Schema.String;
|
|
225
|
+
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
226
|
+
readonly tag: Schema.optional<Schema.String>;
|
|
227
|
+
}>]>>>;
|
|
228
|
+
}>>>;
|
|
229
|
+
readonly pendingEmits: Schema.mutable<Schema.$Array<Schema.Struct<{
|
|
230
|
+
readonly id: Schema.String;
|
|
231
|
+
readonly event: Schema.Struct<{
|
|
232
|
+
readonly type: Schema.String;
|
|
233
|
+
readonly payload: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
234
|
+
readonly threadId: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
235
|
+
readonly parentThreadId: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
236
|
+
readonly causationId: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
237
|
+
readonly correlationId: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
238
|
+
readonly effectId: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
239
|
+
readonly origin: Schema.optional<Schema.Union<readonly [Schema.Struct<{
|
|
240
|
+
readonly type: Schema.Literal<"thread">;
|
|
241
|
+
readonly threadId: Schema.String;
|
|
242
|
+
}>, Schema.Struct<{
|
|
243
|
+
readonly type: Schema.Literal<"external">;
|
|
244
|
+
readonly actorId: Schema.optional<Schema.String>;
|
|
245
|
+
}>, Schema.Struct<{
|
|
246
|
+
readonly type: Schema.Literal<"system">;
|
|
247
|
+
}>]>>;
|
|
248
|
+
readonly ephemeral: Schema.optional<Schema.Boolean>;
|
|
249
|
+
readonly id: Schema.optional<Schema.String>;
|
|
250
|
+
readonly ts: Schema.optional<Schema.Finite>;
|
|
251
|
+
readonly idempotencyKey: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
252
|
+
}>;
|
|
253
|
+
}>>>;
|
|
254
|
+
/** Children of stopped nodes that were still running; each is cancelled once. */
|
|
255
|
+
readonly pendingCancels: Schema.withDecodingDefaultKey<Schema.mutable<Schema.$Array<Schema.String>>, never>;
|
|
256
|
+
readonly status: Schema.Union<readonly [Schema.Literal<"running">, Schema.Literal<"completed">, Schema.Literal<"failed">]>;
|
|
257
|
+
readonly error: Schema.NullOr<Schema.String>;
|
|
258
|
+
}>;
|
|
259
|
+
export type WorkflowState = Schema.Schema.Type<typeof WorkflowStateSchema>;
|
|
43
260
|
export declare const workflowThread: import("@swirls/looms/core").ThreadDefinition<{
|
|
44
|
-
definitionName?: string;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
nodes: {
|
|
49
|
-
[x: string]: {
|
|
261
|
+
readonly definitionName?: string | undefined;
|
|
262
|
+
readonly definitionVersion?: string | undefined;
|
|
263
|
+
readonly nodes: {
|
|
264
|
+
readonly [x: string]: {
|
|
50
265
|
readonly status: "completed" | "failed" | "pending" | "running" | "skipped";
|
|
51
266
|
readonly result: Schema.Json;
|
|
52
267
|
readonly error: string | null;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
268
|
+
readonly attempts?: number | undefined;
|
|
269
|
+
readonly branch?: string | undefined;
|
|
270
|
+
readonly skipCause?: "inactive" | "policy" | undefined;
|
|
271
|
+
readonly iteration?: {
|
|
272
|
+
readonly index: number;
|
|
273
|
+
readonly previous: Schema.Json;
|
|
274
|
+
} | undefined;
|
|
57
275
|
};
|
|
58
276
|
};
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
277
|
+
readonly concurrency: number;
|
|
278
|
+
readonly input: Schema.Json;
|
|
279
|
+
readonly nodeIds: string[];
|
|
280
|
+
readonly needsSchedule: boolean;
|
|
281
|
+
readonly runningNodes: string[];
|
|
282
|
+
readonly pendingSpawns: {
|
|
283
|
+
readonly childThreadId: string;
|
|
284
|
+
readonly kind: string;
|
|
285
|
+
readonly definitionName: string;
|
|
286
|
+
readonly definitionVersion: string;
|
|
287
|
+
readonly nodeId: string;
|
|
288
|
+
readonly attempt: number;
|
|
289
|
+
readonly input: Schema.Json;
|
|
290
|
+
readonly loopIndex: number | null;
|
|
291
|
+
}[];
|
|
292
|
+
readonly pendingMaps: {
|
|
293
|
+
readonly nodeId: string;
|
|
294
|
+
readonly attempt: number;
|
|
295
|
+
readonly kind: string;
|
|
296
|
+
readonly definitionName: string;
|
|
297
|
+
readonly definitionVersion: string;
|
|
298
|
+
readonly items: readonly Schema.Json[];
|
|
299
|
+
readonly concurrency: number;
|
|
300
|
+
readonly limitBytes: number;
|
|
301
|
+
readonly nextIndex: number;
|
|
302
|
+
readonly outputs: {
|
|
303
|
+
readonly [x: string]: Schema.Json;
|
|
304
|
+
};
|
|
305
|
+
}[];
|
|
306
|
+
readonly pendingSleeps: {
|
|
307
|
+
readonly waitId: string;
|
|
308
|
+
readonly wakeAt: number;
|
|
309
|
+
readonly nodeId: string;
|
|
310
|
+
}[];
|
|
311
|
+
readonly pendingEffects: {
|
|
312
|
+
readonly nodeId: string;
|
|
313
|
+
readonly effects: ({
|
|
314
|
+
readonly type: "runtime.spawn";
|
|
315
|
+
readonly childThreadId: string;
|
|
316
|
+
readonly kind: string;
|
|
317
|
+
readonly definitionName: string;
|
|
318
|
+
readonly definitionVersion: string;
|
|
319
|
+
readonly input: Schema.Json;
|
|
320
|
+
} | {
|
|
321
|
+
readonly type: "runtime.wait";
|
|
322
|
+
readonly waitId: string;
|
|
323
|
+
readonly on: {
|
|
324
|
+
readonly type: string | readonly string[];
|
|
325
|
+
readonly match?: Schema.Json | undefined;
|
|
326
|
+
} | {
|
|
327
|
+
readonly timerAt: number;
|
|
90
328
|
};
|
|
329
|
+
readonly tag?: Schema.Json | undefined;
|
|
91
330
|
} | {
|
|
92
|
-
type:
|
|
93
|
-
|
|
94
|
-
|
|
331
|
+
readonly type: "runtime.emit";
|
|
332
|
+
readonly event: {
|
|
333
|
+
readonly type: string;
|
|
334
|
+
readonly payload: Schema.Json;
|
|
335
|
+
readonly threadId?: string | null | undefined;
|
|
336
|
+
readonly parentThreadId?: string | null | undefined;
|
|
337
|
+
readonly causationId?: string | null | undefined;
|
|
338
|
+
readonly correlationId?: string | null | undefined;
|
|
339
|
+
readonly effectId?: string | null | undefined;
|
|
340
|
+
readonly origin?: {
|
|
341
|
+
readonly type: "thread";
|
|
342
|
+
readonly threadId: string;
|
|
343
|
+
} | {
|
|
344
|
+
readonly type: "external";
|
|
345
|
+
readonly actorId?: string | undefined;
|
|
346
|
+
} | {
|
|
347
|
+
readonly type: "system";
|
|
348
|
+
} | undefined;
|
|
349
|
+
readonly ephemeral?: boolean | undefined;
|
|
350
|
+
readonly id?: string | undefined;
|
|
351
|
+
readonly ts?: number | undefined;
|
|
352
|
+
readonly idempotencyKey?: string | null | undefined;
|
|
353
|
+
};
|
|
354
|
+
readonly tag?: string | undefined;
|
|
95
355
|
} | {
|
|
96
|
-
type:
|
|
97
|
-
output:
|
|
98
|
-
tag: string;
|
|
356
|
+
readonly type: "runtime.complete";
|
|
357
|
+
readonly output: Schema.Json;
|
|
99
358
|
} | {
|
|
100
|
-
type:
|
|
101
|
-
|
|
102
|
-
tag: string;
|
|
359
|
+
readonly type: "runtime.fail";
|
|
360
|
+
readonly error: string;
|
|
103
361
|
} | {
|
|
104
|
-
type:
|
|
105
|
-
|
|
106
|
-
tag
|
|
107
|
-
})[];
|
|
108
|
-
})[];
|
|
109
|
-
} | {
|
|
110
|
-
definitionName?: string;
|
|
111
|
-
concurrency: number;
|
|
112
|
-
input: JsonValue;
|
|
113
|
-
nodeIds: string[];
|
|
114
|
-
needsSchedule: boolean;
|
|
115
|
-
status: 'running' | 'completed' | 'failed';
|
|
116
|
-
error: string | null;
|
|
117
|
-
nodes: {
|
|
118
|
-
[x: string]: {
|
|
119
|
-
readonly status: "completed" | "failed" | "pending" | "running" | "skipped";
|
|
120
|
-
readonly result: Schema.Json;
|
|
121
|
-
readonly error: string | null;
|
|
362
|
+
readonly type: "runtime.cancel";
|
|
363
|
+
readonly threadId: string;
|
|
364
|
+
readonly tag?: string | undefined;
|
|
122
365
|
} | {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
};
|
|
127
|
-
};
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
} | {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
nodeIds: string[];
|
|
152
|
-
needsSchedule: boolean;
|
|
153
|
-
runningNodes: string[];
|
|
154
|
-
status: 'running' | 'completed' | 'failed';
|
|
155
|
-
error: string | null;
|
|
156
|
-
pendingSpawns: WorkflowPendingSpawn[];
|
|
157
|
-
pendingSleeps: WorkflowPendingSleep[];
|
|
158
|
-
pendingEffects: WorkflowPendingEffects[];
|
|
159
|
-
pendingEmits: (WorkflowPendingEmit | {
|
|
160
|
-
id: string;
|
|
161
|
-
event: {
|
|
162
|
-
type: string;
|
|
163
|
-
payload: {
|
|
164
|
-
nodeId: string;
|
|
165
|
-
result: string | number | boolean | import("@swirls/looms/core").JsonObject | readonly JsonValue[] | null;
|
|
166
|
-
error: string | null;
|
|
167
|
-
};
|
|
168
|
-
threadId: string;
|
|
366
|
+
readonly type: string;
|
|
367
|
+
readonly input: Schema.Json;
|
|
368
|
+
readonly tag?: string | undefined;
|
|
369
|
+
})[];
|
|
370
|
+
}[];
|
|
371
|
+
readonly pendingEmits: {
|
|
372
|
+
readonly id: string;
|
|
373
|
+
readonly event: {
|
|
374
|
+
readonly type: string;
|
|
375
|
+
readonly payload: Schema.Json;
|
|
376
|
+
readonly threadId?: string | null | undefined;
|
|
377
|
+
readonly parentThreadId?: string | null | undefined;
|
|
378
|
+
readonly causationId?: string | null | undefined;
|
|
379
|
+
readonly correlationId?: string | null | undefined;
|
|
380
|
+
readonly effectId?: string | null | undefined;
|
|
381
|
+
readonly origin?: {
|
|
382
|
+
readonly type: "thread";
|
|
383
|
+
readonly threadId: string;
|
|
384
|
+
} | {
|
|
385
|
+
readonly type: "external";
|
|
386
|
+
readonly actorId?: string | undefined;
|
|
387
|
+
} | {
|
|
388
|
+
readonly type: "system";
|
|
389
|
+
} | undefined;
|
|
390
|
+
readonly ephemeral?: boolean | undefined;
|
|
391
|
+
readonly id?: string | undefined;
|
|
392
|
+
readonly ts?: number | undefined;
|
|
393
|
+
readonly idempotencyKey?: string | null | undefined;
|
|
169
394
|
};
|
|
170
|
-
}
|
|
395
|
+
}[];
|
|
396
|
+
readonly pendingCancels: string[];
|
|
397
|
+
readonly status: "completed" | "failed" | "running";
|
|
398
|
+
readonly error: string | null;
|
|
171
399
|
}>;
|