@pgflow/core 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/package.json +6 -2
  2. package/CHANGELOG.md +0 -9
  3. package/__tests__/mocks/index.ts +0 -1
  4. package/__tests__/mocks/postgres.ts +0 -37
  5. package/__tests__/types/PgflowSqlClient.test-d.ts +0 -59
  6. package/docs/options_for_flow_and_steps.md +0 -75
  7. package/docs/pgflow-blob-reference-system.md +0 -179
  8. package/eslint.config.cjs +0 -22
  9. package/example-flow.mermaid +0 -5
  10. package/example-flow.svg +0 -1
  11. package/flow-lifecycle.mermaid +0 -83
  12. package/flow-lifecycle.svg +0 -1
  13. package/out-tsc/vitest/__tests__/mocks/index.d.ts +0 -2
  14. package/out-tsc/vitest/__tests__/mocks/index.d.ts.map +0 -1
  15. package/out-tsc/vitest/__tests__/mocks/postgres.d.ts +0 -15
  16. package/out-tsc/vitest/__tests__/mocks/postgres.d.ts.map +0 -1
  17. package/out-tsc/vitest/__tests__/types/PgflowSqlClient.test-d.d.ts +0 -2
  18. package/out-tsc/vitest/__tests__/types/PgflowSqlClient.test-d.d.ts.map +0 -1
  19. package/out-tsc/vitest/tsconfig.spec.tsbuildinfo +0 -1
  20. package/out-tsc/vitest/vite.config.d.ts +0 -3
  21. package/out-tsc/vitest/vite.config.d.ts.map +0 -1
  22. package/pkgs/core/dist/index.js +0 -54
  23. package/pkgs/core/dist/pkgs/core/LICENSE.md +0 -660
  24. package/pkgs/core/dist/pkgs/core/README.md +0 -373
  25. package/pkgs/dsl/dist/index.js +0 -123
  26. package/pkgs/dsl/dist/pkgs/dsl/README.md +0 -11
  27. package/pkgs/edge-worker/dist/index.js +0 -953
  28. package/pkgs/edge-worker/dist/index.js.map +0 -7
  29. package/pkgs/edge-worker/dist/pkgs/edge-worker/LICENSE.md +0 -660
  30. package/pkgs/edge-worker/dist/pkgs/edge-worker/README.md +0 -46
  31. package/pkgs/example-flows/dist/index.js +0 -152
  32. package/pkgs/example-flows/dist/pkgs/example-flows/README.md +0 -11
  33. package/project.json +0 -125
  34. package/prompts/architect.md +0 -87
  35. package/prompts/condition.md +0 -33
  36. package/prompts/declarative_sql.md +0 -15
  37. package/prompts/deps_in_payloads.md +0 -20
  38. package/prompts/dsl-multi-arg.ts +0 -48
  39. package/prompts/dsl-options.md +0 -39
  40. package/prompts/dsl-single-arg.ts +0 -51
  41. package/prompts/dsl-two-arg.ts +0 -61
  42. package/prompts/dsl.md +0 -119
  43. package/prompts/fanout_steps.md +0 -1
  44. package/prompts/json_schemas.md +0 -36
  45. package/prompts/one_shot.md +0 -286
  46. package/prompts/pgtap.md +0 -229
  47. package/prompts/sdk.md +0 -59
  48. package/prompts/step_types.md +0 -62
  49. package/prompts/versioning.md +0 -16
  50. package/queries/fail_permanently.sql +0 -17
  51. package/queries/fail_task.sql +0 -21
  52. package/queries/sequential.sql +0 -47
  53. package/queries/two_roots_left_right.sql +0 -59
  54. package/schema.svg +0 -1
  55. package/scripts/colorize-pgtap-output.awk +0 -72
  56. package/scripts/run-test-with-colors +0 -5
  57. package/scripts/watch-test +0 -7
  58. package/src/PgflowSqlClient.ts +0 -85
  59. package/src/database-types.ts +0 -759
  60. package/src/index.ts +0 -3
  61. package/src/types.ts +0 -103
  62. package/supabase/config.toml +0 -32
  63. package/supabase/seed.sql +0 -202
  64. package/supabase/tests/add_step/basic_step_addition.test.sql +0 -29
  65. package/supabase/tests/add_step/circular_dependency.test.sql +0 -21
  66. package/supabase/tests/add_step/flow_isolation.test.sql +0 -26
  67. package/supabase/tests/add_step/idempotent_step_addition.test.sql +0 -20
  68. package/supabase/tests/add_step/invalid_step_slug.test.sql +0 -16
  69. package/supabase/tests/add_step/nonexistent_dependency.test.sql +0 -16
  70. package/supabase/tests/add_step/nonexistent_flow.test.sql +0 -13
  71. package/supabase/tests/add_step/options.test.sql +0 -66
  72. package/supabase/tests/add_step/step_with_dependency.test.sql +0 -36
  73. package/supabase/tests/add_step/step_with_multiple_dependencies.test.sql +0 -46
  74. package/supabase/tests/complete_task/archives_message.test.sql +0 -67
  75. package/supabase/tests/complete_task/completes_run_if_no_more_remaining_steps.test.sql +0 -62
  76. package/supabase/tests/complete_task/completes_task_and_updates_dependents.test.sql +0 -64
  77. package/supabase/tests/complete_task/decrements_remaining_steps_if_completing_step.test.sql +0 -62
  78. package/supabase/tests/complete_task/saves_output_when_completing_run.test.sql +0 -57
  79. package/supabase/tests/create_flow/flow_creation.test.sql +0 -27
  80. package/supabase/tests/create_flow/idempotency_and_duplicates.test.sql +0 -26
  81. package/supabase/tests/create_flow/invalid_slug.test.sql +0 -13
  82. package/supabase/tests/create_flow/options.test.sql +0 -57
  83. package/supabase/tests/fail_task/exponential_backoff.test.sql +0 -70
  84. package/supabase/tests/fail_task/mark_as_failed_if_no_retries_available.test.sql +0 -49
  85. package/supabase/tests/fail_task/respects_flow_retry_settings.test.sql +0 -48
  86. package/supabase/tests/fail_task/respects_step_retry_settings.test.sql +0 -48
  87. package/supabase/tests/fail_task/retry_task_if_retries_available.test.sql +0 -39
  88. package/supabase/tests/is_valid_slug.test.sql +0 -72
  89. package/supabase/tests/poll_for_tasks/builds_proper_input_from_deps_outputs.test.sql +0 -35
  90. package/supabase/tests/poll_for_tasks/hides_messages.test.sql +0 -35
  91. package/supabase/tests/poll_for_tasks/increments_attempts_count.test.sql +0 -35
  92. package/supabase/tests/poll_for_tasks/multiple_task_processing.test.sql +0 -24
  93. package/supabase/tests/poll_for_tasks/polls_only_queued_tasks.test.sql +0 -35
  94. package/supabase/tests/poll_for_tasks/reads_messages.test.sql +0 -38
  95. package/supabase/tests/poll_for_tasks/returns_no_tasks_if_no_step_task_for_message.test.sql +0 -34
  96. package/supabase/tests/poll_for_tasks/returns_no_tasks_if_queue_is_empty.test.sql +0 -19
  97. package/supabase/tests/poll_for_tasks/returns_no_tasks_when_qty_set_to_0.test.sql +0 -22
  98. package/supabase/tests/poll_for_tasks/sets_vt_delay_based_on_opt_timeout.test.sql +0 -41
  99. package/supabase/tests/poll_for_tasks/tasks_reapppear_if_not_processed_in_time.test.sql +0 -59
  100. package/supabase/tests/start_flow/creates_run.test.sql +0 -24
  101. package/supabase/tests/start_flow/creates_step_states_for_all_steps.test.sql +0 -25
  102. package/supabase/tests/start_flow/creates_step_tasks_only_for_root_steps.test.sql +0 -54
  103. package/supabase/tests/start_flow/returns_run.test.sql +0 -24
  104. package/supabase/tests/start_flow/sends_messages_on_the_queue.test.sql +0 -50
  105. package/supabase/tests/start_flow/starts_only_root_steps.test.sql +0 -21
  106. package/supabase/tests/step_dsl_is_idempotent.test.sql +0 -34
  107. package/tsconfig.json +0 -16
  108. package/tsconfig.lib.json +0 -26
  109. package/tsconfig.spec.json +0 -35
  110. package/vite.config.ts +0 -57
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pgflow/core",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "license": "AGPL-3.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -13,6 +13,10 @@
13
13
  "import": "./dist/index.js"
