agents-relay 1.0.21 → 1.0.22
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/reconciler.js +19 -5
- package/package.json +1 -1
package/dist/reconciler.js
CHANGED
|
@@ -26,18 +26,32 @@ ${task.input}
|
|
|
26
26
|
[Output contract]
|
|
27
27
|
${output}
|
|
28
28
|
|
|
29
|
-
[Execution event contract]
|
|
29
|
+
[Execution event contract — mandatory]
|
|
30
30
|
Use the canonical Neo events-bus with exactly Job ${job.id} and Task ${task.id}.
|
|
31
31
|
Follow the events-bus skill/protocol. For sandboxed Codex or hosted ChatGPT,
|
|
32
32
|
publish through the federated MCP tool events__publish; do not open NATS directly.
|
|
33
33
|
For a direct non-sandbox local worker, use NEO_EVENTS_EMIT when the caller provides it.
|
|
34
34
|
|
|
35
|
+
As your FIRST execution action, before reading files, editing code, running commands, or doing other work,
|
|
36
|
+
you MUST publish exactly one canonical task.started event for this exact Job/Task.
|
|
37
|
+
|
|
35
38
|
You MAY publish progress events while working.
|
|
36
|
-
Before
|
|
39
|
+
Before returning or allowing the worker process to exit, you MUST publish exactly one canonical terminal event:
|
|
37
40
|
- task.completed only after the declared output is durable;
|
|
38
|
-
- task.failed
|
|
39
|
-
- task.blocked when human/external action is required
|
|
40
|
-
|
|
41
|
+
- task.failed for implementation, tool, command, test, patch, commit, push, runtime, or other execution failure that prevents completion;
|
|
42
|
+
- task.blocked only when genuine human/external action is required;
|
|
43
|
+
- task.cancelled only when execution was cancelled.
|
|
44
|
+
|
|
45
|
+
If any execution step fails and you cannot continue, publish task.failed with the concrete reason BEFORE exiting.
|
|
46
|
+
Never exit after task.started without publishing exactly one terminal task event.
|
|
47
|
+
Do not publish duplicate terminal task events.
|
|
48
|
+
The worker owns task.started and task terminal events. Relay-owned task.process.launched, task.process.exited,
|
|
49
|
+
and task.process.async_exited are process lifecycle only and NEVER replace the worker task lifecycle.
|
|
50
|
+
The ChatGPT/Codex conversation or process exit is never the task result.
|
|
51
|
+
|
|
52
|
+
[Final event gate]
|
|
53
|
+
Before your final return, verify that a terminal event for this exact Job/Task was published.
|
|
54
|
+
If no terminal event has been published, publish task.failed before exiting.`;
|
|
41
55
|
}
|
|
42
56
|
export class Reconciler {
|
|
43
57
|
store;
|