@memberjunction/task-graph 6.1.0-edge.2 → 6.1.0-edge.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +180 -4
- package/README.md +30 -1
- package/dist/TaskClaimStore.d.ts +376 -4
- package/dist/TaskClaimStore.d.ts.map +1 -1
- package/dist/TaskClaimStore.js +600 -20
- package/dist/TaskClaimStore.js.map +1 -1
- package/dist/TaskGraphDispatcher.d.ts +326 -25
- package/dist/TaskGraphDispatcher.d.ts.map +1 -1
- package/dist/TaskGraphDispatcher.js +1604 -286
- package/dist/TaskGraphDispatcher.js.map +1 -1
- package/dist/TaskGraphService.d.ts +255 -5
- package/dist/TaskGraphService.d.ts.map +1 -1
- package/dist/TaskGraphService.js +583 -26
- package/dist/TaskGraphService.js.map +1 -1
- package/dist/TaskGraphSubmitterImpl.d.ts.map +1 -1
- package/dist/TaskGraphSubmitterImpl.js +5 -0
- package/dist/TaskGraphSubmitterImpl.js.map +1 -1
- package/dist/condition-gate.d.ts +128 -0
- package/dist/condition-gate.d.ts.map +1 -0
- package/dist/condition-gate.js +257 -0
- package/dist/condition-gate.js.map +1 -0
- package/dist/debug-state.d.ts +102 -0
- package/dist/debug-state.d.ts.map +1 -0
- package/dist/debug-state.js +135 -0
- package/dist/debug-state.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/operations/TaskGraphDebugOperations.d.ts +99 -0
- package/dist/operations/TaskGraphDebugOperations.d.ts.map +1 -0
- package/dist/operations/TaskGraphDebugOperations.js +310 -0
- package/dist/operations/TaskGraphDebugOperations.js.map +1 -0
- package/dist/operations/TaskGraphOperations.d.ts +20 -2
- package/dist/operations/TaskGraphOperations.d.ts.map +1 -1
- package/dist/operations/TaskGraphOperations.js +47 -8
- package/dist/operations/TaskGraphOperations.js.map +1 -1
- package/dist/settlement-rescue.d.ts +85 -0
- package/dist/settlement-rescue.d.ts.map +1 -0
- package/dist/settlement-rescue.js +119 -0
- package/dist/settlement-rescue.js.map +1 -0
- package/dist/task-graph-kick.d.ts +3 -0
- package/dist/task-graph-kick.d.ts.map +1 -0
- package/dist/task-graph-kick.js +17 -0
- package/dist/task-graph-kick.js.map +1 -0
- package/dist/task-predicates.d.ts +77 -0
- package/dist/task-predicates.d.ts.map +1 -0
- package/dist/task-predicates.js +75 -0
- package/dist/task-predicates.js.map +1 -0
- package/dist/types.d.ts +110 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +12 -11
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The decisions that rescue a graph whose settlement never finished.
|
|
3
|
+
*
|
|
4
|
+
* **Why these live here and not inside the dispatcher.** A graph settles in two steps that are not
|
|
5
|
+
* one transaction: the parent's terminal write, and then the post-settlement sequence — cost rollup,
|
|
6
|
+
* agent-run settlement, continuation delivery. A process that dies between them leaves a graph that
|
|
7
|
+
* is finished by every query the dispatcher runs and yet has delivered nothing, with the submitting
|
|
8
|
+
* agent run `Paused` forever. The third sweep arm exists to find exactly those.
|
|
9
|
+
*
|
|
10
|
+
* That makes this the one part of settlement whose correctness is a *predicate*, not a statement:
|
|
11
|
+
* which rows are unfinished, and when is an unfinished one too old to deliver normally. Left inside
|
|
12
|
+
* `TaskGraphDispatcher` they could only be exercised through a fake `RunView`, a fake entity object
|
|
13
|
+
* and a fake clock — a test that mostly asserts the shape of its own mocks. Pulled out, they are
|
|
14
|
+
* ordinary functions with ordinary tests, and the dispatcher keeps the I/O.
|
|
15
|
+
*
|
|
16
|
+
* The guarded WRITES stay in `TaskClaimStore`, where the statement is the guarantee. This module
|
|
17
|
+
* decides *whether* to attempt them; that module decides what happens when two instances both do.
|
|
18
|
+
*/
|
|
19
|
+
import { ParseTaskGraphParentMetadata } from './TaskGraphService.js';
|
|
20
|
+
/** How long after settling a graph is still eligible for a normal continuation delivery. */
|
|
21
|
+
export const UNSETTLED_SWEEP_WINDOW_HOURS = 24;
|
|
22
|
+
/**
|
|
23
|
+
* How far back the ONE startup sweep looks.
|
|
24
|
+
*
|
|
25
|
+
* Wider than the steady-state window because a deployment gap is exactly the case the rescue exists
|
|
26
|
+
* for: nothing was running, so nothing swept, and the graphs stranded by whatever took the process
|
|
27
|
+
* down are older than a day by the time it returns. Runs once at `Start()`, so the cost of the wider
|
|
28
|
+
* scan is paid once per process, not once per poll.
|
|
29
|
+
*/
|
|
30
|
+
export const UNSETTLED_STARTUP_WINDOW_HOURS = 24 * 30;
|
|
31
|
+
/**
|
|
32
|
+
* How long a settled graph waits for its submitting run to park before giving up on it.
|
|
33
|
+
*
|
|
34
|
+
* `BaseAgent.finalizeAgentRun` parks the run within moments of the graph becoming dispatchable, so
|
|
35
|
+
* the honest window is seconds; anything beyond this means the submitting process is gone. Generous
|
|
36
|
+
* enough that a loaded machine does not trip it, short enough that a dead submitter cannot hold a
|
|
37
|
+
* completed workflow's announcement hostage for a day.
|
|
38
|
+
*/
|
|
39
|
+
export const SUBMITTER_PARK_GRACE_MS = 5 * 60_000;
|
|
40
|
+
/**
|
|
41
|
+
* Whether this pass's writes to the submitting run will mean anything yet.
|
|
42
|
+
*
|
|
43
|
+
* **The `Running` case is the whole point.** A graph can settle before the run that submitted it has
|
|
44
|
+
* parked at all: `finalizeAgentRun` sets `Paused` *after* the graph is durable and dispatchable, so
|
|
45
|
+
* a fast graph finishes first. Both of the settled branch's writes then land wrong — the lifecycle
|
|
46
|
+
* write silently returns (its guard is `Status === 'Paused'`), and the cost write is overwritten
|
|
47
|
+
* moments later by finalize's own full-row save carrying the nulls it held before the dispatcher
|
|
48
|
+
* wrote anything. Neither failure is visible, and the pass then claims the delivery marker, making
|
|
49
|
+
* itself the last pass ever to look at the graph. The run stays `Paused` forever.
|
|
50
|
+
*
|
|
51
|
+
* Every other status proceeds: `Paused` is the case settlement exists for, and a run already
|
|
52
|
+
* `Completed`/`Failed`/`Cancelled` reached that for its own reasons — the lifecycle write's own
|
|
53
|
+
* guard declines it, which is correct, and delivery should not be held up by it.
|
|
54
|
+
*
|
|
55
|
+
* **Bounded, because "not parked yet" and "the submitter died before parking" look identical from
|
|
56
|
+
* here.** Waiting forever on the second loses the outcome of work that actually completed, which is
|
|
57
|
+
* strictly worse than announcing it late — so past the grace period the caller proceeds and says
|
|
58
|
+
* why. The run stays `Running`, which is visibly wrong and belongs to whatever reconciles abandoned
|
|
59
|
+
* runs, not to the graph that finished correctly.
|
|
60
|
+
*
|
|
61
|
+
* @param settledForMs how long ago the graph reached its terminal status
|
|
62
|
+
*/
|
|
63
|
+
export function IsSubmittingRunReady(runStatus, settledForMs, graceMs = SUBMITTER_PARK_GRACE_MS) {
|
|
64
|
+
if (runStatus !== 'Running')
|
|
65
|
+
return true;
|
|
66
|
+
return settledForMs > graceMs;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* The oldest `__mj_UpdatedAt` still worth rescuing, as an ISO string for the SQL filter.
|
|
70
|
+
*
|
|
71
|
+
* The bound is on ABANDONMENT, not age: `__mj_UpdatedAt` advances on every settle attempt, so a
|
|
72
|
+
* graph something is still actively retrying keeps re-entering the window. What ages out is a graph
|
|
73
|
+
* nothing has touched — which is the only kind this sweep can help.
|
|
74
|
+
*/
|
|
75
|
+
export function SweepCutoff(now, windowHours) {
|
|
76
|
+
return new Date(now.getTime() - windowHours * 3600_000).toISOString();
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Picks the graphs that reached a terminal status without delivering their continuation.
|
|
80
|
+
*
|
|
81
|
+
* Filtered here rather than in SQL because the delivery marker lives inside the parent's
|
|
82
|
+
* `InputPayload` JSON, and it lives there deliberately: one representation means the writer
|
|
83
|
+
* (`TryClaimContinuation`) and the reader are pinned to each other, and a graph settled before any
|
|
84
|
+
* of this existed is judged by the same parser as one settled after — which a new column plus a
|
|
85
|
+
* backfill could not promise.
|
|
86
|
+
*
|
|
87
|
+
* **An unreadable payload counts as undelivered.** It is selected, the claim then refuses it
|
|
88
|
+
* (`ISJSON` guard), and it is selected again next pass until it ages out of the window. That is the
|
|
89
|
+
* intended shape: we cannot prove such a graph was delivered, so we must not assume it, and the
|
|
90
|
+
* window is what keeps "cannot prove" from meaning "retry forever".
|
|
91
|
+
*/
|
|
92
|
+
export function SelectUnsettledGraphIDs(rows) {
|
|
93
|
+
const ids = [];
|
|
94
|
+
for (const row of rows) {
|
|
95
|
+
if (!row.ID)
|
|
96
|
+
continue;
|
|
97
|
+
if (ParseTaskGraphParentMetadata(row.InputPayload).continuationDeliveredAt)
|
|
98
|
+
continue;
|
|
99
|
+
ids.push(row.ID);
|
|
100
|
+
}
|
|
101
|
+
return ids;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Whether a settlement is too old to deliver as if it had just happened.
|
|
105
|
+
*
|
|
106
|
+
* A graph stranded by a crash and found days later should still settle its run and stop showing as
|
|
107
|
+
* `Paused` — but re-invoking the submitting agent on stale context, or messaging a conversation
|
|
108
|
+
* about work that finished last week, is worse than not delivering. So an expired settlement takes
|
|
109
|
+
* the same once-only claim and records itself as `expired`, which keeps the distinction visible
|
|
110
|
+
* afterwards instead of erasing it.
|
|
111
|
+
*
|
|
112
|
+
* A graph with no `CompletedAt` has not settled at all, so there is nothing to have expired.
|
|
113
|
+
*/
|
|
114
|
+
export function IsSettlementExpired(completedAt, now, windowHours = UNSETTLED_SWEEP_WINDOW_HOURS) {
|
|
115
|
+
if (!completedAt)
|
|
116
|
+
return false;
|
|
117
|
+
return now.getTime() - completedAt.getTime() > windowHours * 3600_000;
|
|
118
|
+
}
|
|
119
|
+
//# sourceMappingURL=settlement-rescue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settlement-rescue.js","sourceRoot":"","sources":["../src/settlement-rescue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,4BAA4B,EAAE,MAAM,oBAA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GAAG,WAAW,GAAG,QAAQ,CAAC;AAC1E,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-graph-kick.d.ts","sourceRoot":"","sources":["../src/task-graph-kick.ts"],"names":[],"mappings":"AASA,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAGlE;AAED,wBAAgB,wBAAwB,IAAI,IAAI,CAE/C"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wake running dispatchers the moment a graph is submitted.
|
|
3
|
+
*
|
|
4
|
+
* The poll timer is 5s — fine in production, a noticeable dead pause after Debug/Run. Submit
|
|
5
|
+
* cannot import the dispatcher instance (submit and execute are separate halves), so each
|
|
6
|
+
* started dispatcher registers a kick here and Submit pokes the set.
|
|
7
|
+
*/
|
|
8
|
+
const kicks = new Set();
|
|
9
|
+
export function RegisterTaskGraphKick(kick) {
|
|
10
|
+
kicks.add(kick);
|
|
11
|
+
return () => { kicks.delete(kick); };
|
|
12
|
+
}
|
|
13
|
+
export function KickTaskGraphDispatchers() {
|
|
14
|
+
for (const kick of kicks)
|
|
15
|
+
kick();
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=task-graph-kick.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-graph-kick.js","sourceRoot":"","sources":["../src/task-graph-kick.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,KAAK,GAAG,IAAI,GAAG,EAAc,CAAC;AAEpC,MAAM,UAAU,qBAAqB,CAAC,IAAgB;IAClD,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAChB,OAAO,GAAG,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AACzC,CAAC;AAED,MAAM,UAAU,wBAAwB;IACpC,KAAK,MAAM,IAAI,IAAI,KAAK;QAAE,IAAI,EAAE,CAAC;AACrC,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Who completes a task — a dispatcher, or a person.
|
|
3
|
+
*
|
|
4
|
+
* **Why this is a module and not three inline predicates.** The distinction is asked in SQL (claim
|
|
5
|
+
* reclamation, the human settle/expiry sweeps) and in TypeScript (claim routing), by code in two
|
|
6
|
+
* files, and it has been written down four different ways:
|
|
7
|
+
*
|
|
8
|
+
* `AgentID IS NOT NULL OR ActionID IS NOT NULL` — claim reclamation
|
|
9
|
+
* `StepType='Human'` — human settle, human expiry
|
|
10
|
+
* `StepType='Human' OR (StepType IS NULL AND UserID IS NOT NULL)` — human reopen
|
|
11
|
+
* `if (ActionID) … else if (PromptID) … else if (!AgentID) human` — claim routing
|
|
12
|
+
*
|
|
13
|
+
* Those were co-extensive when they were written and are not any more, and the way that surfaced is
|
|
14
|
+
* the reason this file exists. The first form predates the `PromptID` column: a Prompt step (and a
|
|
15
|
+
* ForEach/While with a prompt body) carries `PromptID` with both `AgentID` and `ActionID` null, so a
|
|
16
|
+
* prompt task whose owner crashed is claimed normally, expires normally, and is then **invisible to
|
|
17
|
+
* both reclamation statements** — `TryClaim` cannot retake it because it is no longer `Pending`, and
|
|
18
|
+
* `FindOrphanedInProgress` will not even report it. The graph sits `In Progress` forever with its
|
|
19
|
+
* submitting run `Paused` forever, and `IsGraphStalled` reports it healthy because an `In Progress`
|
|
20
|
+
* node counts as active. Zero diagnostics, anywhere.
|
|
21
|
+
*
|
|
22
|
+
* The fix is not "add `PromptID` to the OR" — that restores the coincidence and hands the same
|
|
23
|
+
* failure to whoever adds the next runner column. It is to say the thing once, here, in the terms
|
|
24
|
+
* the engine actually means, and have every site ask this module.
|
|
25
|
+
*
|
|
26
|
+
* @module @memberjunction/task-graph
|
|
27
|
+
*/
|
|
28
|
+
/** Renders a column reference for the dialect the caller is building. */
|
|
29
|
+
export type ColumnQuoter = (column: string) => string;
|
|
30
|
+
/** For `RunView.ExtraFilter`, which takes bare column names. */
|
|
31
|
+
export declare const BARE_COLUMNS: ColumnQuoter;
|
|
32
|
+
/**
|
|
33
|
+
* The columns that assign a task to an executor, in the order claim routing tries them.
|
|
34
|
+
*
|
|
35
|
+
* Adding a runner means adding its column here and nowhere else — which is the whole point. If a
|
|
36
|
+
* future runner is assigned by something other than a column on the task, this list stops being
|
|
37
|
+
* sufficient and the predicate below must change shape rather than grow.
|
|
38
|
+
*/
|
|
39
|
+
export declare const EXECUTOR_COLUMNS: readonly ["AgentID", "ActionID", "PromptID"];
|
|
40
|
+
/** The shape both predicates need. Structural, so `MJTaskEntity` satisfies it as-is. */
|
|
41
|
+
export type TaskAssignment = {
|
|
42
|
+
AgentID: string | null;
|
|
43
|
+
ActionID: string | null;
|
|
44
|
+
PromptID: string | null;
|
|
45
|
+
StepType: string | null;
|
|
46
|
+
UserID: string | null;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* SQL for "a dispatcher completes this task".
|
|
50
|
+
*
|
|
51
|
+
* Used to SCOPE reclamation: only a task something was supposed to be executing can have been
|
|
52
|
+
* abandoned by a crash. A human task's `In Progress` — if it ever reaches it — is a person's state
|
|
53
|
+
* to own, not a claim to reclaim.
|
|
54
|
+
*/
|
|
55
|
+
export declare function MachineTaskSQL(quote?: ColumnQuoter): string;
|
|
56
|
+
/**
|
|
57
|
+
* SQL for "a person completes this task".
|
|
58
|
+
*
|
|
59
|
+
* The `StepType IS NULL` arm is not defensive clutter: `StepType` is nullable and rows predating the
|
|
60
|
+
* column exist in real databases. A human task written before it would be invisible to a bare
|
|
61
|
+
* `StepType='Human'` filter — asked, never settled, never expired, dead forever. This is the wide
|
|
62
|
+
* form the reopen path already used; the settle and expiry paths were narrower, which is B4.
|
|
63
|
+
*/
|
|
64
|
+
export declare function HumanTaskSQL(quote?: ColumnQuoter): string;
|
|
65
|
+
/** True when some runner owns this task. The TypeScript twin of {@link MachineTaskSQL}. */
|
|
66
|
+
export declare function IsMachineTask(task: Pick<TaskAssignment, 'AgentID' | 'ActionID' | 'PromptID'>): boolean;
|
|
67
|
+
/**
|
|
68
|
+
* True when a person completes this task.
|
|
69
|
+
*
|
|
70
|
+
* Deliberately NOT `!IsMachineTask(task)`. A task carrying both an executor column and a `UserID` is
|
|
71
|
+
* malformed, and the two questions should not silently answer each other for it: routing asks
|
|
72
|
+
* "is there a runner for this?" and the human lifecycle asks "is somebody expected to act?". A row
|
|
73
|
+
* that says yes to both is a bug worth seeing rather than a coin flip resolved by operator
|
|
74
|
+
* precedence.
|
|
75
|
+
*/
|
|
76
|
+
export declare function IsHumanTask(task: Pick<TaskAssignment, 'StepType' | 'UserID'>): boolean;
|
|
77
|
+
//# sourceMappingURL=task-predicates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-predicates.d.ts","sourceRoot":"","sources":["../src/task-predicates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,yEAAyE;AACzE,MAAM,MAAM,YAAY,GAAG,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;AAEtD,gEAAgE;AAChE,eAAO,MAAM,YAAY,EAAE,YAAiC,CAAC;AAE7D;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,8CAA+C,CAAC;AAE7E,wFAAwF;AACxF,MAAM,MAAM,cAAc,GAAG;IACzB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,KAAK,GAAE,YAA2B,GAAG,MAAM,CAEzE;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,KAAK,GAAE,YAA2B,GAAG,MAAM,CAEvE;AAED,2FAA2F;AAC3F,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,cAAc,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC,GAAG,OAAO,CAEtG;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,cAAc,EAAE,UAAU,GAAG,QAAQ,CAAC,GAAG,OAAO,CAEtF"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Who completes a task — a dispatcher, or a person.
|
|
3
|
+
*
|
|
4
|
+
* **Why this is a module and not three inline predicates.** The distinction is asked in SQL (claim
|
|
5
|
+
* reclamation, the human settle/expiry sweeps) and in TypeScript (claim routing), by code in two
|
|
6
|
+
* files, and it has been written down four different ways:
|
|
7
|
+
*
|
|
8
|
+
* `AgentID IS NOT NULL OR ActionID IS NOT NULL` — claim reclamation
|
|
9
|
+
* `StepType='Human'` — human settle, human expiry
|
|
10
|
+
* `StepType='Human' OR (StepType IS NULL AND UserID IS NOT NULL)` — human reopen
|
|
11
|
+
* `if (ActionID) … else if (PromptID) … else if (!AgentID) human` — claim routing
|
|
12
|
+
*
|
|
13
|
+
* Those were co-extensive when they were written and are not any more, and the way that surfaced is
|
|
14
|
+
* the reason this file exists. The first form predates the `PromptID` column: a Prompt step (and a
|
|
15
|
+
* ForEach/While with a prompt body) carries `PromptID` with both `AgentID` and `ActionID` null, so a
|
|
16
|
+
* prompt task whose owner crashed is claimed normally, expires normally, and is then **invisible to
|
|
17
|
+
* both reclamation statements** — `TryClaim` cannot retake it because it is no longer `Pending`, and
|
|
18
|
+
* `FindOrphanedInProgress` will not even report it. The graph sits `In Progress` forever with its
|
|
19
|
+
* submitting run `Paused` forever, and `IsGraphStalled` reports it healthy because an `In Progress`
|
|
20
|
+
* node counts as active. Zero diagnostics, anywhere.
|
|
21
|
+
*
|
|
22
|
+
* The fix is not "add `PromptID` to the OR" — that restores the coincidence and hands the same
|
|
23
|
+
* failure to whoever adds the next runner column. It is to say the thing once, here, in the terms
|
|
24
|
+
* the engine actually means, and have every site ask this module.
|
|
25
|
+
*
|
|
26
|
+
* @module @memberjunction/task-graph
|
|
27
|
+
*/
|
|
28
|
+
/** For `RunView.ExtraFilter`, which takes bare column names. */
|
|
29
|
+
export const BARE_COLUMNS = (column) => column;
|
|
30
|
+
/**
|
|
31
|
+
* The columns that assign a task to an executor, in the order claim routing tries them.
|
|
32
|
+
*
|
|
33
|
+
* Adding a runner means adding its column here and nowhere else — which is the whole point. If a
|
|
34
|
+
* future runner is assigned by something other than a column on the task, this list stops being
|
|
35
|
+
* sufficient and the predicate below must change shape rather than grow.
|
|
36
|
+
*/
|
|
37
|
+
export const EXECUTOR_COLUMNS = ['AgentID', 'ActionID', 'PromptID'];
|
|
38
|
+
/**
|
|
39
|
+
* SQL for "a dispatcher completes this task".
|
|
40
|
+
*
|
|
41
|
+
* Used to SCOPE reclamation: only a task something was supposed to be executing can have been
|
|
42
|
+
* abandoned by a crash. A human task's `In Progress` — if it ever reaches it — is a person's state
|
|
43
|
+
* to own, not a claim to reclaim.
|
|
44
|
+
*/
|
|
45
|
+
export function MachineTaskSQL(quote = BARE_COLUMNS) {
|
|
46
|
+
return `(${EXECUTOR_COLUMNS.map((c) => `${quote(c)} IS NOT NULL`).join(' OR ')})`;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* SQL for "a person completes this task".
|
|
50
|
+
*
|
|
51
|
+
* The `StepType IS NULL` arm is not defensive clutter: `StepType` is nullable and rows predating the
|
|
52
|
+
* column exist in real databases. A human task written before it would be invisible to a bare
|
|
53
|
+
* `StepType='Human'` filter — asked, never settled, never expired, dead forever. This is the wide
|
|
54
|
+
* form the reopen path already used; the settle and expiry paths were narrower, which is B4.
|
|
55
|
+
*/
|
|
56
|
+
export function HumanTaskSQL(quote = BARE_COLUMNS) {
|
|
57
|
+
return `(${quote('StepType')} = 'Human' OR (${quote('StepType')} IS NULL AND ${quote('UserID')} IS NOT NULL))`;
|
|
58
|
+
}
|
|
59
|
+
/** True when some runner owns this task. The TypeScript twin of {@link MachineTaskSQL}. */
|
|
60
|
+
export function IsMachineTask(task) {
|
|
61
|
+
return !!(task.AgentID || task.ActionID || task.PromptID);
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* True when a person completes this task.
|
|
65
|
+
*
|
|
66
|
+
* Deliberately NOT `!IsMachineTask(task)`. A task carrying both an executor column and a `UserID` is
|
|
67
|
+
* malformed, and the two questions should not silently answer each other for it: routing asks
|
|
68
|
+
* "is there a runner for this?" and the human lifecycle asks "is somebody expected to act?". A row
|
|
69
|
+
* that says yes to both is a bug worth seeing rather than a coin flip resolved by operator
|
|
70
|
+
* precedence.
|
|
71
|
+
*/
|
|
72
|
+
export function IsHumanTask(task) {
|
|
73
|
+
return task.StepType === 'Human' || (task.StepType == null && task.UserID != null);
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=task-predicates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-predicates.js","sourceRoot":"","sources":["../src/task-predicates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAKH,gEAAgE;AAChE,MAAM,CAAC,MAAM,YAAY,GAAiB,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC;AAE7D;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,SAAS,EAAE,UAAU,EAAE,UAAU,CAAU,CAAC;AAW7E;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,QAAsB,YAAY;IAC7D,OAAO,IAAI,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC;AACtF,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,YAAY,CAAC,QAAsB,YAAY;IAC3D,OAAO,IAAI,KAAK,CAAC,UAAU,CAAC,kBAAkB,KAAK,CAAC,UAAU,CAAC,gBAAgB,KAAK,CAAC,QAAQ,CAAC,gBAAgB,CAAC;AACnH,CAAC;AAED,2FAA2F;AAC3F,MAAM,UAAU,aAAa,CAAC,IAA+D;IACzF,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC;AAC9D,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,WAAW,CAAC,IAAiD;IACzE,OAAO,IAAI,CAAC,QAAQ,KAAK,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,CAAC;AACvF,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -19,6 +19,15 @@ import { IMetadataProvider, UserInfo } from '@memberjunction/core';
|
|
|
19
19
|
export type ProviderFactory = {
|
|
20
20
|
CreateProvider(): Promise<IMetadataProvider>;
|
|
21
21
|
};
|
|
22
|
+
/**
|
|
23
|
+
* How a runner reports progress inside one task body.
|
|
24
|
+
*
|
|
25
|
+
* A plain callback rather than an observer object because a runner should not need to know frames
|
|
26
|
+
* exist: it says what it is doing, and the dispatcher decides whether anyone is listening, how often
|
|
27
|
+
* to announce it, and in what shape. MUST NOT throw or block — the dispatcher wraps it, but a
|
|
28
|
+
* runner's own use should treat it as commentary, never a step of the work.
|
|
29
|
+
*/
|
|
30
|
+
export type TaskRunProgressCallback = (message: string, percent?: number) => void;
|
|
22
31
|
/**
|
|
23
32
|
* Runs one agent for one task node.
|
|
24
33
|
*
|
|
@@ -39,6 +48,8 @@ export type TaskActionRunParams = {
|
|
|
39
48
|
DependencyOutputs: Map<string, unknown>;
|
|
40
49
|
Provider: IMetadataProvider;
|
|
41
50
|
ContextUser: UserInfo;
|
|
51
|
+
/** Optional progress sink; the dispatcher turns calls into rate-limited `NodeProgress` frames. */
|
|
52
|
+
OnProgress?: TaskRunProgressCallback;
|
|
42
53
|
};
|
|
43
54
|
/** The outcome of one action node. */
|
|
44
55
|
export type TaskActionRunResult = {
|
|
@@ -82,6 +93,8 @@ export type TaskPromptRunParams = {
|
|
|
82
93
|
TemplateParameters?: Record<string, string>;
|
|
83
94
|
Provider: IMetadataProvider;
|
|
84
95
|
ContextUser: UserInfo;
|
|
96
|
+
/** Optional progress sink; the dispatcher turns calls into rate-limited `NodeProgress` frames. */
|
|
97
|
+
OnProgress?: TaskRunProgressCallback;
|
|
85
98
|
};
|
|
86
99
|
/** The outcome of one prompt node. */
|
|
87
100
|
export type TaskPromptRunResult = {
|
|
@@ -136,7 +149,56 @@ export type TaskGraphFrameKind =
|
|
|
136
149
|
/** A human task became actionable and is waiting on its assignee. */
|
|
137
150
|
| 'TaskAwaitingHuman'
|
|
138
151
|
/** Every node has reached a terminal state; `Status` is the graph's rolled-up outcome. */
|
|
139
|
-
| 'GraphSettled'
|
|
152
|
+
| 'GraphSettled'
|
|
153
|
+
/**
|
|
154
|
+
* A gating edge's verdict changed — satisfied, not taken, or held.
|
|
155
|
+
*
|
|
156
|
+
* Emitted on CHANGE, not on every poll (the dispatcher re-resolves edges each pass, and an
|
|
157
|
+
* unqualified emission would repeat every few seconds for as long as the graph is live, exactly
|
|
158
|
+
* the flood `logUnevaluableConditionOnce` exists to prevent in the log). This frame is what lets
|
|
159
|
+
* a viewer answer "why did this branch run?" — and what makes a permanent hold visible the
|
|
160
|
+
* moment it happens instead of after a forensic query.
|
|
161
|
+
*/
|
|
162
|
+
| 'GateDecision'
|
|
163
|
+
/**
|
|
164
|
+
* A task's claim changed hands or state — claimed, heartbeat lost, reclaimed.
|
|
165
|
+
*
|
|
166
|
+
* The R2-1 defect class ("a crashed worker's task wedges the graph forever with zero
|
|
167
|
+
* diagnostics") becomes a red badge instead of an invisible fact precisely because this frame
|
|
168
|
+
* exists.
|
|
169
|
+
*/
|
|
170
|
+
| 'ClaimChanged'
|
|
171
|
+
/**
|
|
172
|
+
* One dispatch pass finished for this graph — the engine's heartbeat.
|
|
173
|
+
*
|
|
174
|
+
* Carries the pass's counts (eligible / held / claimed / in flight). A run that is stuck is a
|
|
175
|
+
* strip of these ticking with nothing moving, which is the honest visual of a stall.
|
|
176
|
+
*/
|
|
177
|
+
| 'PassCompleted'
|
|
178
|
+
/** The graph was paused — by a person or by a breakpoint. Nothing new will be claimed. */
|
|
179
|
+
| 'GraphPaused'
|
|
180
|
+
/** The graph was resumed; claiming continues normally. */
|
|
181
|
+
| 'GraphResumed'
|
|
182
|
+
/**
|
|
183
|
+
* An eligible task carried a breakpoint, so the graph paused BEFORE the task was claimed.
|
|
184
|
+
* `TaskID` names the task the run is now parked in front of.
|
|
185
|
+
*/
|
|
186
|
+
| 'BreakpointHit'
|
|
187
|
+
/**
|
|
188
|
+
* A step allowance could not release anything on this pass — the named work is already running,
|
|
189
|
+
* or this host has no runner for it. The allowance is NOT spent, and `Reason` says so.
|
|
190
|
+
*
|
|
191
|
+
* Exists because the alternative is the worst shape a control can have: the button reports
|
|
192
|
+
* nothing, the allowance is gone, and the run does not move.
|
|
193
|
+
*/
|
|
194
|
+
| 'StepRefused'
|
|
195
|
+
/**
|
|
196
|
+
* A runner reported progress inside one task — message and optional percentage.
|
|
197
|
+
*
|
|
198
|
+
* The bridge from node-level execution (an agent run's own progress stream) up to graph-level
|
|
199
|
+
* observers, rate-limited by the dispatcher so a chatty runner cannot flood the topic.
|
|
200
|
+
*/
|
|
201
|
+
| 'NodeProgress';
|
|
140
202
|
/**
|
|
141
203
|
* One thing that happened, addressed by the graph it happened in.
|
|
142
204
|
*
|
|
@@ -174,6 +236,44 @@ export type TaskGraphFrame = {
|
|
|
174
236
|
/** How many nodes have reached a terminal state, and out of how many. */
|
|
175
237
|
CompletedCount?: number;
|
|
176
238
|
TotalCount?: number;
|
|
239
|
+
/** The `MJ: Task Dependencies` row the verdict is about. */
|
|
240
|
+
EdgeID?: string;
|
|
241
|
+
/** The edge's origin task. `TaskID` above is the edge's target. */
|
|
242
|
+
DependsOnTaskID?: string;
|
|
243
|
+
/** What the gate decided: the edge is open, the branch was not taken, or it cannot be answered yet. */
|
|
244
|
+
Verdict?: 'satisfied' | 'notTaken' | 'held';
|
|
245
|
+
/** The condition text, so a viewer can show WHY without loading the row. */
|
|
246
|
+
ConditionText?: string;
|
|
247
|
+
/** Human-readable detail: the hold reason, the override applied, or who paused the graph. */
|
|
248
|
+
Reason?: string;
|
|
249
|
+
/** What happened to the claim. */
|
|
250
|
+
ClaimEvent?: 'claimed' | 'heartbeat-lost' | 'reclaimed';
|
|
251
|
+
/** The dispatcher instance holding (or losing) the claim. */
|
|
252
|
+
ClaimedBy?: string;
|
|
253
|
+
/** When the claim lapses unless extended, ISO 8601. */
|
|
254
|
+
ClaimExpiresAt?: string;
|
|
255
|
+
/** Monotonic per-instance pass counter, so a viewer can order and gap-detect ticks. */
|
|
256
|
+
PassNumber?: number;
|
|
257
|
+
/** Tasks whose prerequisites were satisfied this pass. */
|
|
258
|
+
EligibleCount?: number;
|
|
259
|
+
/** Tasks held by an unanswerable condition or undecided fork. */
|
|
260
|
+
HeldCount?: number;
|
|
261
|
+
/** Tasks this instance claimed on this pass, for THIS graph. */
|
|
262
|
+
ClaimedCount?: number;
|
|
263
|
+
/**
|
|
264
|
+
* Tasks this INSTANCE is executing right now, across every graph it is working — not this
|
|
265
|
+
* graph's in-flight count.
|
|
266
|
+
*
|
|
267
|
+
* Named for what it measures because the two readings differ and a viewer cannot tell them
|
|
268
|
+
* apart: it is the dispatcher's own load against `MaxConcurrentTasks`, which is what explains a
|
|
269
|
+
* graph whose steps are ready but not starting. A per-graph count would answer a different
|
|
270
|
+
* question (and is visible anyway as the steps rendered running on the canvas).
|
|
271
|
+
*/
|
|
272
|
+
InstanceInFlightCount?: number;
|
|
273
|
+
/** What the runner says it is doing. */
|
|
274
|
+
ProgressMessage?: string;
|
|
275
|
+
/** 0–100 when the runner can quantify it. */
|
|
276
|
+
ProgressPercent?: number;
|
|
177
277
|
};
|
|
178
278
|
/**
|
|
179
279
|
* Receives dispatcher lifecycle frames.
|
|
@@ -223,6 +323,8 @@ export type TaskAgentRunParams = {
|
|
|
223
323
|
Provider: IMetadataProvider;
|
|
224
324
|
/** User the work runs as. */
|
|
225
325
|
ContextUser: UserInfo;
|
|
326
|
+
/** Optional progress sink; the dispatcher turns calls into rate-limited `NodeProgress` frames. */
|
|
327
|
+
OnProgress?: TaskRunProgressCallback;
|
|
226
328
|
};
|
|
227
329
|
/** Outcome of running one task node. */
|
|
228
330
|
export type TaskAgentRunResult = {
|
|
@@ -287,6 +389,13 @@ export type TaskGraphDispatcherConfig = {
|
|
|
287
389
|
* Identifies this dispatcher instance in `Task.ClaimedBy`. Must be stable for the process
|
|
288
390
|
* lifetime and distinct per instance — it is what lets reconciliation tell "my orphaned work"
|
|
289
391
|
* from "another instance's live work".
|
|
392
|
+
*
|
|
393
|
+
* **Distinctness is a correctness requirement, not a nicety** (C2). Every ownership guard in the
|
|
394
|
+
* claim protocol compares against this value, so two instances sharing one defeats all of them
|
|
395
|
+
* at once: A's heartbeat renews B's lease, and A's stale terminal write lands over B's live
|
|
396
|
+
* execution. Host+pid is NOT sufficient — `HOSTNAME` is unexported to child processes under
|
|
397
|
+
* systemd and pm2, and a containerised process is routinely pid 1 — which is why the server's
|
|
398
|
+
* default appends real entropy.
|
|
290
399
|
*/
|
|
291
400
|
InstanceID: string;
|
|
292
401
|
/**
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEnE;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,eAAe,GAAG;IAC1B,cAAc,IAAI,OAAO,CAAC,iBAAiB,CAAC,CAA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C;AAC/C,MAAM,MAAM,yBAAyB,GAAG;IACpC;;;;;;;;;;;OAWG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;;;;OAOG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB,+FAA+F;IAC/F,wBAAwB,EAAE,MAAM,CAAC;IAEjC,4DAA4D;IAC5D,kBAAkB,EAAE,MAAM,CAAC;IAE3B;;;;;;;;OAQG;IACH,mBAAmB,EAAE,MAAM,CAAC;IAE5B,+CAA+C;IAC/C,6BAA6B,EAAE,MAAM,CAAC;CACzC,CAAC;AAEF,wFAAwF;AACxF,eAAO,MAAM,yBAAyB,EAAE,IAAI,CAAC,yBAAyB,EAAE,YAAY,CAMnF,CAAC;AAEF,2FAA2F;AAC3F,MAAM,MAAM,oBAAoB,GAC1B,sBAAsB,GACtB,4BAA4B,GAC5B,mBAAmB,CAAC;AAE1B,6CAA6C;AAC7C,MAAM,MAAM,mBAAmB,GAAG;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,oBAAoB,CAAC;IAC7B,MAAM,EAAE,MAAM,CAAC;CAClB,CAAC"}
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAycA,wFAAwF;AACxF,MAAM,CAAC,MAAM,yBAAyB,GAAkD;IACpF,eAAe,EAAE,GAAG;IACpB,wBAAwB,EAAE,EAAE;IAC5B,kBAAkB,EAAE,CAAC;IACrB,mBAAmB,EAAE,CAAC;IACtB,6BAA6B,EAAE,GAAG;CACrC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/task-graph",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "6.1.0-edge.
|
|
4
|
+
"version": "6.1.0-edge.3",
|
|
5
5
|
"description": "MemberJunction: Task Graph - producer-agnostic submission and durable execution of dependency-ordered task graphs",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -9,17 +9,18 @@
|
|
|
9
9
|
"/dist"
|
|
10
10
|
],
|
|
11
11
|
"author": "MemberJunction.com",
|
|
12
|
-
"license": "
|
|
12
|
+
"license": "BUSL-1.1",
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@memberjunction/actions-base": "6.1.0-edge.
|
|
15
|
-
"@memberjunction/ai-agents": "6.1.0-edge.
|
|
16
|
-
"@memberjunction/ai-core-plus": "6.1.0-edge.
|
|
17
|
-
"@memberjunction/ai-prompts": "6.1.0-edge.
|
|
18
|
-
"@memberjunction/aiengine": "6.1.0-edge.
|
|
19
|
-
"@memberjunction/core": "6.1.0-edge.
|
|
20
|
-
"@memberjunction/core-entities": "6.1.0-edge.
|
|
21
|
-
"@memberjunction/global": "6.1.0-edge.
|
|
22
|
-
"@memberjunction/notifications": "6.1.0-edge.
|
|
14
|
+
"@memberjunction/actions-base": "6.1.0-edge.3",
|
|
15
|
+
"@memberjunction/ai-agents": "6.1.0-edge.3",
|
|
16
|
+
"@memberjunction/ai-core-plus": "6.1.0-edge.3",
|
|
17
|
+
"@memberjunction/ai-prompts": "6.1.0-edge.3",
|
|
18
|
+
"@memberjunction/aiengine": "6.1.0-edge.3",
|
|
19
|
+
"@memberjunction/core": "6.1.0-edge.3",
|
|
20
|
+
"@memberjunction/core-entities": "6.1.0-edge.3",
|
|
21
|
+
"@memberjunction/global": "6.1.0-edge.3",
|
|
22
|
+
"@memberjunction/notifications": "6.1.0-edge.3",
|
|
23
|
+
"@memberjunction/sql-dialect": "6.1.0-edge.3"
|
|
23
24
|
},
|
|
24
25
|
"devDependencies": {
|
|
25
26
|
"@types/node": "24.10.11",
|