agents-relay 2.0.119 → 2.0.120
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.
|
@@ -63,6 +63,7 @@ publish through the federated MCP tool events__publish; do not open NATS directl
|
|
|
63
63
|
For a direct non-sandbox local worker, use NEO_EVENTS_EMIT when the caller provides it.
|
|
64
64
|
As your FIRST execution action, before reading files, editing code, running commands, or doing other work,
|
|
65
65
|
you MUST publish exactly one canonical task.started event for this exact Job/Task.
|
|
66
|
+
Immediately after task.started, BEFORE reading task context or doing any implementation/review/recovery work, read the full authoritative Relay event contract at absolute path /Users/chengli/Workspace/agents-relay/skills/agents-relay/contracts/event-contract.md. If it cannot be read, publish task.failed with the blocker and stop. Do not rely only on this prompt summary or a relative path.
|
|
66
67
|
|
|
67
68
|
${task.adapter === 'chatgpt' ? `Because ChatGPT execution continues asynchronously after the submit process exits, you MUST keep reporting liveness while the task is active. Publish meaningful progress/milestone events when there is real progress to report. If no meaningful milestone has been published for 30 seconds during active work, publish a non-terminal task.heartbeat event with status running, visibility orchestrator, this exact source.id, and a concise description of the current operation. Continue heartbeats after each further 30 seconds of active silence until a terminal task event is published. Do not invent percentage progress.` : `You MAY publish progress events while working. For long silent active work, follow the events-bus heartbeat policy.`}
|
|
68
69
|
Before returning or allowing the worker process to exit, you MUST publish exactly one canonical terminal event:
|
package/dist/task-context.js
CHANGED
|
@@ -17,5 +17,5 @@ export function taskReferencePrompt(repository, jobId, taskId, executionId, mana
|
|
|
17
17
|
if (managedInput !== undefined && index < 0)
|
|
18
18
|
throw new Error(`Missing managed execution event contract for ${jobId}/${taskId}/${executionId}`);
|
|
19
19
|
const eventContract = index >= 0 ? `\n\n${managedInput.slice(index)}` : '';
|
|
20
|
-
return `[Agents Relay managed task]\nRepository: ${repository}\nJob ID: ${jobId}\nTask ID: ${taskId}\nExecution ID: ${executionId}\n\nRetrieve the authoritative task contract using the connected NeoY shell/Agents Relay CLI:\n agents-relay task context --repo ${repository} --id ${jobId} --task-id ${taskId} --execution-id ${executionId}\nRead the returned Task input, dependencies, Plan, project context, and output requirements before execution. Check that the execution ID matches. If the CLI or context is unavailable, report blocked; never guess or execute from this envelope. Continue in this thread; Relay owns completion and review. Do not create another Job.${eventContract}`;
|
|
20
|
+
return `[Agents Relay managed task]\nRepository: ${repository}\nJob ID: ${jobId}\nTask ID: ${taskId}\nExecution ID: ${executionId}\n\nRetrieve the authoritative task contract using the connected NeoY shell/Agents Relay CLI:\n agents-relay task context --repo ${repository} --id ${jobId} --task-id ${taskId} --execution-id ${executionId}\nRead the returned Task input, dependencies, Plan, project context, and output requirements before execution. Check that the execution ID matches. If the CLI or context is unavailable, report blocked; never guess or execute from this envelope. Continue in this thread; Relay owns completion and review. Do not create another Job. After the mandatory task.started event, first read /Users/chengli/Workspace/agents-relay/skills/agents-relay/contracts/event-contract.md in full before further task work; if unavailable, send task.failed and stop.${eventContract}`;
|
|
21
21
|
}
|