agents-relay 2.0.205 → 2.0.207

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.
@@ -117,6 +117,11 @@ async function discoverShortcut(agent, projectPath, neoRoot) {
117
117
  return actual;
118
118
  }
119
119
  function inside(root, path) { const rel = relative(root, path); return rel === '' || (rel !== '..' && !rel.startsWith(`..${sep}`) && !isAbsolute(rel)); }
120
+ // Only Vlog's Visioner evidence follows the source-manifest/index artifact schema.
121
+ // Distribution Visioner has a separate domain contract and cannot reuse it.
122
+ function requiresVlogVisionerEvidence(agent) {
123
+ return agent === 'visioner' || agent === 'vlog-visioner';
124
+ }
120
125
  async function validateVisionerResult(result, projectRoot) {
121
126
  const artifacts = result.artifacts, output = result.output;
122
127
  if (!artifacts || Array.isArray(artifacts) || typeof artifacts !== 'object' || !['vision-evidence.json', 'vision-segment-index.json', 'metadata.json'].every(name => Object.prototype.hasOwnProperty.call(artifacts, name) && typeof output[name] === 'string'))
@@ -278,7 +283,7 @@ export async function runAgentShortcut(options) {
278
283
  artifactHashes[relative(projectReal, actual)] = digestBytes(await readFile(actual));
279
284
  }
280
285
  const nodeAgent = graph.nodes.find(node => node.id === nodeId)?.agent;
281
- if (nodeAgent?.toLowerCase() === 'visioner')
286
+ if (requiresVlogVisionerEvidence(nodeAgent?.toLowerCase()))
282
287
  await validateVisionerResult(output, projectReal);
283
288
  state.nodes[nodeId] = structuredClone(output);
284
289
  state.artifactHashes[nodeId] = artifactHashes;
@@ -308,6 +313,14 @@ export async function runAgentShortcut(options) {
308
313
  let effectsStarted = false;
309
314
  let shortcutModuleEntered = false;
310
315
  try {
316
+ // Shortcut execution is a whole-Graph optimization, not a per-node Worker scheduler.
317
+ // Check complete coverage BEFORE importing or invoking any shortcut. Otherwise a
318
+ // missing later role can strand earlier side effects in Troubleshooter recovery.
319
+ // The existing durable shortcut.failed transition safely routes an untouched Graph
320
+ // to its original Worker; a previously checkpointed partial run still fails closed.
321
+ const missing = shortcuts.filter(item => !item.path);
322
+ if (missing.length)
323
+ return await fallback(`Incomplete Agent Graph shortcut coverage: ${missing.map(item => item.nodeId).join(', ')}; use the original Worker`);
311
324
  const incoming = new Map(graph.nodes.map(node => [node.id, graph.edges.filter(edge => edge.to === node.id).map(edge => edge.from)]));
312
325
  const max = Math.max(1, Math.min(8, options.concurrency ?? 4));
313
326
  const shortcutByNode = new Map(shortcuts.map(item => [item.nodeId, item.path]));
@@ -352,7 +365,7 @@ export async function runAgentShortcut(options) {
352
365
  return result.output[name];
353
366
  });
354
367
  const projectReal = await realpath(projectPath);
355
- if (node.agent.toLowerCase() === 'visioner')
368
+ if (requiresVlogVisionerEvidence(node.agent.toLowerCase()))
356
369
  await validateVisionerResult(result, projectReal);
357
370
  const artifactHashes = {};
358
371
  for (const artifact of artifactPaths) {
package/dist/cli-help.js CHANGED
@@ -58,9 +58,10 @@ Shortcut execution:
58
58
  [--store-dir DIR] [--project-path DIR] [--neo-root DIR] [--concurrency 4]
59
59
 
60
60
  The selected Task must have an Agent Graph. Project shortcuts at
61
- agents/.shortcut/<agent>.agent.mjs override Neo shared shortcuts. Missing or
62
- shortcuts that fail before effects are returned to the normal durable Worker
63
- queue. Nonhuman waits resume only from a matching SQLite Task receipt; EventBus
61
+ agents/.shortcut/<agent>.agent.mjs override Neo shared shortcuts. A Graph
62
+ with any missing shortcut falls back to the normal durable Worker before
63
+ executing any module; mixing shortcut and Worker nodes in one Graph is unsupported.
64
+ Shortcuts that fail before effects also return to the Worker queue. Nonhuman waits resume only from a matching SQLite Task receipt; EventBus
64
65
  events are wake signals. Human approval remains hostInvocation-only.
65
66
  Shortcut Job completion requires durable contentOnly=true and no PR, merge, or review gates.
66
67
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agents-relay",
3
- "version": "2.0.205",
3
+ "version": "2.0.207",
4
4
  "description": "Durable async agent jobs coordinated through GitHub pull requests",
5
5
  "repository": {
6
6
  "type": "git",