You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: WORKFLOW-EXECUTOR-CONTRACT.md
+43-2Lines changed: 43 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
# Workflow Executor — Contract Types
2
2
3
3
> Types exchanged between the **orchestrator (server)**, the **executor (agent-nodejs)**, and the **frontend**.
4
-
> Last updated: 2026-03-25
4
+
> Last updated: 2026-03-26
5
5
6
6
---
7
7
@@ -12,18 +12,59 @@
12
12
The executor polls for the current pending step of a run. The server must return **one object** (not an array), or `null` if the run is not found.
13
13
14
14
```typescript
15
+
interfaceStepUser {
16
+
id:number;
17
+
email:string;
18
+
firstName:string;
19
+
lastName:string;
20
+
team:string;
21
+
renderingId:number;
22
+
role:string;
23
+
permissionLevel:string;
24
+
tags:Record<string, string>;
25
+
}
26
+
15
27
interfacePendingStepExecution {
16
28
runId:string;
17
29
stepId:string;
18
30
stepIndex:number;
19
31
baseRecordRef:RecordRef;
20
32
stepDefinition:StepDefinition;
21
33
previousSteps:Step[];
34
+
user:StepUser; // identity of the user who initiated the step
22
35
}
23
36
```
24
37
25
38
> **`null` response** → executor throws `RunNotFoundError` → HTTP 404 returned to caller.
26
39
40
+
### CollectionSchema
41
+
42
+
Schema of a collection, returned by the orchestrator via `GET /liana/v1/collections/:collectionName`. Used by the executor to resolve primary keys and action endpoints.
43
+
44
+
```typescript
45
+
interfaceCollectionSchema {
46
+
collectionName:string;
47
+
collectionDisplayName:string;
48
+
primaryKeyFields:string[];
49
+
fields:FieldSchema[];
50
+
actions:ActionSchema[];
51
+
}
52
+
53
+
interfaceFieldSchema {
54
+
fieldName:string;
55
+
displayName:string;
56
+
isRelationship:boolean;
57
+
relationType?:"BelongsTo"|"HasMany"|"HasOne";
58
+
relatedCollectionName?:string;
59
+
}
60
+
61
+
interfaceActionSchema {
62
+
name:string;
63
+
displayName:string;
64
+
endpoint:string; // route path used by the agent to execute the action
0 commit comments