@pipelex/mthds-ui 0.39.0 → 0.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/README.md +3 -1
  2. package/dist/chunk-7JZBXBZS.js +258 -0
  3. package/dist/chunk-7JZBXBZS.js.map +1 -0
  4. package/dist/{chunk-AGFLCOWW.js → chunk-HPARBH6K.js} +14 -197
  5. package/dist/chunk-HPARBH6K.js.map +1 -0
  6. package/dist/chunk-N2F62MW7.js +55 -0
  7. package/dist/chunk-N2F62MW7.js.map +1 -0
  8. package/dist/chunk-P6IGZVWE.js +155 -0
  9. package/dist/chunk-P6IGZVWE.js.map +1 -0
  10. package/dist/chunk-RU3CIXFC.js +1251 -0
  11. package/dist/chunk-RU3CIXFC.js.map +1 -0
  12. package/dist/form/react/index.d.ts +1 -1
  13. package/dist/graph/index.d.ts +19 -3
  14. package/dist/graph/index.js +20 -12
  15. package/dist/graph/react/index.d.ts +13 -13
  16. package/dist/graph/react/index.js +387 -560
  17. package/dist/graph/react/index.js.map +1 -1
  18. package/dist/graph/react/viewer/GraphToolbar.css +2 -107
  19. package/dist/graph/react/viewer/StyleMenu.css +109 -0
  20. package/dist/index.d.ts +2 -2
  21. package/dist/index.js +20 -12
  22. package/dist/registryJoin-C6Wfkik-.d.ts +441 -0
  23. package/dist/standalone/graph-standalone.html +171 -166
  24. package/dist/standalone/graph-viewer.css +74 -69
  25. package/dist/standalone/graph-viewer.js +97 -97
  26. package/dist/static-graph/index.d.ts +1 -1
  27. package/dist/timeline/index.d.ts +240 -77
  28. package/dist/timeline/index.js +61 -3
  29. package/dist/timeline/react/RunTimeline.css +48 -0
  30. package/dist/timeline/react/index.d.ts +46 -4
  31. package/dist/timeline/react/index.js +774 -105
  32. package/dist/timeline/react/index.js.map +1 -1
  33. package/dist/timeline/react/styles/simple/SimpleProgress.css +354 -0
  34. package/dist/{types-DsrzH6gM.d.ts → types-DLAnYNoi.d.ts} +1 -1
  35. package/package.json +3 -1
  36. package/dist/chunk-AGFLCOWW.js.map +0 -1
  37. package/dist/chunk-ILZJIORT.js +0 -54
  38. package/dist/chunk-ILZJIORT.js.map +0 -1
  39. package/dist/chunk-JJG2TO7P.js +0 -473
  40. package/dist/chunk-JJG2TO7P.js.map +0 -1
  41. package/dist/progressSnapshot-VZ4PLul9.d.ts +0 -191
