agents-relay 2.0.99 → 2.0.100
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/adapters.js +1 -1
- package/dist/task-context.js +7 -2
- package/package.json +1 -1
package/dist/adapters.js
CHANGED
|
@@ -323,7 +323,7 @@ export class ChatGptAdapter {
|
|
|
323
323
|
const policy = chatGptTabClosePolicy(task.chatgptTabClosePolicy, this.tabClosePolicy);
|
|
324
324
|
const submit = () => (this.runner ?? browserWorkerRunner())(definition, {
|
|
325
325
|
prompt: task.chatgptThreadDelivery?.threadSource === 'implementation' && task.chatgptThreadDelivery.repository && task.chatgptThreadDelivery.executionId
|
|
326
|
-
? taskReferencePrompt(task.chatgptThreadDelivery.repository, task.chatgptThreadDelivery.jobId, task.id, task.chatgptThreadDelivery.executionId) : task.input,
|
|
326
|
+
? taskReferencePrompt(task.chatgptThreadDelivery.repository, task.chatgptThreadDelivery.jobId, task.id, task.chatgptThreadDelivery.executionId, task.input) : task.input,
|
|
327
327
|
...(task.attachments?.length ? { files: task.attachments } : {}),
|
|
328
328
|
...(task.chatgptThreadDelivery ? { thread: task.chatgptThreadDelivery } : {}),
|
|
329
329
|
tabClosePolicy: policy,
|
package/dist/task-context.js
CHANGED
|
@@ -11,6 +11,11 @@ export function taskExecutionContext(job, taskId, executionId) {
|
|
|
11
11
|
projectPath: job.projectPath, state: job.state }, task, comments: task.comments ?? [], dependencies: task.dependencies.map(id => job.tasks.find(item => item.id === id) ?? { id, missing: true }),
|
|
12
12
|
plan: job.plans?.find(plan => plan.id === task.planningDecisionId) ?? null };
|
|
13
13
|
}
|
|
14
|
-
export function taskReferencePrompt(repository, jobId, taskId, executionId) {
|
|
15
|
-
|
|
14
|
+
export function taskReferencePrompt(repository, jobId, taskId, executionId, managedInput) {
|
|
15
|
+
const marker = '[Execution event contract — mandatory]';
|
|
16
|
+
const index = managedInput?.indexOf(marker) ?? -1;
|
|
17
|
+
if (managedInput !== undefined && index < 0)
|
|
18
|
+
throw new Error(`Missing managed execution event contract for ${jobId}/${taskId}/${executionId}`);
|
|
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}`;
|
|
16
21
|
}
|