agents-relay 2.0.143 → 2.0.144
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/dist/cli-workflow.js +10 -1
- package/package.json +1 -1
- package/workflow/main.mmd +28 -12
package/dist/cli-workflow.js
CHANGED
|
@@ -17,6 +17,15 @@ export function workflowCliResult(args) {
|
|
|
17
17
|
const index = buildWorkflowUsageIndex(graphs);
|
|
18
18
|
if (verb === 'discover')
|
|
19
19
|
return { graphs: [...graphs.keys()], symbols: [...new Set(index.map(x => x.id))].sort() };
|
|
20
|
+
if (verb === 'actions') {
|
|
21
|
+
const actionIds = [...new Set(index.filter(item => item.kind === 'action').map(item => item.id))].sort();
|
|
22
|
+
return {
|
|
23
|
+
count: actionIds.length,
|
|
24
|
+
actions: actionIds.map(id => ({ id, graphReferences: whereWorkflowSymbol(index, id, 'action'), cli: 'inspect-only; execution requires owning Graph runtime' })),
|
|
25
|
+
taskControls: ['task.retry', 'task.recover', 'task.cancel', 'task.unblock', 'task.escalate', 'task.resume-troubleshooter'],
|
|
26
|
+
warning: 'Task controls are not equivalent to arbitrary internal Graph Action execution. No direct CLI bypass of guards or SQLite fencing.',
|
|
27
|
+
};
|
|
28
|
+
}
|
|
20
29
|
if (verb === 'where')
|
|
21
30
|
return whereWorkflowSymbol(index, value('--id'));
|
|
22
31
|
if (verb === 'inspect') {
|
|
@@ -84,5 +93,5 @@ export function workflowCliResult(args) {
|
|
|
84
93
|
}
|
|
85
94
|
if (verb === 'action')
|
|
86
95
|
throw new Error('durable graph authorization required; unsafe action request refused');
|
|
87
|
-
throw new Error('workflow supports discover, inspect, where, evaluate
|
|
96
|
+
throw new Error('workflow supports discover, actions, inspect, where, evaluate, verify, trace; mutations require durable authorization');
|
|
88
97
|
}
|
package/package.json
CHANGED
package/workflow/main.mmd
CHANGED
|
@@ -1,17 +1,24 @@
|
|
|
1
1
|
%% dashboard: presentation-only — not registered with GraphRuntime or the executable Graph DSL.
|
|
2
|
-
%%
|
|
2
|
+
%% PRINCIPLES (this graph is a readable overview, not an executable policy):
|
|
3
|
+
%% CONTRACT defines typed events, permissions and invariants; GRAPH defines legal transitions,
|
|
4
|
+
%% guards and ordering; CODE supplies verified facts and implements authorized effects.
|
|
5
|
+
%% GUARD checks SQLite-backed facts without mutation; ACTION requests a Graph-authorized
|
|
6
|
+
%% mutation; EFFECT performs/verifies an external side effect, never decides policy.
|
|
7
|
+
%% Unknown effects must reconcile before retry. CLI can inspect/trace graph symbols;
|
|
8
|
+
%% only explicitly authorized task controls are callable as CLI workflow actions.
|
|
9
|
+
%% Nodes link to canonical executable workflow graphs. SQLite remains authoritative.
|
|
3
10
|
flowchart LR
|
|
4
|
-
objective["
|
|
5
|
-
planner["Planner"]
|
|
6
|
-
worker["Worker"]
|
|
7
|
-
reviewer["Reviewer"]
|
|
8
|
-
delivery["Merge / Delivery"]
|
|
9
|
-
verify["Objective
|
|
10
|
-
completed["Completed"]
|
|
11
|
-
trouble["Troubleshooter"]
|
|
12
|
-
recover{"Recovery
|
|
13
|
-
escalation["
|
|
14
|
-
fix["
|
|
11
|
+
objective["state: Job Objective"]
|
|
12
|
+
planner["graph: Planner"]
|
|
13
|
+
worker["graph: Worker"]
|
|
14
|
+
reviewer["graph: Reviewer"]
|
|
15
|
+
delivery["graph: Merge / Delivery"]
|
|
16
|
+
verify["guard: Objective verified?"]
|
|
17
|
+
completed["state: Completed"]
|
|
18
|
+
trouble["graph: Troubleshooter"]
|
|
19
|
+
recover{"guard: Recovery verified?"}
|
|
20
|
+
escalation["graph: Human escalation"]
|
|
21
|
+
fix["graph: Review changes loop"]
|
|
15
22
|
|
|
16
23
|
objective --> planner
|
|
17
24
|
planner --> worker
|
|
@@ -36,6 +43,14 @@ flowchart LR
|
|
|
36
43
|
recover -->|human action required| escalation
|
|
37
44
|
escalation -->|resolved: reconcile and resume| trouble
|
|
38
45
|
|
|
46
|
+
subgraph principles["Contract / Graph / Code — principal rules"]
|
|
47
|
+
contractNote["contract: Event schema + authority + permissions"]
|
|
48
|
+
graphNote["graph: Transitions + Guards + Action ordering"]
|
|
49
|
+
codeNote["code: Facts + SQLite + guarded effects"]
|
|
50
|
+
contractNote ~~~ graphNote ~~~ codeNote
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
|
|
39
54
|
click objective href "job-lifecycle.mmd" "Job lifecycle"
|
|
40
55
|
click planner href "planner-orchestration.mmd" "Planner orchestration"
|
|
41
56
|
click worker href "task-lifecycle.mmd" "Task lifecycle"
|
|
@@ -51,6 +66,7 @@ flowchart LR
|
|
|
51
66
|
classDef normal fill:#eff6ff,stroke:#2563eb,color:#1e40af
|
|
52
67
|
class trouble,recover,escalation exception
|
|
53
68
|
class objective,planner,worker,reviewer,delivery,verify,completed,fix normal
|
|
69
|
+
class contractNote,graphNote,codeNote normal
|
|
54
70
|
|
|
55
71
|
%% Failed/unknown transitions are red; verified retries remain blue.
|
|
56
72
|
linkStyle 8,9,10,11,12,18 stroke:#be3030,stroke-width:2px
|