agents-relay 2.0.176 → 2.0.177

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 CHANGED
@@ -389,7 +389,7 @@ export class ChatGptAdapter {
389
389
  const referencePrompt = task.chatgptThreadDelivery && references.length
390
390
  ? `\n\n[Inline immutable local reference snapshots]\nThese complete verified snapshots are included in this message because this thread delivery does not attach local files. Follow their contents according to their declared roles.\n${references.map(reference => `\n--- ${reference.role}: ${reference.path} (sha256:${reference.sha256}) ---\n${reference.content}\n--- end snapshot ---`).join('\n')}`
391
391
  : references.length
392
- ? `\n\n[Attached immutable Agent Contract]\nAfter publishing the required task.started event, read the attached contract file and verify its SHA-256 before following it. If it is unreadable or mismatched, report a concrete failure.\n${references.map(reference => `- ${reference.path} (sha256:${reference.sha256})`).join('\n')}`
392
+ ? `\n\n[Attached immutable Agent Contract]\nAfter publishing the required task.started event, read the attached immutable contract snapshot and follow it. Relay owns snapshot integrity; do not hash or compare the original .agent.md. If the attached snapshot is unreadable, report a concrete failure.\n${references.map(reference => `- ${reference.path} (sha256:${reference.sha256})`).join('\n')}`
393
393
  : '';
394
394
  if (task.chatgptThreadDelivery && declaredPromptReferences(task.input).length) {
395
395
  const unresolved = declaredPromptReferences(task.input)
@@ -72,7 +72,7 @@ export async function buildReferenceFirstPrompt(input) {
72
72
  return buildAgentPrompt({
73
73
  role: input.role,
74
74
  system: (input.bootstrap ? input.bootstrap.trim() + '\n' : '') +
75
- 'After the required execution startup action, read the referenced immutable Agent Contract. Verify its SHA-256 before following it. If unreadable or mismatched, report a concrete failure; never guess its instructions.',
75
+ 'After the required execution startup action, read the referenced immutable Agent Contract snapshot and follow it. Relay owns snapshot integrity and version identity; do not compute a hash of the source .agent.md or compare it to the snapshot. If the snapshot is unreadable, report a concrete failure; never guess its instructions.',
76
76
  user: input.user,
77
77
  references: [reference],
78
78
  });
@@ -242,11 +242,10 @@ export async function resolveAgentContract(context, agentName) {
242
242
  return { agent, definition, hash: resolved.hash, sources: resolved.sources };
243
243
  }
244
244
  export async function agentContractPrompt(context, agentName) {
245
- const { agent, definition, hash, sources } = await resolveAgentContract(context, agentName);
245
+ const { agent, definition, sources } = await resolveAgentContract(context, agentName);
246
246
  return `[Selected task agent contract]
247
247
  Agent: ${agent.name}
248
248
  Source: ${agent.path ?? agent.source}
249
- Effective contract SHA-256: ${hash}
250
249
  Contract layers: ${sources.join(' -> ')}
251
250
 
252
251
  The following Markdown is the authoritative behavioral contract for this Task agent.
package/dist/planner.js CHANGED
@@ -498,7 +498,7 @@ export class AgentObjectivePlanner {
498
498
  const instructions = effectivePlanner?.content ?? await readFile(this.agentFile, 'utf8');
499
499
  const contract = await readFile(DEFAULT_TASK_JOB_CONTRACT, 'utf8');
500
500
  const resolvedContext = context.executionContext ? executionContextPrompt(context.executionContext) + '\n\n' : '';
501
- const prompt = renderAgentPrompt(await buildReferenceFirstPrompt({ role: 'planner', adapter: 'codex', system: (effectivePlanner ? `[Effective planner contract SHA-256: ${effectivePlanner.hash}]\n\n` : '') + instructions.trim() + '\n\n## Shared Task / Job Contract\n\n' + contract.trim(), user: resolvedContext + '## Durable planner input\n\n' + plannerInput(context) }), 'codex');
501
+ const prompt = renderAgentPrompt(await buildReferenceFirstPrompt({ role: 'planner', adapter: 'codex', system: instructions.trim() + '\n\n## Shared Task / Job Contract\n\n' + contract.trim(), user: resolvedContext + '## Durable planner input\n\n' + plannerInput(context) }), 'codex');
502
502
  const runAgent = (input) => new Promise((resolve, reject) => {
503
503
  // Plan apply writes unified relay.sqlite beside AGENTS_RELAY_STORE_DIR.
504
504
  const child = spawnOwnedProcess(this.command, buildPlannerCodexArgs(relayStoreDirectory(), input), { invocation: 'planner.agent', signal, correlation: { jobId: context.job.id }, spawn: { cwd: context.executionContext?.project.path, stdio: ['ignore', 'pipe', 'pipe'] } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agents-relay",
3
- "version": "2.0.176",
3
+ "version": "2.0.177",
4
4
  "description": "Durable async agent jobs coordinated through GitHub pull requests",
5
5
  "repository": {
6
6
  "type": "git",