@@ -1,191 +0,0 @@
1
- /**
2
- * The progress snapshot of the hosted progress contract, as data.
3
- *
4
- * A snapshot is the state of a run's progress at one moment: which invocations
5
- * of which pipes have started, ended or been skipped, how far each batch has
6
- * got, which outcome each condition took, and where the run is retrying or
7
- * stuck. It is defined apart from the carriers that deliver it (a progress
8
- * route a client polls, a frame that tells a browser to read it again, the
9
- * state of a task on another workflow platform), so these types model the
10
- * snapshot alone and name no carrier and no workflow engine.
11
- *
12
- * Field names, optionality and the closed vocabularies follow the contract
13
- * word for word. A required field is always present, `null` where its type
14
- * says so; an optional field is absent when it does not apply, never `null`.
15
- * A reader ignores a member it does not know, so nothing here rejects an
16
- * unknown field, and the fields the contract calls open strings
17
- * (`pipe_type`, `degradation.reason`) are typed `string`.
18
- */
19
- /** RFC 3339 in UTC, written with `Z` in a snapshot, with fractional seconds when recorded. */
20
- type ProgressTimestamp = string;
21
- /** Whether the events a snapshot was projected from are a live run's or a dry run's. */
22
- declare const PROGRESS_MODE: {
23
- readonly LIVE: "live";
24
- readonly DRY: "dry";
25
- };
26
- type ProgressMode = (typeof PROGRESS_MODE)[keyof typeof PROGRESS_MODE];
27
- /**
28
- * Where the run stands: accepted and not yet started, going, ended with its
29
- * result, ended in failure, or stopped before its end.
30
- */
31
- declare const RUN_PROGRESS_STATUS: {
32
- readonly PENDING: "pending";
33
- readonly RUNNING: "running";
34
- readonly SUCCEEDED: "succeeded";
35
- readonly FAILED: "failed";
36
- readonly CANCELED: "canceled";
37
- };
38
- type RunProgressStatus = (typeof RUN_PROGRESS_STATUS)[keyof typeof RUN_PROGRESS_STATUS];
39
- /**
40
- * An invocation's status. These are the words a run graph uses for its nodes,
41
- * the same set as the graph's `PipeStatus`:
42
- *
43
- * - `scheduled`: an item of a batch that has fanned out, not yet started;
44
- * - `running`: started its latest attempt and not ended it;
45
- * - `succeeded`: ended its latest attempt with its output;
46
- * - `failed`: ended its latest attempt in failure;
47
- * - `skipped`: skipped in its latest attempt, a successful end with no output of its own;
48
- * - `canceled`: had not ended when the run ended.
49
- */
50
- declare const INVOCATION_STATUS: {
51
- readonly SCHEDULED: "scheduled";
52
- readonly RUNNING: "running";
53
- readonly SUCCEEDED: "succeeded";
54
- readonly FAILED: "failed";
55
- readonly SKIPPED: "skipped";
56
- readonly CANCELED: "canceled";
57
- };
58
- type InvocationStatus = (typeof INVOCATION_STATUS)[keyof typeof INVOCATION_STATUS];
59
- /** The reasons the platform emits today. `ProgressDegradation.reason` stays an open string. */
60
- declare const DEGRADATION_REASON: {
61
- readonly WORKFLOW_TASK_FAILING: "workflow_task_failing";
62
- readonly STATUS_UNAVAILABLE: "status_unavailable";
63
- };
64
- /**
65
- * The run status's assessment of a run that is not making progress. A snapshot
66
- * carries it whole as its own `degradation`, and on the invocation it concerns.
67
- * Every member is always present, `null` where its type says so.
68
- */
69
- interface ProgressDegradation {
70
- /** Why the run reads degraded. An open string: show `message` for a reason you do not know. */
71
- reason: string;
72
- /** The assessment in words, for a person. Shown as it is, never parsed. */
73
- message: string;
74
- /** How many times in a row the failing execution has failed to advance. */
75
- failed_attempts: number | null;
76
- /** When that series of failures began, or the latest time it can have begun. */
77
- failing_since: ProgressTimestamp | null;
78
- /** When the platform ends the run as failed if the series is still going on then. */
79
- ends_at: ProgressTimestamp | null;
80
- }
81
- /** A batch's counts of its items. An item `scheduled` or `canceled` is counted in none of the three. */
82
- interface BatchProgress {
83
- /** The fan-out's item count. */
84
- total: number;
85
- /** Items `succeeded` or `skipped`. */
86
- done: number;
87
- /** Items `running`. */
88
- running: number;
89
- /** Items `failed`. */
90
- failed: number;
91
- }
92
- /** A condition's resolution. */
93
- interface ConditionProgress {
94
- /** The outcome map's key that matched, or `null` when the condition took its default outcome. */
95
- selected_outcome: string | null;
96
- }
97
- /** The latest failure of an invocation's work, a health annotation. */
98
- interface InvocationFailure {
99
- /** The failure under the run's error disclosure: its own message when written for the caller, else a placeholder. */
100
- message: string;
101
- /** When it failed, when known. */
102
- at?: ProgressTimestamp;
103
- }
104
- /** One attempt of one execution: an entry of a chain. */
105
- interface ExecutionAttempt {
106
- /** Opaque. Names the execution, the same in each of its attempts. */
107
- execution: string;
108
- /** Counts from 1. */
109
- attempt: number;
110
- }
111
- /** One run of one pipe inside a run, named by its invocation path. */
112
- interface ProgressInvocation {
113
- /** Its invocation path, from the run's entry pipe. */
114
- path: string;
115
- /** The bare code of the pipe it runs, which a timeline labels its row with. */
116
- pipe_code: string;
117
- /** The same pipe's `pipe_ref`. */
118
- pipe_ref: string;
119
- /** The pipe's type, such as `PipeSequence` or `PipeLLM`: an open string. */
120
- pipe_type: string;
121
- status: InvocationStatus;
122
- /** The start of its latest attempt; `null` while `scheduled`, and when no start of that attempt was recorded. */
123
- started_at: ProgressTimestamp | null;
124
- /** The end of its latest attempt; `null` while `scheduled` or `running`, and when `canceled`. */
125
- ended_at: ProgressTimestamp | null;
126
- /** On a `PipeSequence`, the number of steps its author wrote. */
127
- step_count?: number;
128
- /** On a `PipeParallel`, the number of its branches. */
129
- branch_count?: number;
130
- /** On a `skipped` invocation, why it was skipped. */
131
- skip_reason?: string;
132
- /** On a `PipeBatch` that has fanned out. */
133
- batch?: BatchProgress;
134
- /** On a `PipeCondition` that has resolved. */
135
- condition?: ConditionProgress;
136
- /** Health annotation: how many times its work has been tried, present only when more than once. */
137
- attempts?: number;
138
- /** Health annotation: the latest failure of its work. */
139
- last_failure?: InvocationFailure;
140
- /** Health annotation: the run is stuck at this invocation. */
141
- degradation?: ProgressDegradation;
142
- }
143
- /** The state of a run's progress at one moment. */
144
- interface ProgressSnapshot {
145
- pipeline_run_id: string;
146
- /** The mode of the events it was projected from. */
147
- mode: ProgressMode;
148
- status: RunProgressStatus;
149
- /** What a reader compares two snapshots of one run by: the count of distinct events projected. */
150
- version: number;
151
- /** When the snapshot was projected. */
152
- assembled_at: ProgressTimestamp;
153
- /** One line saying how far the run has got. Shown as it is, never parsed. */
154
- summary: string;
155
- /** Present only on a snapshot of part of a run: the path of the invocation it starts at. */
156
- root_path?: string;
157
- /** Present only on a snapshot of part of a run: the chain of the attempt it was projected from. */
158
- chain?: ExecutionAttempt[];
159
- /** The run status's degradation, present when the run reads degraded. */
160
- degradation?: ProgressDegradation;
161
- /** Every invocation the snapshot knows, each before its descendants. */
162
- invocations: ProgressInvocation[];
163
- }
164
- /** True once the run has ended: `succeeded`, `failed` or `canceled`. */
165
- declare function isRunEnded(status: RunProgressStatus): boolean;
166
- /**
167
- * A timestamp as milliseconds since the epoch, keeping any precision finer than
168
- * a millisecond as a fraction, or `null` when it is not an RFC 3339 timestamp
169
- * in the form the contract writes (see `TIMESTAMP_PATTERN`): anything else,
170
- * an offset-less time included, is `null` rather than whatever `Date.parse`
171
- * makes of it, which for an offset-less time is the reader's local time.
172
- *
173
- * Good to well under a microsecond, which is all a bar needs. A double cannot
174
- * hold every digit a source may record past the millisecond, so to order two
175
- * timestamps exactly, use `compareTimestamps`.
176
- */
177
- declare function timestampMs(timestamp: ProgressTimestamp | null | undefined): number | null;
178
- /**
179
- * How two timestamps are ordered, exactly, at whatever precision they carry:
180
- * negative when `a` is the earlier, positive when it is the later, 0 when both
181
- * name the same moment, and `null` when either is not a timestamp.
182
- *
183
- * Whole milliseconds are compared first, then the digits past the millisecond
184
- * as digits, so `…07.0340001Z` reads earlier than `…07.03400011Z`, which as
185
- * epoch milliseconds in a double are one number. Two snapshots of one version
186
- * are told apart by `assembled_at` alone, and the contract lets a source record
187
- * any number of fractional digits, so the comparison never rounds them.
188
- */
189
- declare function compareTimestamps(a: ProgressTimestamp | null | undefined, b: ProgressTimestamp | null | undefined): number | null;
190
-
191
- export { type BatchProgress as B, type ConditionProgress as C, DEGRADATION_REASON as D, type ExecutionAttempt as E, type InvocationStatus as I, type ProgressSnapshot as P, RUN_PROGRESS_STATUS as R, type ProgressTimestamp as a, type ProgressInvocation as b, INVOCATION_STATUS as c, type InvocationFailure as d, PROGRESS_MODE as e, type ProgressDegradation as f, type ProgressMode as g, type RunProgressStatus as h, compareTimestamps as i, isRunEnded as j, timestampMs as t };