agents-relay 2.0.217 → 2.0.218
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.
|
@@ -91,7 +91,9 @@ export async function runShortcutModelNode(options) {
|
|
|
91
91
|
const record = value;
|
|
92
92
|
if (record.status !== 'COMPLETED' || !record.output || typeof record.output !== 'object' || Array.isArray(record.output))
|
|
93
93
|
throw new Error('Worker Task reported success without contract-valid node output');
|
|
94
|
-
// Some
|
|
94
|
+
// Some Workers report {path,kind:"human-readable description"}.
|
|
95
|
+
// Only the checked on-disk path is an artifact identity; `kind` is not
|
|
96
|
+
// a declared filesystem type or authorization claim.
|
|
95
97
|
// Convert ONLY exact file records to the Shortcut contract's path list;
|
|
96
98
|
// the Graph executor still verifies realpath containment and SHA-256.
|
|
97
99
|
if (Array.isArray(record.artifacts)) {
|
|
@@ -108,11 +110,12 @@ export async function runShortcutModelNode(options) {
|
|
|
108
110
|
&& typeof ref.path === 'string' && ref.path.trim())
|
|
109
111
|
return ref.path;
|
|
110
112
|
if (fields.length === 2 && fields.includes('path')
|
|
111
|
-
&& ((fields.includes('type') && ref.type === 'file') ||
|
|
113
|
+
&& ((fields.includes('type') && ref.type === 'file') ||
|
|
114
|
+
(fields.includes('kind') && typeof ref.kind === 'string' && ref.kind.trim()))
|
|
112
115
|
&& typeof ref.path === 'string' && ref.path.trim())
|
|
113
116
|
return ref.path;
|
|
114
117
|
}
|
|
115
|
-
throw new Error('Worker node returned unsupported artifact entry; expected a file path, {path}, {type:"file",path} or {kind:"
|
|
118
|
+
throw new Error('Worker node returned unsupported artifact entry; expected a file path, {path}, {type:"file",path} or {kind:"description",path}');
|
|
116
119
|
});
|
|
117
120
|
return { ...record, artifacts: files };
|
|
118
121
|
}
|