14
14
  }
15
15
  },
16
+ "files": [
17
+ "dist",
18
+ "supabase/migrations/*.sql"
19
+ ],
16
20
  "types": "./dist/index.d.ts",
17
21
  "module": "./dist/index.js",
18
22
  "devDependencies": {
@@ -21,7 +25,7 @@
21
25
  },
22
26
  "dependencies": {
23
27
  "postgres": "^3.4.5",
24
- "@pgflow/dsl": "^0.0.5"
28
+ "@pgflow/dsl": "^0.0.6"
25
29
  },
26
30
  "publishConfig": {
27
31
  "access": "public"
package/CHANGELOG.md DELETED
@@ -1,9 +0,0 @@
1
- # @pgflow/core
2
-
3
- ## 0.0.5
4
-
5
- ### Patch Changes
6
-
7
- - 196f7d8: Test patch bump
8
- - Updated dependencies [b4b0809]
9
- - @pgflow/dsl@0.0.5
@@ -1 +0,0 @@
1
- export * from './postgres.ts';
@@ -1,37 +0,0 @@
1
- import { vi } from 'vitest';
2
-
3
- /**
4
- * Mock implementation for the postgres module
5
- * This prevents real database connections during tests
6
- */
7
- export function setupPostgresMock() {
8
- // Create a properly typed SQL client with methods
9
- type SqlClient = {
10
- (strings: TemplateStringsArray, ...values: unknown[]): Promise<unknown[]>;
11
- json: (data: unknown) => string;
12
- begin: () => Promise<void>;
13
- commit: () => Promise<void>;
14
- rollback: () => Promise<void>;
15
- end: () => Promise<void>;
16
- };
17
-
18
- // Create the main postgres function that returns the SQL client
19
- const sql = vi.fn(() => {
20
- // Create a complete mock SQL client with all required methods
21
- const sqlClient = Object.assign(
22
- vi.fn(() => Promise.resolve(['empty response'])),
23
- {
24
- json: vi.fn((data: unknown) => JSON.stringify(data)),
25
- begin: vi.fn(() => Promise.resolve()),
26
- commit: vi.fn(() => Promise.resolve()),
27
- rollback: vi.fn(() => Promise.resolve()),
28
- end: vi.fn(() => Promise.resolve()),
29
- }
30
- ) as SqlClient;
31
-
32
- return sqlClient;
33
- });
34
-
35
- // Return an object with a default key since postgres is imported as a default export
36
- return { default: sql };
37
- }
@@ -1,59 +0,0 @@
1
- import { describe, it, expectTypeOf, vi, beforeEach } from 'vitest';
2
- import { setupPostgresMock } from '../mocks/postgres.ts';
3
-
4
- // Mock the postgres module so that it never makes a real connection.
5
- // This must come before the postgres import
6
- vi.mock('postgres', () => {
7
- return setupPostgresMock();
8
- });
9
-
10
- import { PgflowSqlClient } from '../../src/PgflowSqlClient.ts';
11
- import type { Json, StepTaskKey } from '../../src/types.ts';
12
- import postgres from 'postgres';
13
- import { Flow } from '@pgflow/dsl';
14
-
15
- describe('PgflowSqlClient Type Compatibility with Flow', () => {
16
- beforeEach(() => {
17
- vi.clearAllMocks();
18
- });
19
-
20
- it('should properly type IPgflowClient methods', () => {
21
- // Arrange
22
- const sql = postgres();
23
- const flow = new Flow<{ url: string }>({ slug: 'test_flow' });
24
- const client = new PgflowSqlClient<typeof flow>(sql);
25
-
26
- // Check pollForTasks method types
27
- expectTypeOf(client.pollForTasks).toBeFunction();
28
- expectTypeOf(client.pollForTasks).parameters.toMatchTypeOf<
29
- [string, number?, number?, number?, number?]
30
- >();
31
-
32
- // Check completeTask method types
33
- expectTypeOf(client.completeTask).toBeFunction();
34
- expectTypeOf(client.completeTask).parameters.toMatchTypeOf<
35
- [StepTaskKey, Json?]
36
- >();
37
-
38
- // Check failTask method types
39
- expectTypeOf(client.failTask).toBeFunction();
40
- expectTypeOf(client.failTask).parameters.toMatchTypeOf<
41
- [StepTaskKey, unknown]
42
- >();
43
- });
44
-
45
- it('allows only valid Flow input', () => {
46
- const sql = postgres();
47
- const flow = new Flow<{ url: string }>({ slug: 'test_flow' });
48
- const client = new PgflowSqlClient<typeof flow>(sql);
49
-
50
- // @ts-expect-error - Flow expects { url: string } not a number
51
- client.startFlow(flow, 23);
52
-
53
- // @ts-expect-error - Flow expects { url: string }
54
- client.startFlow(flow, { url: 23 });
55
-
56
- // @ts-expect-error - Flow does not accept extraneous keys
57
- client.startFlow(flow, { url: 'string', extraneousKey: 'value' });
58
- });
59
- });
@@ -1,75 +0,0 @@
1
- :::
2
-
3
- 1. MVP will allow only 1:1 queue:flow mappings, because it simplifies a lot.
4
- Queue is created when creating a flow, in pgflow.create_flow() function.
5
-
6
- 2. No, we will start with either static delay or simple exponential and
7
- I do not plan to expand on it further.
8
-
9
- The backoff will be calculated by the retry attempts, that can be deducted
10
- from pgmq's "read_ct" counter.
11
-
12
- No need for jitter for now.
13
-
14
- 3. **Execution Timeouts**
15
- I'm not sure about flow timeouts, I think for MVP we should probably
16
- skip them and I'm not even sure if I want to have them for the steps too.
17
-
18
- I would be definitely adding them in future.
19
-
20
- 4. We want everything to by statically typed in TypeScript, because the main
21
- way to define flows would be to use TS DSL.
22
-
23
- So a condition must be a JSON-serializable object that will get saved
24
- in a JSONB column.
25
-
26
- My initial idea for conditions was to just provide a JSON object that we
27
- will use to perform containment check on the step inputs using @> operator.
28
-
29
- I am considering expanding it to more robust condition, but they would need
30
- to be defined in JSON-serializable way.
31
-
32
- I do not want to have any SQL snippets in conditions, because I cannot
33
- statically type them and they can fail at runtime.
34
-
35
- No, conditions should probably only be able to reference step inputs.
36
-
37
- 5. Yes it should be able to disable retries per step or override their params.
38
- How those circuit breakers should work and what would be the benefit of them?
39
- What is retry budget? Do we have a distributed system really? Everything
40
- lives in a single postgres instance.
41
-
42
- 6. No we do not want to support dependency resolution at runtime,
43
- but conditions could be used to implement something similar.
44
- Steps should not be able to add new steps during runtime,
45
- but I plan to have fanout steps that will spawn either multiple tasks
46
- or multiple subflows, one per the input array item.
47
- Those are meant to be aggregated back to the output array when completed.
48
-
49
- It's not for MVP tho!!
50
-
51
- ### Cross-Cutting Concerns
52
- 7. We will advise users to not put anything sensitive into flow options,
53
- by writing docs and also not having handlers any ability to access the
54
- step options.
55
-
56
- We will provide a Context object that users can define in the Flow DSL,
57
- that will be passed to the step handlers at runtime and will encourage
58
- users to use this Context object to store sensitive data.
59
-
60
- 8. What you mean by tracked metadata for options and options affecting metric?
61
-
62
- 9. Versioning is a big problem for my project - I have few ideas how to solve
63
- it (basically topologically sort graph and hash it to create a version hash).
64
- But for MVP we definitely don't need versioning - users must take care of
65
- this on their own by just creating new flows if they change the shape of
66
- the flow. There is no way and will be no way to UPDATE flows.
67
-
68
- Graph shape should be immutable after creation, but i'm not sure about
69
- the options - maybe it would be a good idea to allow updating retry configs,
70
- because only running the flows in production can allow users to gather
71
- enough data to make educated decisions about those params.
72
-
73
- 10. No modification for flows/steps at all, so easy.
74
-
75
- :::
@@ -1,179 +0,0 @@
1
- # PgFlow Blob Reference System
2
-
3
- ## Overview
4
-
5
- PgFlow needs an efficient way to handle large data outputs from workflow steps. The Blob Reference System provides a solution by separating large data payloads from workflow control information while maintaining a seamless developer experience.
6
-
7
- ## How It Works
8
-
9
- ### Core Concept
10
-
11
- When steps produce large outputs (e.g., HTML content from web scraping, binary data, large API responses), these outputs are stored separately in a dedicated blob storage table. The workflow state maintains references to these blobs rather than storing the actual large data.
12
-
13
- ### Database Structure
14
-
15
- The system uses a dedicated table for blob storage:
16
-
17
- ```sql
18
- CREATE TABLE pgflow.output_blobs (
19
- id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
20
- content JSONB NOT NULL,
21
- created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
22
- );
23
- ```
24
-
25
- ### Worker Task Structure
26
-
27
- The `poll_for_tasks` function returns tasks with both regular inputs and blob references through a custom type:
28
-
29
- ```sql
30
- CREATE TYPE pgflow.step_task_record AS (
31
- flow_slug TEXT,
32
- run_id UUID,
33
- step_slug TEXT,
34
- input JSONB,
35
- blobs_refs JSONB
36
- );
37
- ```
38
-
39
- This design provides a clean separation between:
40
-
41
- - `input`: Regular small data that can be directly included in the task
42
- - `blobs_refs`: References to large data stored separately in the blob table
43
-
44
- ### Example Return Value
45
-
46
- A task returned by `poll_for_tasks` might look like:
47
-
48
- ```json
49
- {
50
- "flow_slug": "my_flow",
51
- "run_id": "1234-5678-90ab-cdef",
52
- "step_slug": "my_step",
53
- "input": {
54
- "run": "run input",
55
- "dependency_a": "dependency_a output"
56
- },
57
- "blobs_refs": {
58
- "dependency_b": "<uuid to the blob saved for dependency_b which returned binary data>"
59
- }
60
- }
61
- ```
62
-
63
- In this example:
64
-
65
- - `dependency_a` had a small output that's included directly in the `input` object
66
- - `dependency_b` had a large output (possibly binary data) that's stored as a blob, with only a reference included
67
-
68
- ### Queue Efficiency
69
-
70
- A critical optimization in PgFlow is that the task queue only stores minimal task identification information:
71
-
72
- - flow_slug
73
- - run_id
74
- - step_slug
75
- - task_index
76
-
77
- This lightweight approach keeps queue messages small and efficient. When a worker picks up a task, it uses these identifiers to:
78
-
79
- 1. Call `poll_for_tasks` to get the full task data
80
- 2. Receive both the regular `input` and `blobs_refs` in a single query result
81
- 3. Fetch the actual blob content for any referenced blobs
82
- 4. Combine all data to form the complete input for the task handler
83
-
84
- ## Implementation Flow
85
-
86
- ### Task Creation
87
-
88
- 1. When a step completes, its output is analyzed:
89
-
90
- - Outputs below the size threshold remain in the regular output JSONB
91
- - Large outputs are stored in the `pgflow.output_blobs` table with a unique ID
92
-
93
- 2. The `start_ready_steps` function:
94
- - Creates task entries with references to any large blob data
95
- - Enqueues only the task identifiers (not the actual data) in the task queue
96
-
97
- ### Task Execution
98
-
99
- 1. Worker picks up the task identifier from the queue
100
- 2. Worker calls `poll_for_tasks` to get the task details
101
- 3. `poll_for_tasks` returns:
102
- - The `input` object with regular data
103
- - The `blobs_refs` object with references to any large data outputs
104
- 4. Worker fetches blob content for any references in `blobs_refs`
105
- 5. Worker assembles the complete input (combining regular data and blob data) for the task handler
106
- 6. Task handler executes with the complete data, unaware of the blob reference system
107
-
108
- ### Example Processing Flow
109
-
110
- For a web scraping workflow:
111
-
112
- 1. `fetch-html` step returns a large HTML string (3MB)
113
- 2. System detects the large output and:
114
- - Stores HTML in `pgflow.output_blobs` with ID "abc-123"
115
- - Records only the blob reference in the step's output
116
- 3. When `parse-html` step is ready to run:
117
- - Queue contains only the task identifier
118
- - `poll_for_tasks` returns the task with:
119
- ```json
120
- {
121
- "input": {
122
- "run": { "url": "https://example.com" }
123
- },
124
- "blobs_refs": {
125
- "fetch-html": "abc-123"
126
- }
127
- }
128
- ```
129
- 4. Worker:
130
- - Detects the blob reference "abc-123" for "fetch-html"
131
- - Fetches the actual HTML content from the blob table
132
- - Provides the handler with complete input including the HTML content
133
-
134
- ## Developer Experience
135
-
136
- From a workflow developer's perspective, the blob reference system is completely transparent:
137
-
138
- ```typescript
139
- // Developer writes code as if all data is directly available
140
- const parseHtmlHandler: StepHandler<ParseInput, ParseOutput> = async (
141
- input
142
- ) => {
143
- // input.dependencies["fetch-html"] contains the full HTML content
144
- // (the blob reference was automatically resolved)
145
- const html = input.dependencies['fetch-html'];
146
-
147
- // Process the HTML...
148
- const title = extractTitle(html);
149
- const links = extractLinks(html);
150
-
151
- return { title, links };
152
- };
153
- ```
154
-
155
- The developer never needs to:
156
-
157
- - Manually resolve blob references
158
- - Check if data is a reference or actual content
159
- - Handle storage of large outputs differently
160
-
161
- ## Benefits and Considerations
162
-
163
- ### Benefits
164
-
165
- 1. **Database Efficiency**: Large data is stored separately from workflow metadata
166
- 2. **Queue Performance**: Queue messages remain small and consistent in size
167
- 3. **Separation of Concerns**: Control flow data is separate from large payloads
168
- 4. **Transparent to Developers**: No special code required to handle large data
169
- 5. **Scalability**: Can handle arbitrary data sizes without affecting workflow system performance
170
-
171
- ### Considerations
172
-
173
- 1. **Query Optimization**: Ensure `poll_for_tasks` efficiently retrieves both regular data and blob references
174
- 2. **Blob Lifecycle Management**: Implement cleanup for orphaned or expired blobs
175
- 3. **Size Threshold Tuning**: Configure appropriate thresholds for when data should use blob storage
176
-
177
- ## Conclusion
178
-
179
- The Blob Reference System in PgFlow provides an elegant solution for handling large data in workflows. By splitting task data into regular inputs and blob references, the system maintains efficient database usage and queue performance while providing a seamless experience for workflow developers. The design ensures that large data is handled appropriately without requiring developers to write special code for blob resolution or storage.
package/eslint.config.cjs DELETED
@@ -1,22 +0,0 @@
1
- const baseConfig = require('../../eslint.config.cjs');
2
-
3
- module.exports = [
4
- ...baseConfig,
5
- {
6
- files: ['**/*.json'],
7
- rules: {
8
- '@nx/dependency-checks': [
9
- 'error',
10
- {
11
- ignoredFiles: [
12
- '{projectRoot}/eslint.config.{js,cjs,mjs}',
13
- '{projectRoot}/vite.config.{js,ts,mjs,mts}',
14
- ],
15
- },
16
- ],
17
- },
18
- languageOptions: {
19
- parser: require('jsonc-eslint-parser'),
20
- },
21
- },
22
- ];
@@ -1,5 +0,0 @@
1
- graph LR
2
- A[website] --> B[sentiment]
3
- A --> C[summary]
4
- B --> D[saveToDb]
5
- C --> D
package/example-flow.svg DELETED
@@ -1 +0,0 @@
1
- <svg aria-roledescription="flowchart-v2" role="graphics-document document" viewBox="0 0 497.90625 174" style="max-width: 497.906px; background-color: white;" class="flowchart" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" width="100%" id="my-svg"><style>#my-svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}#my-svg .error-icon{fill:#552222;}#my-svg .error-text{fill:#552222;stroke:#552222;}#my-svg .edge-thickness-normal{stroke-width:1px;}#my-svg .edge-thickness-thick{stroke-width:3.5px;}#my-svg .edge-pattern-solid{stroke-dasharray:0;}#my-svg .edge-thickness-invisible{stroke-width:0;fill:none;}#my-svg .edge-pattern-dashed{stroke-dasharray:3;}#my-svg .edge-pattern-dotted{stroke-dasharray:2;}#my-svg .marker{fill:#333333;stroke:#333333;}#my-svg .marker.cross{stroke:#333333;}#my-svg svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#my-svg p{margin:0;}#my-svg .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#my-svg .cluster-label text{fill:#333;}#my-svg .cluster-label span{color:#333;}#my-svg .cluster-label span p{background-color:transparent;}#my-svg .label text,#my-svg span{fill:#333;color:#333;}#my-svg .node rect,#my-svg .node circle,#my-svg .node ellipse,#my-svg .node polygon,#my-svg .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#my-svg .rough-node .label text,#my-svg .node .label text,#my-svg .image-shape .label,#my-svg .icon-shape .label{text-anchor:middle;}#my-svg .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#my-svg .rough-node .label,#my-svg .node .label,#my-svg .image-shape .label,#my-svg .icon-shape .label{text-align:center;}#my-svg .node.clickable{cursor:pointer;}#my-svg .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#my-svg .arrowheadPath{fill:#333333;}#my-svg .edgePath .path{stroke:#333333;stroke-width:2.0px;}#my-svg .flowchart-link{stroke:#333333;fill:none;}#my-svg .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#my-svg .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#my-svg .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#my-svg .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#my-svg .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#my-svg .cluster text{fill:#333;}#my-svg .cluster span{color:#333;}#my-svg div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#my-svg .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#my-svg rect.text{fill:none;stroke-width:0;}#my-svg .icon-shape,#my-svg .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#my-svg .icon-shape p,#my-svg .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#my-svg .icon-shape rect,#my-svg .image-shape rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#my-svg :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}</style><g><marker orient="auto" markerHeight="8" markerWidth="8" markerUnits="userSpaceOnUse" refY="5" refX="5" viewBox="0 0 10 10" class="marker flowchart-v2" id="my-svg_flowchart-v2-pointEnd"><path style="stroke-width: 1; stroke-dasharray: 1, 0;" class="arrowMarkerPath" d="M 0 0 L 10 5 L 0 10 z"/></marker><marker orient="auto" markerHeight="8" markerWidth="8" markerUnits="userSpaceOnUse" refY="5" refX="4.5" viewBox="0 0 10 10" class="marker flowchart-v2" id="my-svg_flowchart-v2-pointStart"><path style="stroke-width: 1; stroke-dasharray: 1, 0;" class="arrowMarkerPath" d="M 0 5 L 10 10 L 10 0 z"/></marker><marker orient="auto" markerHeight="11" markerWidth="11" markerUnits="userSpaceOnUse" refY="5" refX="11" viewBox="0 0 10 10" class="marker flowchart-v2" id="my-svg_flowchart-v2-circleEnd"><circle style="stroke-width: 1; stroke-dasharray: 1, 0;" class="arrowMarkerPath" r="5" cy="5" cx="5"/></marker><marker orient="auto" markerHeight="11" markerWidth="11" markerUnits="userSpaceOnUse" refY="5" refX="-1" viewBox="0 0 10 10" class="marker flowchart-v2" id="my-svg_flowchart-v2-circleStart"><circle style="stroke-width: 1; stroke-dasharray: 1, 0;" class="arrowMarkerPath" r="5" cy="5" cx="5"/></marker><marker orient="auto" markerHeight="11" markerWidth="11" markerUnits="userSpaceOnUse" refY="5.2" refX="12" viewBox="0 0 11 11" class="marker cross flowchart-v2" id="my-svg_flowchart-v2-crossEnd"><path style="stroke-width: 2; stroke-dasharray: 1, 0;" class="arrowMarkerPath" d="M 1,1 l 9,9 M 10,1 l -9,9"/></marker><marker orient="auto" markerHeight="11" markerWidth="11" markerUnits="userSpaceOnUse" refY="5.2" refX="-1" viewBox="0 0 11 11" class="marker cross flowchart-v2" id="my-svg_flowchart-v2-crossStart"><path style="stroke-width: 2; stroke-dasharray: 1, 0;" class="arrowMarkerPath" d="M 1,1 l 9,9 M 10,1 l -9,9"/></marker><g class="root"><g class="clusters"/><g class="edgePaths"><path marker-end="url(#my-svg_flowchart-v2-pointEnd)" style="" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" id="L_A_B_0" d="M113.179,60L120.045,55.833C126.911,51.667,140.643,43.333,151.009,39.167C161.375,35,168.375,35,171.875,35L175.375,35"/><path marker-end="url(#my-svg_flowchart-v2-pointEnd)" style="" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" id="L_A_C_1" d="M113.179,114L120.045,118.167C126.911,122.333,140.643,130.667,151.308,134.833C161.974,139,169.573,139,173.372,139L177.172,139"/><path marker-end="url(#my-svg_flowchart-v2-pointEnd)" style="" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" id="L_B_D_2" d="M308.75,35L312.917,35C317.083,35,325.417,35,336.263,38.835C347.109,42.669,360.469,50.339,367.148,54.174L373.828,58.008"/><path marker-end="url(#my-svg_flowchart-v2-pointEnd)" style="" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" id="L_C_D_3" d="M306.953,139L311.419,139C315.885,139,324.818,139,335.964,135.165C347.109,131.331,360.469,123.661,367.148,119.826L373.828,115.992"/></g><g class="edgeLabels"><g class="edgeLabel"><g transform="translate(0, 0)" class="label"><foreignObject height="0" width="0"><div style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;" class="labelBkg" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g transform="translate(0, 0)" class="label"><foreignObject height="0" width="0"><div style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;" class="labelBkg" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g transform="translate(0, 0)" class="label"><foreignObject height="0" width="0"><div style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;" class="labelBkg" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g transform="translate(0, 0)" class="label"><foreignObject height="0" width="0"><div style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;" class="labelBkg" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel"></span></div></foreignObject></g></g></g><g class="nodes"><g transform="translate(68.6875, 87)" id="flowchart-A-0" class="node default"><rect height="54" width="121.375" y="-27" x="-60.6875" style="" class="basic label-container"/><g transform="translate(-30.6875, -12)" style="" class="label"><rect/><foreignObject height="24" width="61.375"><div style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel"><p>website</p></span></div></foreignObject></g></g><g transform="translate(244.0625, 35)" id="flowchart-B-1" class="node default"><rect height="54" width="129.375" y="-27" x="-64.6875" style="" class="basic label-container"/><g transform="translate(-34.6875, -12)" style="" class="label"><rect/><foreignObject height="24" width="69.375"><div style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel"><p>sentiment</p></span></div></foreignObject></g></g><g transform="translate(244.0625, 139)" id="flowchart-C-3" class="node default"><rect height="54" width="125.78125" y="-27" x="-62.890625" style="" class="basic label-container"/><g transform="translate(-32.890625, -12)" style="" class="label"><rect/><foreignObject height="24" width="65.78125"><div style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel"><p>summary</p></span></div></foreignObject></g></g><g transform="translate(424.328125, 87)" id="flowchart-D-5" class="node default"><rect height="54" width="131.15625" y="-27" x="-65.578125" style="" class="basic label-container"/><g transform="translate(-35.578125, -12)" style="" class="label"><rect/><foreignObject height="24" width="71.15625"><div style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel"><p>saveToDb</p></span></div></foreignObject></g></g></g></g></g></svg>
@@ -1,83 +0,0 @@
1
- sequenceDiagram
2
- participant Client
3
- participant pgflow as pgflow SQL Core
4
- participant PGMQ as PGMQ Queue
5
- participant Worker as Edge Worker
6
- participant Handler as Task Handler
7
-
8
- Client->>pgflow: create_flow(...)
9
- Client->>pgflow: add_step(...)
10
- Client->>pgflow: start_flow(...)
11
-
12
- activate pgflow
13
- pgflow->>pgflow: Create run record
14
- pgflow->>pgflow: Initialize step_states
15
- pgflow->>pgflow: Create step_tasks for root steps
16
- pgflow->>PGMQ: Enqueue message for root step task
17
- pgflow-->>Client: Return run details
18
- deactivate pgflow
19
-
20
- Worker->>pgflow: poll_for_tasks(...)
21
-
22
- activate pgflow
23
- pgflow->>PGMQ: Get visible messages
24
- PGMQ-->>pgflow: Return messages
25
- pgflow->>pgflow: Increment attempts counter on task
26
- pgflow->>pgflow: Build step input by combining run input & dependency outputs
27
- pgflow-->>Worker: Return tasks with metadata and inputs
28
- deactivate pgflow
29
-
30
- Worker->>Worker: Find handler function for a task
31
-
32
- note right of Worker: Task Execution
33
-
34
- Worker->>Handler: Call handler function with task input
35
-
36
- rect rgb(235, 255, 235)
37
- note left of Handler: Task succeeds
38
- activate Handler
39
- Handler-->>Worker: Return result
40
- deactivate Handler
41
-
42
- Worker->>pgflow: complete_task(results)
43
-
44
- activate pgflow
45
- pgflow->>pgflow: Update task status to 'completed'
46
- pgflow->>PGMQ: Archive message
47
- pgflow->>pgflow: Update step_state to 'completed'
48
- pgflow->>pgflow: Check & start dependent steps
49
- pgflow->>PGMQ: Enqueue messages for ready dependent steps
50
- pgflow->>pgflow: Decrement remaining_steps counter
51
- pgflow->>pgflow: If all steps completed, mark run as 'completed'
52
- pgflow-->>Worker: Confirmation
53
- deactivate pgflow
54
- end
55
-
56
- rect rgb(250, 240, 240)
57
- note left of Handler: Handler throws or exceeds timeout
58
-
59
- activate Handler
60
- Handler--xWorker: Throw exception or exceeds timeout
61
- deactivate Handler
62
- Worker->>pgflow: fail_task(error_message)
63
-
64
- activate pgflow
65
- pgflow->>pgflow: Check remaining retry attempts
66
-
67
- rect rgb(240, 250, 240)
68
- note right of pgflow: Retries remaining
69
- pgflow->>PGMQ: Delay message visibility
70
- PGMQ->>PGMQ: Message becomes visible
71
- note right of Worker: Worker attempts execution again
72
- Worker->>pgflow: poll_for_tasks(...)
73
- end
74
- rect rgb(255, 225, 225)
75
- note right of pgflow: No retries remaining
76
- pgflow->>pgflow: Mark task as 'failed'
77
- pgflow->>pgflow: Mark step as 'failed'
78
- pgflow->>pgflow: Mark run as 'failed'
79
- pgflow->>PGMQ: Archive message
80
- note right of pgflow: Permanent failure of a run
81
- end
82
- deactivate pgflow
83
- end
@@ -1 +0,0 @@
1
- <svg aria-roledescription="sequence" role="graphics-document document" viewBox="-50 -10 1314 2742" style="max-width: 1314px; background-color: white;" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" width="100%" id="my-svg"><rect class="rect" height="921" width="985" fill="rgb(250, 240, 240)" y="1715" x="169"/><rect class="rect" height="384" width="449" fill="rgb(255, 225, 225)" y="2242" x="195"/><rect class="rect" height="282" width="839" fill="rgb(240, 250, 240)" y="1950" x="260"/><rect class="rect" height="673" width="1032.5" fill="rgb(235, 255, 235)" y="1032" x="121.5"/><g><rect class="actor actor-bottom" ry="3" rx="3" name="Handler" height="65" width="150" stroke="#666" fill="#eaeaea" y="2656" x="1064"/><text style="text-anchor: middle; font-size: 16px; font-weight: 400;" class="actor actor-box" alignment-baseline="central" dominant-baseline="central" y="2688.5" x="1139"><tspan dy="0" x="1139">Task Handler</tspan></text></g><g><rect class="actor actor-bottom" ry="3" rx="3" name="Worker" height="65" width="150" stroke="#666" fill="#eaeaea" y="2656" x="758"/><text style="text-anchor: middle; font-size: 16px; font-weight: 400;" class="actor actor-box" alignment-baseline="central" dominant-baseline="central" y="2688.5" x="833"><tspan dy="0" x="833">Edge Worker</tspan></text></g><g><rect class="actor actor-bottom" ry="3" rx="3" name="PGMQ" height="65" width="150" stroke="#666" fill="#eaeaea" y="2656" x="558"/><text style="text-anchor: middle; font-size: 16px; font-weight: 400;" class="actor actor-box" alignment-baseline="central" dominant-baseline="central" y="2688.5" x="633"><tspan dy="0" x="633">PGMQ Queue</tspan></text></g><g><rect class="actor actor-bottom" ry="3" rx="3" name="pgflow" height="65" width="150" stroke="#666" fill="#eaeaea" y="2656" x="200"/><text style="text-anchor: middle; font-size: 16px; font-weight: 400;" class="actor actor-box" alignment-baseline="central" dominant-baseline="central" y="2688.5" x="275"><tspan dy="0" x="275">pgflow SQL Core</tspan></text></g><g><rect class="actor actor-bottom" ry="3" rx="3" name="Client" height="65" width="150" stroke="#666" fill="#eaeaea" y="2656" x="0"/><text style="text-anchor: middle; font-size: 16px; font-weight: 400;" class="actor actor-box" alignment-baseline="central" dominant-baseline="central" y="2688.5" x="75"><tspan dy="0" x="75">Client</tspan></text></g><g><line name="Handler" stroke="#999" stroke-width="0.5px" class="actor-line 200" y2="2656" x2="1139" y1="65" x1="1139" id="actor4"/><g id="root-4"><rect class="actor actor-top" ry="3" rx="3" name="Handler" height="65" width="150" stroke="#666" fill="#eaeaea" y="0" x="1064"/><text style="text-anchor: middle; font-size: 16px; font-weight: 400;" class="actor actor-box" alignment-baseline="central" dominant-baseline="central" y="32.5" x="1139"><tspan dy="0" x="1139">Task Handler</tspan></text></g></g><g><line name="Worker" stroke="#999" stroke-width="0.5px" class="actor-line 200" y2="2656" x2="833" y1="65" x1="833" id="actor3"/><g id="root-3"><rect class="actor actor-top" ry="3" rx="3" name="Worker" height="65" width="150" stroke="#666" fill="#eaeaea" y="0" x="758"/><text style="text-anchor: middle; font-size: 16px; font-weight: 400;" class="actor actor-box" alignment-baseline="central" dominant-baseline="central" y="32.5" x="833"><tspan dy="0" x="833">Edge Worker</tspan></text></g></g><g><line name="PGMQ" stroke="#999" stroke-width="0.5px" class="actor-line 200" y2="2656" x2="633" y1="65" x1="633" id="actor2"/><g id="root-2"><rect class="actor actor-top" ry="3" rx="3" name="PGMQ" height="65" width="150" stroke="#666" fill="#eaeaea" y="0" x="558"/><text style="text-anchor: middle; font-size: 16px; font-weight: 400;" class="actor actor-box" alignment-baseline="central" dominant-baseline="central" y="32.5" x="633"><tspan dy="0" x="633">PGMQ Queue</tspan></text></g></g><g><line name="pgflow" stroke="#999" stroke-width="0.5px" class="actor-line 200" y2="2656" x2="275" y1="65" x1="275" id="actor1"/><g id="root-1"><rect class="actor actor-top" ry="3" rx="3" name="pgflow" height="65" width="150" stroke="#666" fill="#eaeaea" y="0" x="200"/><text style="text-anchor: middle; font-size: 16px; font-weight: 400;" class="actor actor-box" alignment-baseline="central" dominant-baseline="central" y="32.5" x="275"><tspan dy="0" x="275">pgflow SQL Core</tspan></text></g></g><g><line name="Client" stroke="#999" stroke-width="0.5px" class="actor-line 200" y2="2656" x2="75" y1="65" x1="75" id="actor0"/><g id="root-0"><rect class="actor actor-top" ry="3" rx="3" name="Client" height="65" width="150" stroke="#666" fill="#eaeaea" y="0" x="0"/><text style="text-anchor: middle; font-size: 16px; font-weight: 400;" class="actor actor-box" alignment-baseline="central" dominant-baseline="central" y="32.5" x="75"><tspan dy="0" x="75">Client</tspan></text></g></g><style>#my-svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}#my-svg .error-icon{fill:#552222;}#my-svg .error-text{fill:#552222;stroke:#552222;}#my-svg .edge-thickness-normal{stroke-width:1px;}#my-svg .edge-thickness-thick{stroke-width:3.5px;}#my-svg .edge-pattern-solid{stroke-dasharray:0;}#my-svg .edge-thickness-invisible{stroke-width:0;fill:none;}#my-svg .edge-pattern-dashed{stroke-dasharray:3;}#my-svg .edge-pattern-dotted{stroke-dasharray:2;}#my-svg .marker{fill:#333333;stroke:#333333;}#my-svg .marker.cross{stroke:#333333;}#my-svg svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#my-svg p{margin:0;}#my-svg .actor{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#my-svg text.actor&gt;tspan{fill:black;stroke:none;}#my-svg .actor-line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#my-svg .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333;}#my-svg .messageLine1{stroke-width:1.5;stroke-dasharray:2,2;stroke:#333;}#my-svg #arrowhead path{fill:#333;stroke:#333;}#my-svg .sequenceNumber{fill:white;}#my-svg #sequencenumber{fill:#333;}#my-svg #crosshead path{fill:#333;stroke:#333;}#my-svg .messageText{fill:#333;stroke:none;}#my-svg .labelBox{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#my-svg .labelText,#my-svg .labelText&gt;tspan{fill:black;stroke:none;}#my-svg .loopText,#my-svg .loopText&gt;tspan{fill:black;stroke:none;}#my-svg .loopLine{stroke-width:2px;stroke-dasharray:2,2;stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#my-svg .note{stroke:#aaaa33;fill:#fff5ad;}#my-svg .noteText,#my-svg .noteText&gt;tspan{fill:black;stroke:none;}#my-svg .activation0{fill:#f4f4f4;stroke:#666;}#my-svg .activation1{fill:#f4f4f4;stroke:#666;}#my-svg .activation2{fill:#f4f4f4;stroke:#666;}#my-svg .actorPopupMenu{position:absolute;}#my-svg .actorPopupMenuPanel{position:absolute;fill:#ECECFF;box-shadow:0px 8px 16px 0px rgba(0,0,0,0.2);filter:drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));}#my-svg .actor-man line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#my-svg .actor-man circle,#my-svg line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;stroke-width:2px;}#my-svg :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}</style><g/><defs><symbol height="24" width="24" id="computer"><path d="M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z" transform="scale(.5)"/></symbol></defs><defs><symbol clip-rule="evenodd" fill-rule="evenodd" id="database"><path d="M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z" transform="scale(.5)"/></symbol></defs><defs><symbol height="24" width="24" id="clock"><path d="M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z" transform="scale(.5)"/></symbol></defs><defs><marker orient="auto-start-reverse" markerHeight="12" markerWidth="12" markerUnits="userSpaceOnUse" refY="5" refX="7.9" id="arrowhead"><path d="M -1 0 L 10 5 L 0 10 z"/></marker></defs><defs><marker refY="4.5" refX="4" orient="auto" markerHeight="8" markerWidth="15" id="crosshead"><path style="stroke-dasharray: 0, 0;" d="M 1,2 L 6,7 M 6,2 L 1,7" stroke-width="1pt" stroke="#000000" fill="none"/></marker></defs><defs><marker orient="auto" markerHeight="28" markerWidth="20" refY="7" refX="15.5" id="filled-head"><path d="M 18,7 L9,13 L14,7 L9,1 Z"/></marker></defs><defs><marker orient="auto" markerHeight="40" markerWidth="60" refY="15" refX="15" id="sequencenumber"><circle r="6" cy="15" cx="15"/></marker></defs><g><rect class="activation0" height="316" width="10" stroke="#666" fill="#EDF2AE" y="203" x="270"/></g><g><rect class="activation0" height="290" width="10" stroke="#666" fill="#EDF2AE" y="565" x="270"/></g><g><rect class="note" height="37" width="150" stroke="#666" fill="#EDF2AE" y="939" x="858"/><text style="font-size: 16px; font-weight: 400;" dy="1em" class="noteText" alignment-baseline="middle" dominant-baseline="middle" text-anchor="middle" y="944" x="933"><tspan x="933">Task Execution</tspan></text></g><g><rect class="note" height="37" width="150" stroke="#666" fill="#EDF2AE" y="1052" x="964"/><text style="font-size: 16px; font-weight: 400;" dy="1em" class="noteText" alignment-baseline="middle" dominant-baseline="middle" text-anchor="middle" y="1057" x="1039"><tspan x="1039">Task succeeds</tspan></text></g><g><rect class="activation0" height="44" width="10" stroke="#666" fill="#EDF2AE" y="1089" x="1134"/></g><g><rect class="activation0" height="516" width="10" stroke="#666" fill="#EDF2AE" y="1179" x="270"/></g><g><rect class="note" height="37" width="244" stroke="#666" fill="#EDF2AE" y="1735" x="870"/><text style="font-size: 16px; font-weight: 400;" dy="1em" class="noteText" alignment-baseline="middle" dominant-baseline="middle" text-anchor="middle" y="1740" x="992"><tspan x="992">Handler throws or exceeds timeout</tspan></text></g><g><rect class="activation0" height="46" width="10" stroke="#666" fill="#EDF2AE" y="1772" x="1134"/></g><g><rect class="activation0" height="762" width="10" stroke="#666" fill="#EDF2AE" y="1864" x="270"/></g><g><rect class="note" height="37" width="150" stroke="#666" fill="#EDF2AE" y="1970" x="300"/><text style="font-size: 16px; font-weight: 400;" dy="1em" class="noteText" alignment-baseline="middle" dominant-baseline="middle" text-anchor="middle" y="1975" x="375"><tspan x="375">Retries remaining</tspan></text></g><g><rect class="note" height="37" width="231" stroke="#666" fill="#EDF2AE" y="2139" x="858"/><text style="font-size: 16px; font-weight: 400;" dy="1em" class="noteText" alignment-baseline="middle" dominant-baseline="middle" text-anchor="middle" y="2144" x="974"><tspan x="974">Worker attempts execution again</tspan></text></g><g><rect class="note" height="37" width="152" stroke="#666" fill="#EDF2AE" y="2262" x="300"/><text style="font-size: 16px; font-weight: 400;" dy="1em" class="noteText" alignment-baseline="middle" dominant-baseline="middle" text-anchor="middle" y="2267" x="376"><tspan x="376">No retries remaining</tspan></text></g><g><rect class="note" height="37" width="188" stroke="#666" fill="#EDF2AE" y="2579" x="300"/><text style="font-size: 16px; font-weight: 400;" dy="1em" class="noteText" alignment-baseline="middle" dominant-baseline="middle" text-anchor="middle" y="2584" x="394"><tspan x="394">Permanent failure of a run</tspan></text></g><text style="font-size: 16px; font-weight: 400;" dy="1em" class="messageText" alignment-baseline="middle" dominant-baseline="middle" text-anchor="middle" y="80" x="174">create_flow(...)</text><line style="fill: none;" marker-end="url(#arrowhead)" stroke="none" stroke-width="2" class="messageLine0" y2="111" x2="271" y1="111" x1="76"/><text style="font-size: 16px; font-weight: 400;" dy="1em" class="messageText" alignment-baseline="middle" dominant-baseline="middle" text-anchor="middle" y="126" x="174">add_step(...)</text><line style="fill: none;" marker-end="url(#arrowhead)" stroke="none" stroke-width="2" class="messageLine0" y2="157" x2="271" y1="157" x1="76"/><text style="font-size: 16px; font-weight: 400;" dy="1em" class="messageText" alignment-baseline="middle" dominant-baseline="middle" text-anchor="middle" y="172" x="174">start_flow(...)</text><line style="fill: none;" marker-end="url(#arrowhead)" stroke="none" stroke-width="2" class="messageLine0" y2="203" x2="271" y1="203" x1="76"/><text style="font-size: 16px; font-weight: 400;" dy="1em" class="messageText" alignment-baseline="middle" dominant-baseline="middle" text-anchor="middle" y="218" x="280">Create run record</text><path style="fill: none;" marker-end="url(#arrowhead)" stroke="none" stroke-width="2" class="messageLine0" d="M 280,247 C 340,237 340,277 280,267"/><text style="font-size: 16px; font-weight: 400;" dy="1em" class="messageText" alignment-baseline="middle" dominant-baseline="middle" text-anchor="middle" y="292" x="280">Initialize step_states</text><path style="fill: none;" marker-end="url(#arrowhead)" stroke="none" stroke-width="2" class="messageLine0" d="M 280,323 C 340,313 340,353 280,343"/><text style="font-size: 16px; font-weight: 400;" dy="1em" class="messageText" alignment-baseline="middle" dominant-baseline="middle" text-anchor="middle" y="368" x="280">Create step_tasks for root steps</text><path style="fill: none;" marker-end="url(#arrowhead)" stroke="none" stroke-width="2" class="messageLine0" d="M 280,399 C 340,389 340,429 280,419"/><text style="font-size: 16px; font-weight: 400;" dy="1em" class="messageText" alignment-baseline="middle" dominant-baseline="middle" text-anchor="middle" y="444" x="455">Enqueue message for root step task</text><line style="fill: none;" marker-end="url(#arrowhead)" stroke="none" stroke-width="2" class="messageLine0" y2="475" x2="629" y1="475" x1="280"/><text style="font-size: 16px; font-weight: 400;" dy="1em" class="messageText" alignment-baseline="middle" dominant-baseline="middle" text-anchor="middle" y="490" x="175">Return run details</text><line style="stroke-dasharray: 3, 3; fill: none;" marker-end="url(#arrowhead)" stroke="none" stroke-width="2" class="messageLine1" y2="519" x2="79" y1="519" x1="270"/><text style="font-size: 16px; font-weight: 400;" dy="1em" class="messageText" alignment-baseline="middle" dominant-baseline="middle" text-anchor="middle" y="534" x="556">poll_for_tasks(...)</text><line style="fill: none;" marker-end="url(#arrowhead)" stroke="none" stroke-width="2" class="messageLine0" y2="565" x2="279" y1="565" x1="832"/><text style="font-size: 16px; font-weight: 400;" dy="1em" class="messageText" alignment-baseline="middle" dominant-baseline="middle" text-anchor="middle" y="580" x="455">Get visible messages</text><line style="fill: none;" marker-end="url(#arrowhead)" stroke="none" stroke-width="2" class="messageLine0" y2="611" x2="629" y1="611" x1="280"/><text style="font-size: 16px; font-weight: 400;" dy="1em" class="messageText" alignment-baseline="middle" dominant-baseline="middle" text-anchor="middle" y="626" x="458">Return messages</text><line style="stroke-dasharray: 3, 3; fill: none;" marker-end="url(#arrowhead)" stroke="none" stroke-width="2" class="messageLine1" y2="657" x2="283" y1="657" x1="632"/><text style="font-size: 16px; font-weight: 400;" dy="1em" class="messageText" alignment-baseline="middle" dominant-baseline="middle" text-anchor="middle" y="672" x="280">Increment attempts counter on task</text><path style="fill: none;" marker-end="url(#arrowhead)" stroke="none" stroke-width="2" class="messageLine0" d="M 280,703 C 340,693 340,733 280,723"/><text style="font-size: 16px; font-weight: 400;" dy="1em" class="messageText" alignment-baseline="middle" dominant-baseline="middle" text-anchor="middle" y="748" x="280">Build step input by combining run input &amp; dependency outputs</text><path style="fill: none;" marker-end="url(#arrowhead)" stroke="none" stroke-width="2" class="messageLine0" d="M 280,779 C 340,769 340,809 280,799"/><text style="font-size: 16px; font-weight: 400;" dy="1em" class="messageText" alignment-baseline="middle" dominant-baseline="middle" text-anchor="middle" y="824" x="555">Return tasks with metadata and inputs</text><line style="stroke-dasharray: 3, 3; fill: none;" marker-end="url(#arrowhead)" stroke="none" stroke-width="2" class="messageLine1" y2="855" x2="829" y1="855" x1="280"/><text style="font-size: 16px; font-weight: 400;" dy="1em" class="messageText" alignment-baseline="middle" dominant-baseline="middle" text-anchor="middle" y="870" x="834">Find handler function for a task</text><path style="fill: none;" marker-end="url(#arrowhead)" stroke="none" stroke-width="2" class="messageLine0" d="M 834,899 C 894,889 894,929 834,919"/><text style="font-size: 16px; font-weight: 400;" dy="1em" class="messageText" alignment-baseline="middle" dominant-baseline="middle" text-anchor="middle" y="991" x="985">Call handler function with task input</text><line style="fill: none;" marker-end="url(#arrowhead)" stroke="none" stroke-width="2" class="messageLine0" y2="1022" x2="1135" y1="1022" x1="834"/><text style="font-size: 16px; font-weight: 400;" dy="1em" class="messageText" alignment-baseline="middle" dominant-baseline="middle" text-anchor="middle" y="1104" x="986">Return result</text><line style="stroke-dasharray: 3, 3; fill: none;" marker-end="url(#arrowhead)" stroke="none" stroke-width="2" class="messageLine1" y2="1133" x2="837" y1="1133" x1="1134"/><text style="font-size: 16px; font-weight: 400;" dy="1em" class="messageText" alignment-baseline="middle" dominant-baseline="middle" text-anchor="middle" y="1148" x="556">complete_task(results)</text><line style="fill: none;" marker-end="url(#arrowhead)" stroke="none" stroke-width="2" class="messageLine0" y2="1179" x2="279" y1="1179" x1="832"/><text style="font-size: 16px; font-weight: 400;" dy="1em" class="messageText" alignment-baseline="middle" dominant-baseline="middle" text-anchor="middle" y="1194" x="280">Update task status to 'completed'</text><path style="fill: none;" marker-end="url(#arrowhead)" stroke="none" stroke-width="2" class="messageLine0" d="M 280,1225 C 340,1215 340,1255 280,1245"/><text style="font-size: 16px; font-weight: 400;" dy="1em" class="messageText" alignment-baseline="middle" dominant-baseline="middle" text-anchor="middle" y="1270" x="455">Archive message</text><line style="fill: none;" marker-end="url(#arrowhead)" stroke="none" stroke-width="2" class="messageLine0" y2="1301" x2="629" y1="1301" x1="280"/><text style="font-size: 16px; font-weight: 400;" dy="1em" class="messageText" alignment-baseline="middle" dominant-baseline="middle" text-anchor="middle" y="1316" x="280">Update step_state to 'completed'</text><path style="fill: none;" marker-end="url(#arrowhead)" stroke="none" stroke-width="2" class="messageLine0" d="M 280,1347 C 340,1337 340,1377 280,1367"/><text style="font-size: 16px; font-weight: 400;" dy="1em" class="messageText" alignment-baseline="middle" dominant-baseline="middle" text-anchor="middle" y="1392" x="280">Check &amp; start dependent steps</text><path style="fill: none;" marker-end="url(#arrowhead)" stroke="none" stroke-width="2" class="messageLine0" d="M 280,1423 C 340,1413 340,1453 280,1443"/><text style="font-size: 16px; font-weight: 400;" dy="1em" class="messageText" alignment-baseline="middle" dominant-baseline="middle" text-anchor="middle" y="1468" x="455">Enqueue messages for ready dependent steps</text><line style="fill: none;" marker-end="url(#arrowhead)" stroke="none" stroke-width="2" class="messageLine0" y2="1499" x2="629" y1="1499" x1="280"/><text style="font-size: 16px; font-weight: 400;" dy="1em" class="messageText" alignment-baseline="middle" dominant-baseline="middle" text-anchor="middle" y="1514" x="280">Decrement remaining_steps counter</text><path style="fill: none;" marker-end="url(#arrowhead)" stroke="none" stroke-width="2" class="messageLine0" d="M 280,1545 C 340,1535 340,1575 280,1565"/><text style="font-size: 16px; font-weight: 400;" dy="1em" class="messageText" alignment-baseline="middle" dominant-baseline="middle" text-anchor="middle" y="1590" x="280">If all steps completed, mark run as 'completed'</text><path style="fill: none;" marker-end="url(#arrowhead)" stroke="none" stroke-width="2" class="messageLine0" d="M 280,1621 C 340,1611 340,1651 280,1641"/><text style="font-size: 16px; font-weight: 400;" dy="1em" class="messageText" alignment-baseline="middle" dominant-baseline="middle" text-anchor="middle" y="1666" x="555">Confirmation</text><line style="stroke-dasharray: 3, 3; fill: none;" marker-end="url(#arrowhead)" stroke="none" stroke-width="2" class="messageLine1" y2="1695" x2="829" y1="1695" x1="280"/><text style="font-size: 16px; font-weight: 400;" dy="1em" class="messageText" alignment-baseline="middle" dominant-baseline="middle" text-anchor="middle" y="1787" x="986">Throw exception or exceeds timeout</text><line style="stroke-dasharray: 3, 3; fill: none;" marker-end="url(#crosshead)" stroke="none" stroke-width="2" class="messageLine1" y2="1818" x2="837" y1="1818" x1="1134"/><text style="font-size: 16px; font-weight: 400;" dy="1em" class="messageText" alignment-baseline="middle" dominant-baseline="middle" text-anchor="middle" y="1833" x="556">fail_task(error_message)</text><line style="fill: none;" marker-end="url(#arrowhead)" stroke="none" stroke-width="2" class="messageLine0" y2="1864" x2="279" y1="1864" x1="832"/><text style="font-size: 16px; font-weight: 400;" dy="1em" class="messageText" alignment-baseline="middle" dominant-baseline="middle" text-anchor="middle" y="1879" x="280">Check remaining retry attempts</text><path style="fill: none;" marker-end="url(#arrowhead)" stroke="none" stroke-width="2" class="messageLine0" d="M 280,1910 C 340,1900 340,1940 280,1930"/><text style="font-size: 16px; font-weight: 400;" dy="1em" class="messageText" alignment-baseline="middle" dominant-baseline="middle" text-anchor="middle" y="2022" x="455">Delay message visibility</text><line style="fill: none;" marker-end="url(#arrowhead)" stroke="none" stroke-width="2" class="messageLine0" y2="2053" x2="629" y1="2053" x1="280"/><text style="font-size: 16px; font-weight: 400;" dy="1em" class="messageText" alignment-baseline="middle" dominant-baseline="middle" text-anchor="middle" y="2068" x="634">Message becomes visible</text><path style="fill: none;" marker-end="url(#arrowhead)" stroke="none" stroke-width="2" class="messageLine0" d="M 634,2099 C 694,2089 694,2129 634,2119"/><text style="font-size: 16px; font-weight: 400;" dy="1em" class="messageText" alignment-baseline="middle" dominant-baseline="middle" text-anchor="middle" y="2191" x="558">poll_for_tasks(...)</text><line style="fill: none;" marker-end="url(#arrowhead)" stroke="none" stroke-width="2" class="messageLine0" y2="2222" x2="283" y1="2222" x1="832"/><text style="font-size: 16px; font-weight: 400;" dy="1em" class="messageText" alignment-baseline="middle" dominant-baseline="middle" text-anchor="middle" y="2314" x="280">Mark task as 'failed'</text><path style="fill: none;" marker-end="url(#arrowhead)" stroke="none" stroke-width="2" class="messageLine0" d="M 280,2343 C 340,2333 340,2373 280,2363"/><text style="font-size: 16px; font-weight: 400;" dy="1em" class="messageText" alignment-baseline="middle" dominant-baseline="middle" text-anchor="middle" y="2388" x="280">Mark step as 'failed'</text><path style="fill: none;" marker-end="url(#arrowhead)" stroke="none" stroke-width="2" class="messageLine0" d="M 280,2419 C 340,2409 340,2449 280,2439"/><text style="font-size: 16px; font-weight: 400;" dy="1em" class="messageText" alignment-baseline="middle" dominant-baseline="middle" text-anchor="middle" y="2464" x="280">Mark run as 'failed'</text><path style="fill: none;" marker-end="url(#arrowhead)" stroke="none" stroke-width="2" class="messageLine0" d="M 280,2493 C 340,2483 340,2523 280,2513"/><text style="font-size: 16px; font-weight: 400;" dy="1em" class="messageText" alignment-baseline="middle" dominant-baseline="middle" text-anchor="middle" y="2538" x="455">Archive message</text><line style="fill: none;" marker-end="url(#arrowhead)" stroke="none" stroke-width="2" class="messageLine0" y2="2569" x2="629" y1="2569" x1="280"/></svg>
@@ -1,2 +0,0 @@
1
- export * from './postgres.ts';
2
- //# sourceMappingURL=index.d.ts.map