@agentuity/cli 0.0.78 → 0.0.79

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.
@@ -236,38 +236,55 @@ const AgentuityBundler: BunPlugin = {
236
236
  let newsource = await Bun.file(args.path).text();
237
237
  if (args.path.startsWith(srcDir)) {
238
238
  const contents = transpiler.transformSync(newsource);
239
- const result = await parseAgentMetadata(
240
- rootDir,
241
- args.path,
242
- contents,
243
- projectId,
244
- deploymentId
245
- );
246
239
 
247
- // Skip files that don't have a createAgent export
248
- if (result === undefined) {
249
- return {
250
- contents: newsource,
251
- loader: 'ts',
252
- };
253
- }
240
+ // Check if this is an eval file (eval.ts)
241
+ if (args.path.endsWith('/eval.ts')) {
242
+ // parseEvalMetadata will find the agent from the import statement
243
+ const [ns] = await parseEvalMetadata(
244
+ rootDir,
245
+ args.path,
246
+ contents,
247
+ projectId,
248
+ deploymentId,
249
+ undefined, // No agentId - will be resolved from import
250
+ agentMetadata
251
+ );
252
+ newsource = ns;
253
+ } else {
254
+ // Handle regular agent files
255
+ const result = await parseAgentMetadata(
256
+ rootDir,
257
+ args.path,
258
+ contents,
259
+ projectId,
260
+ deploymentId
261
+ );
262
+
263
+ // Skip files that don't have a createAgent export
264
+ if (result === undefined) {
265
+ return {
266
+ contents: newsource,
267
+ loader: 'ts',
268
+ };
269
+ }
254
270
 
255
- const [ns, md] = result;
256
- newsource = ns;
257
-
258
- // Only process files that actually export an agent
259
- if (md.has('name')) {
260
- const newAgentName = md.get('name');
261
- for (const [, kv] of agentMetadata) {
262
- const found = kv.get('name');
263
- if (newAgentName === found) {
264
- throw new AgentNameDuplicateError({
265
- message: `The agent in ${kv.get('filename')} and the agent in ${md.get('filename')} have the same name (${found}). Agent Names must be unique within a project.`,
266
- });
271
+ const [ns, md] = result;
272
+ newsource = ns;
273
+
274
+ // Only process files that actually export an agent
275
+ if (md.has('name')) {
276
+ const newAgentName = md.get('name');
277
+ for (const [, kv] of agentMetadata) {
278
+ const found = kv.get('name');
279
+ if (newAgentName === found) {
280
+ throw new AgentNameDuplicateError({
281
+ message: `The agent in ${kv.get('filename')} and the agent in ${md.get('filename')} have the same name (${found}). Agent Names must be unique within a project.`,
282
+ });
283
+ }
267
284
  }
268
- }
269
285
 
270
- agentMetadata.set(md.get('name')!, md);
286
+ agentMetadata.set(md.get('name')!, md);
287
+ }
271
288
  }
272
289
  }
273
290
  return {
@@ -276,19 +293,6 @@ const AgentuityBundler: BunPlugin = {
276
293
  };
277
294
  });
278
295
 
279
- build.onLoad({ filter: /\/eval\.ts$/, namespace: 'file' }, async (args) => {
280
- let newsource = await Bun.file(args.path).text();
281
- if (args.path.startsWith(srcDir)) {
282
- const contents = transpiler.transformSync(newsource);
283
- const [ns] = parseEvalMetadata(rootDir, args.path, contents, projectId, deploymentId);
284
- newsource = ns;
285
- }
286
- return {
287
- contents: newsource,
288
- loader: 'ts',
289
- };
290
- });
291
-
292
296
  const patches = generatePatches();
293
297
  for (const [, patch] of patches) {
294
298
  let modulePath = join('node_modules', patch.module, '.*');
@@ -559,7 +559,6 @@ export const deploySubcommand = createSubcommand({
559
559
 
560
560
  // Show deployment URLs
561
561
  if (complete?.publicUrls) {
562
- tui.arrow(tui.bold(tui.padRight('Deployment ID:', 17)) + tui.link(deployment.id));
563
562
  if (complete.publicUrls.custom?.length) {
564
563
  for (const url of complete.publicUrls.custom) {
565
564
  tui.arrow(tui.bold(tui.padRight('Deployment URL:', 17)) + tui.link(url));