@orchagent/cli 0.3.42 → 0.3.43

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.
@@ -17,8 +17,8 @@ exports.agentsMdAdapter = {
17
17
  canConvert(agent) {
18
18
  const warnings = [];
19
19
  const errors = [];
20
- if (agent.type === 'code') {
21
- errors.push('Code agents cannot be converted to AGENTS.md');
20
+ if (agent.type === 'tool') {
21
+ errors.push('Tool agents cannot be converted to AGENTS.md');
22
22
  return { canConvert: false, warnings, errors };
23
23
  }
24
24
  if (!agent.prompt) {
@@ -27,9 +27,9 @@ exports.claudeCodeAdapter = {
27
27
  canConvert(agent) {
28
28
  const warnings = [];
29
29
  const errors = [];
30
- // Code agents cannot be converted
31
- if (agent.type === 'code') {
32
- errors.push('Code agents cannot be converted to Claude Code sub-agents (they require execution)');
30
+ // Tool agents cannot be converted
31
+ if (agent.type === 'tool') {
32
+ errors.push('Tool agents cannot be converted to Claude Code sub-agents (they require execution)');
33
33
  return { canConvert: false, warnings, errors };
34
34
  }
35
35
  // Check for prompt
@@ -18,8 +18,8 @@ exports.cursorAdapter = {
18
18
  canConvert(agent) {
19
19
  const warnings = [];
20
20
  const errors = [];
21
- if (agent.type === 'code') {
22
- errors.push('Code agents cannot be converted to Cursor rules');
21
+ if (agent.type === 'tool') {
22
+ errors.push('Tool agents cannot be converted to Cursor rules');
23
23
  return { canConvert: false, warnings, errors };
24
24
  }
25
25
  if (!agent.prompt) {
@@ -80,7 +80,7 @@ function registerAgentsCommand(program) {
80
80
  filteredAgents.forEach((agent) => {
81
81
  const name = agent.name;
82
82
  const version = agent.version;
83
- const type = agent.type || 'code';
83
+ const type = agent.type || 'tool';
84
84
  const stars = agent.stars_count ?? 0;
85
85
  const price = (0, pricing_1.formatPrice)(agent);
86
86
  const coloredPrice = (0, pricing_1.isPaidAgent)(agent) ? chalk_1.default.yellow(price) : chalk_1.default.green(price);
@@ -194,7 +194,7 @@ Note: Use 'call' for server-side execution (requires login), 'run' for local exe
194
194
  File handling:
195
195
  For prompt agents, file content is read and sent as JSON mapped to the agent's
196
196
  input schema. Use --file-field to specify the field name (auto-detected by default).
197
- For code agents, files are uploaded as multipart form data.
197
+ For tools, files are uploaded as multipart form data.
198
198
 
199
199
  Important: Remote agents cannot access your local filesystem. If your --data payload
200
200
  contains keys like 'path', 'directory', 'file', etc., those values will be interpreted
@@ -438,7 +438,7 @@ Paid Agents:
438
438
  headers['Content-Type'] = 'application/json';
439
439
  }
440
440
  else if (filePaths.length > 0 || options.metadata) {
441
- // Code agent: handle multipart file uploads
441
+ // Tool: handle multipart file uploads
442
442
  // Inject llm_credentials into metadata if available
443
443
  let metadata = options.metadata;
444
444
  if (llmCredentials) {
@@ -201,7 +201,7 @@ async function clearDefault(config, options) {
201
201
  function registerEnvCommand(program) {
202
202
  const env = program
203
203
  .command('env')
204
- .description('Manage custom Docker environments for code agents');
204
+ .description('Manage custom Docker environments for tools');
205
205
  env
206
206
  .command('list')
207
207
  .description('List environments in workspace')
@@ -176,7 +176,7 @@ function registerInfoCommand(program) {
176
176
  process.stdout.write(chalk_1.default.gray('Note: Paid agents run on server only (use orch call)\n'));
177
177
  process.stdout.write(chalk_1.default.gray(' Owners can still download for development/testing\n'));
178
178
  }
179
- if (agentData.type === 'code') {
179
+ if (agentData.type === 'tool') {
180
180
  // Don't show internal routing URLs - they confuse users
181
181
  if (agentData.url && !agentData.url.includes('.internal')) {
182
182
  process.stdout.write(`Server: ${agentData.url}\n`);
@@ -46,10 +46,10 @@ const SCHEMA_TEMPLATE = `{
46
46
  }
47
47
  `;
48
48
  const CODE_TEMPLATE_PY = `"""
49
- orchagent code agent entrypoint.
49
+ orchagent tool entrypoint.
50
50
 
51
51
  Reads JSON input from stdin, processes it, and writes JSON output to stdout.
52
- This is the standard orchagent code agent protocol.
52
+ This is the standard orchagent tool protocol.
53
53
 
54
54
  Usage:
55
55
  echo '{"input": "hello"}' | python main.py
@@ -82,12 +82,12 @@ if __name__ == "__main__":
82
82
  main()
83
83
  `;
84
84
  function readmeTemplate(agentName, type) {
85
- const callExample = type === 'code'
85
+ const callExample = type === 'tool'
86
86
  ? `orchagent call ${agentName} input-file.txt`
87
- : `orchagent call ${agentName} --data '{"${type === 'agentic' ? 'task' : 'input'}": "Hello world"}'`;
88
- const runExample = type === 'code'
87
+ : `orchagent call ${agentName} --data '{"${type === 'agent' ? 'task' : 'input'}": "Hello world"}'`;
88
+ const runExample = type === 'tool'
89
89
  ? `orchagent run ${agentName} --input '{"file_path": "src/app.py"}'`
90
- : `orchagent run ${agentName} --input '{"${type === 'agentic' ? 'task' : 'input'}": "Hello world"}'`;
90
+ : `orchagent run ${agentName} --input '{"${type === 'agent' ? 'task' : 'input'}": "Hello world"}'`;
91
91
  return `# ${agentName}
92
92
 
93
93
  A brief description of what this agent does.
@@ -110,7 +110,7 @@ ${runExample}
110
110
 
111
111
  | Field | Type | Description |
112
112
  |-------|------|-------------|
113
- | \`${type === 'agentic' ? 'task' : 'input'}\` | string | ${type === 'agentic' ? 'The task to perform' : 'The input to process'} |
113
+ | \`${type === 'agent' ? 'task' : 'input'}\` | string | ${type === 'agent' ? 'The task to perform' : 'The input to process'} |
114
114
 
115
115
  ## Output
116
116
 
@@ -119,10 +119,10 @@ ${runExample}
119
119
  | \`result\` | string | The agent's response |
120
120
  `;
121
121
  }
122
- const AGENTIC_MANIFEST_TEMPLATE = `{
122
+ const AGENT_MANIFEST_TEMPLATE = `{
123
123
  "name": "my-agent",
124
- "description": "An agentic AI agent with tool use",
125
- "type": "agentic",
124
+ "description": "An AI agent with tool use",
125
+ "type": "agent",
126
126
  "supported_providers": ["anthropic"],
127
127
  "max_turns": 25,
128
128
  "custom_tools": [
@@ -134,7 +134,7 @@ const AGENTIC_MANIFEST_TEMPLATE = `{
134
134
  ]
135
135
  }
136
136
  `;
137
- const AGENTIC_PROMPT_TEMPLATE = `You are a helpful AI agent with access to a sandboxed environment.
137
+ const AGENT_PROMPT_TEMPLATE = `You are a helpful AI agent with access to a sandboxed environment.
138
138
 
139
139
  Given the input, complete the task using the available tools:
140
140
  - Use bash to run commands
@@ -146,7 +146,7 @@ Input: The caller's input will be provided as JSON.
146
146
 
147
147
  Work step by step, verify your results, and submit the final output.
148
148
  `;
149
- const AGENTIC_SCHEMA_TEMPLATE = `{
149
+ const AGENT_SCHEMA_TEMPLATE = `{
150
150
  "input": {
151
151
  "type": "object",
152
152
  "properties": {
@@ -188,7 +188,7 @@ function registerInitCommand(program) {
188
188
  .command('init')
189
189
  .description('Initialize a new agent project')
190
190
  .argument('[name]', 'Agent name (default: current directory name)')
191
- .option('--type <type>', 'Type: prompt, code, agentic, or skill (default: prompt)', 'prompt')
191
+ .option('--type <type>', 'Type: prompt, tool, agent, or skill (default: prompt)', 'prompt')
192
192
  .action(async (name, options) => {
193
193
  const cwd = process.cwd();
194
194
  // When a name is provided, create a subdirectory for the project
@@ -242,20 +242,20 @@ function registerInitCommand(program) {
242
242
  }
243
243
  }
244
244
  // Create manifest and type-specific files
245
- if (options.type === 'agentic') {
246
- const manifest = JSON.parse(AGENTIC_MANIFEST_TEMPLATE);
245
+ if (options.type === 'agent') {
246
+ const manifest = JSON.parse(AGENT_MANIFEST_TEMPLATE);
247
247
  manifest.name = agentName;
248
248
  await promises_1.default.writeFile(manifestPath, JSON.stringify(manifest, null, 2) + '\n');
249
- await promises_1.default.writeFile(promptPath, AGENTIC_PROMPT_TEMPLATE);
250
- await promises_1.default.writeFile(schemaPath, AGENTIC_SCHEMA_TEMPLATE);
249
+ await promises_1.default.writeFile(promptPath, AGENT_PROMPT_TEMPLATE);
250
+ await promises_1.default.writeFile(schemaPath, AGENT_SCHEMA_TEMPLATE);
251
251
  }
252
252
  else {
253
253
  const manifest = JSON.parse(MANIFEST_TEMPLATE);
254
254
  manifest.name = agentName;
255
- manifest.type = ['code', 'skill'].includes(options.type) ? options.type : 'prompt';
255
+ manifest.type = ['tool', 'skill'].includes(options.type) ? options.type : 'prompt';
256
256
  await promises_1.default.writeFile(manifestPath, JSON.stringify(manifest, null, 2) + '\n');
257
- // Create prompt template (for prompt-based agents) or entrypoint (for code agents)
258
- if (options.type === 'code') {
257
+ // Create prompt template (for prompt-based agents) or entrypoint (for tool agents)
258
+ if (options.type === 'tool') {
259
259
  const entrypointPath = path_1.default.join(targetDir, 'main.py');
260
260
  await promises_1.default.writeFile(entrypointPath, CODE_TEMPLATE_PY);
261
261
  }
@@ -272,7 +272,7 @@ function registerInitCommand(program) {
272
272
  process.stdout.write(`\nFiles created:\n`);
273
273
  const prefix = name ? name + '/' : '';
274
274
  process.stdout.write(` ${prefix}orchagent.json - Agent configuration\n`);
275
- if (options.type === 'code') {
275
+ if (options.type === 'tool') {
276
276
  process.stdout.write(` ${prefix}main.py - Agent entrypoint (stdin/stdout JSON)\n`);
277
277
  }
278
278
  else {
@@ -281,7 +281,7 @@ function registerInitCommand(program) {
281
281
  process.stdout.write(` ${prefix}schema.json - Input/output schemas\n`);
282
282
  process.stdout.write(` ${prefix}README.md - Agent documentation\n`);
283
283
  process.stdout.write(`\nNext steps:\n`);
284
- if (options.type === 'agentic') {
284
+ if (options.type === 'agent') {
285
285
  const stepNum = name ? 2 : 1;
286
286
  if (name) {
287
287
  process.stdout.write(` 1. cd ${name}\n`);
@@ -291,7 +291,7 @@ function registerInitCommand(program) {
291
291
  process.stdout.write(` ${stepNum + 2}. Edit schema.json with your input/output schemas\n`);
292
292
  process.stdout.write(` ${stepNum + 3}. Run: orchagent publish\n`);
293
293
  }
294
- else if (options.type !== 'code') {
294
+ else if (options.type !== 'tool') {
295
295
  const stepNum = name ? 2 : 1;
296
296
  if (name) {
297
297
  process.stdout.write(` 1. cd ${name}\n`);
@@ -317,7 +317,7 @@ function registerPublishCommand(program) {
317
317
  `These must be nested under a "manifest" key. Example:\n\n` +
318
318
  ` {\n` +
319
319
  ` "name": "${manifest.name}",\n` +
320
- ` "type": "${manifest.type || 'code'}",\n` +
320
+ ` "type": "${manifest.type || 'tool'}",\n` +
321
321
  ` "manifest": {\n` +
322
322
  ` "manifest_version": 1,\n` +
323
323
  ` "dependencies": [...],\n` +
@@ -328,16 +328,16 @@ function registerPublishCommand(program) {
328
328
  ` }\n\n` +
329
329
  `See docs/manifest.md for details.`);
330
330
  }
331
- // Read prompt (for prompt-based, agentic, and skill agents)
331
+ // Read prompt (for prompt-based, agent, and skill agents)
332
332
  let prompt;
333
- if (manifest.type === 'prompt' || manifest.type === 'skill' || manifest.type === 'agentic') {
333
+ if (manifest.type === 'prompt' || manifest.type === 'skill' || manifest.type === 'agent') {
334
334
  const promptPath = path_1.default.join(cwd, 'prompt.md');
335
335
  try {
336
336
  prompt = await promises_1.default.readFile(promptPath, 'utf-8');
337
337
  }
338
338
  catch (err) {
339
339
  if (err.code === 'ENOENT') {
340
- const agentTypeName = manifest.type === 'skill' ? 'skill' : manifest.type === 'agentic' ? 'agentic agent' : 'prompt-based agent';
340
+ const agentTypeName = manifest.type === 'skill' ? 'skill' : manifest.type === 'agent' ? 'agent' : 'prompt-based agent';
341
341
  throw new errors_1.CliError(`No prompt.md found for ${agentTypeName}.\n\n` +
342
342
  'Create a prompt.md file in the current directory with your prompt template.\n' +
343
343
  'See: https://orchagent.io/docs/publishing');
@@ -345,8 +345,8 @@ function registerPublishCommand(program) {
345
345
  throw err;
346
346
  }
347
347
  }
348
- // For agentic agents, validate custom_tools and build manifest
349
- if (manifest.type === 'agentic') {
348
+ // For agent type, validate custom_tools and build manifest
349
+ if (manifest.type === 'agent') {
350
350
  // Validate custom_tools format
351
351
  if (manifest.custom_tools) {
352
352
  const reservedNames = new Set(['bash', 'read_file', 'write_file', 'list_files', 'submit_result']);
@@ -372,18 +372,18 @@ function registerPublishCommand(program) {
372
372
  throw new errors_1.CliError('max_turns must be a number between 1 and 50');
373
373
  }
374
374
  }
375
- // Store agentic config in manifest field
376
- const agenticManifest = {
375
+ // Store agent config in manifest field
376
+ const agentManifest = {
377
377
  ...(manifest.manifest || {}),
378
378
  };
379
379
  if (manifest.custom_tools) {
380
- agenticManifest.custom_tools = manifest.custom_tools;
380
+ agentManifest.custom_tools = manifest.custom_tools;
381
381
  }
382
382
  if (manifest.max_turns) {
383
- agenticManifest.max_turns = manifest.max_turns;
383
+ agentManifest.max_turns = manifest.max_turns;
384
384
  }
385
- manifest.manifest = agenticManifest;
386
- // Agentic agents default to anthropic provider
385
+ manifest.manifest = agentManifest;
386
+ // Agent type defaults to anthropic provider
387
387
  if (!manifest.supported_providers) {
388
388
  manifest.supported_providers = ['anthropic'];
389
389
  }
@@ -407,7 +407,7 @@ function registerPublishCommand(program) {
407
407
  }
408
408
  }
409
409
  // For prompt/skill agents, derive input schema from template variables if needed
410
- // (Agentic agents use schema.json directly — no template variable derivation)
410
+ // (Agent type uses schema.json directly — no template variable derivation)
411
411
  if (prompt && (manifest.type === 'prompt' || manifest.type === 'skill')) {
412
412
  const templateVars = extractTemplateVariables(prompt);
413
413
  if (templateVars.length > 0) {
@@ -434,13 +434,13 @@ function registerPublishCommand(program) {
434
434
  }
435
435
  }
436
436
  }
437
- // For code-based agents, either --url is required OR we bundle the code
438
- // For agentic agents, use internal placeholder (no user code, platform handles execution)
437
+ // For tool-based agents, either --url is required OR we bundle the code
438
+ // For agent type, use internal placeholder (no user code, platform handles execution)
439
439
  let agentUrl = options.url;
440
440
  let shouldUploadBundle = false;
441
- if (manifest.type === 'agentic') {
442
- // Agentic agents don't need a URL or code bundle
443
- agentUrl = agentUrl || 'https://agentic-agent.internal';
441
+ if (manifest.type === 'agent') {
442
+ // Agent type doesn't need a URL or code bundle
443
+ agentUrl = agentUrl || 'https://agent.internal';
444
444
  // But they can include a Dockerfile for custom environments
445
445
  if (options.docker) {
446
446
  const dockerfilePath = path_1.default.join(cwd, 'Dockerfile');
@@ -454,27 +454,27 @@ function registerPublishCommand(program) {
454
454
  }
455
455
  }
456
456
  }
457
- else if (manifest.type === 'code' && !options.url) {
457
+ else if (manifest.type === 'tool' && !options.url) {
458
458
  // Check if this looks like a Python or JS project that can be bundled
459
459
  const entrypoint = manifest.entrypoint || await (0, bundle_1.detectEntrypoint)(cwd);
460
460
  if (entrypoint) {
461
- // This is a hosted code agent - we'll bundle and upload
461
+ // This is a hosted tool - we'll bundle and upload
462
462
  shouldUploadBundle = true;
463
463
  // Set a placeholder URL that tells the gateway to use sandbox execution
464
- agentUrl = 'https://code-agent.internal';
465
- process.stdout.write(`Detected code project with entrypoint: ${entrypoint}\n`);
464
+ agentUrl = 'https://tool.internal';
465
+ process.stdout.write(`Detected tool project with entrypoint: ${entrypoint}\n`);
466
466
  }
467
467
  else {
468
- throw new errors_1.CliError('Code agent requires either --url <url> or an entry point file (main.py, app.py, index.js, etc.)');
468
+ throw new errors_1.CliError('Tool requires either --url <url> or an entry point file (main.py, app.py, index.js, etc.)');
469
469
  }
470
470
  }
471
471
  // Get org info
472
472
  const org = await (0, api_1.getOrg)(config);
473
473
  // Default to 'any' provider if not specified
474
474
  const supportedProviders = manifest.supported_providers || ['any'];
475
- // Detect SDK compatibility for code agents
475
+ // Detect SDK compatibility for tool agents
476
476
  let sdkCompatible = false;
477
- if (manifest.type === 'code') {
477
+ if (manifest.type === 'tool') {
478
478
  sdkCompatible = await detectSdkCompatible(cwd);
479
479
  if (sdkCompatible && !options.dryRun) {
480
480
  process.stdout.write(`SDK detected - agent will be marked as Local Ready\n`);
@@ -502,8 +502,8 @@ function registerPublishCommand(program) {
502
502
  process.stderr.write(` ✓ Input schema derived from template variables: ${vars.join(', ')}\n`);
503
503
  }
504
504
  }
505
- else if (manifest.type === 'agentic') {
506
- // Agentic agent validations
505
+ else if (manifest.type === 'agent') {
506
+ // Agent type validations
507
507
  const promptBytes = prompt ? Buffer.byteLength(prompt, 'utf-8') : 0;
508
508
  process.stderr.write(` ✓ prompt.md found (${promptBytes.toLocaleString()} bytes)\n`);
509
509
  if (schemaFromFile) {
@@ -514,8 +514,8 @@ function registerPublishCommand(program) {
514
514
  process.stderr.write(` ✓ Custom tools: ${customToolCount}\n`);
515
515
  process.stderr.write(` ✓ Max turns: ${manifest.max_turns || 25}\n`);
516
516
  }
517
- else if (manifest.type === 'code') {
518
- // Code agent validations
517
+ else if (manifest.type === 'tool') {
518
+ // Tool agent validations
519
519
  const entrypoint = manifest.entrypoint || await (0, bundle_1.detectEntrypoint)(cwd);
520
520
  process.stderr.write(` ✓ Entrypoint: ${entrypoint}\n`);
521
521
  if (sdkCompatible) {
@@ -523,7 +523,7 @@ function registerPublishCommand(program) {
523
523
  }
524
524
  }
525
525
  process.stderr.write(` ✓ Authentication valid (org: ${org.slug})\n`);
526
- // For code agents with bundles, show bundle preview
526
+ // For tools with bundles, show bundle preview
527
527
  if (shouldUploadBundle) {
528
528
  const bundlePreview = await (0, bundle_1.previewBundle)(cwd, {
529
529
  entrypoint: manifest.entrypoint,
@@ -577,7 +577,7 @@ function registerPublishCommand(program) {
577
577
  is_public: options.public ? true : false,
578
578
  supported_providers: supportedProviders,
579
579
  default_models: manifest.default_models,
580
- // Local run fields for code agents
580
+ // Local run fields for tool agents
581
581
  source_url: manifest.source_url,
582
582
  pip_package: manifest.pip_package,
583
583
  run_command: manifest.run_command,
@@ -595,7 +595,7 @@ function registerPublishCommand(program) {
595
595
  }
596
596
  const assignedVersion = result.agent?.version || 'v1';
597
597
  const agentId = result.agent?.id;
598
- // Upload code bundle if this is a hosted code agent or agentic agent with --docker
598
+ // Upload code bundle if this is a hosted tool agent or agent type with --docker
599
599
  if (shouldUploadBundle && agentId) {
600
600
  process.stdout.write(`\nBundling code...\n`);
601
601
  const tempDir = await promises_1.default.mkdtemp(path_1.default.join(os_1.default.tmpdir(), 'orchagent-bundle-'));
@@ -614,8 +614,8 @@ function registerPublishCommand(program) {
614
614
  throw new errors_1.CliError('--docker flag specified but no Dockerfile found in project directory');
615
615
  }
616
616
  }
617
- // For agentic agents, also include requirements.txt if present
618
- if (manifest.type === 'agentic') {
617
+ // For agent type, also include requirements.txt if present
618
+ if (manifest.type === 'agent') {
619
619
  const reqPath = path_1.default.join(cwd, 'requirements.txt');
620
620
  try {
621
621
  await promises_1.default.access(reqPath);
@@ -627,10 +627,10 @@ function registerPublishCommand(program) {
627
627
  }
628
628
  }
629
629
  const bundleResult = await (0, bundle_1.createCodeBundle)(cwd, bundlePath, {
630
- entrypoint: manifest.type === 'agentic' ? undefined : manifest.entrypoint,
630
+ entrypoint: manifest.type === 'agent' ? undefined : manifest.entrypoint,
631
631
  exclude: manifest.bundle?.exclude,
632
632
  include: includePatterns.length > 0 ? includePatterns : undefined,
633
- skipEntrypointCheck: manifest.type === 'agentic',
633
+ skipEntrypointCheck: manifest.type === 'agent',
634
634
  });
635
635
  process.stdout.write(` Created bundle: ${bundleResult.fileCount} files, ${(bundleResult.sizeBytes / 1024).toFixed(1)}KB\n`);
636
636
  // Validate bundle size
@@ -269,9 +269,9 @@ async function downloadDependenciesRecursively(config, depStatuses, visited = ne
269
269
  if (status.agentData.has_bundle) {
270
270
  await saveBundleLocally(config, org, agent, status.dep.version, status.agentData.id);
271
271
  }
272
- // Install if it's a pip/source code agent
273
- if (status.agentData.type === 'code' && (status.agentData.source_url || status.agentData.pip_package)) {
274
- await installCodeAgent(status.agentData);
272
+ // Install if it's a pip/source tool agent
273
+ if (status.agentData.type === 'tool' && (status.agentData.source_url || status.agentData.pip_package)) {
274
+ await installTool(status.agentData);
275
275
  }
276
276
  }, { successText: `Downloaded ${depRef}` });
277
277
  // Download default skills
@@ -476,10 +476,10 @@ async function checkPackageInstalled(packageName) {
476
476
  return false;
477
477
  }
478
478
  }
479
- async function installCodeAgent(agentData) {
479
+ async function installTool(agentData) {
480
480
  const installSource = agentData.pip_package || agentData.source_url;
481
481
  if (!installSource) {
482
- throw new errors_1.CliError('This code agent does not support local execution.\n' +
482
+ throw new errors_1.CliError('This tool does not support local execution.\n' +
483
483
  'Use `orch call` to run it on the server instead.');
484
484
  }
485
485
  // Check if already installed (for pip packages)
@@ -503,13 +503,13 @@ async function installCodeAgent(agentData) {
503
503
  }
504
504
  }, { successText: 'Installation complete' });
505
505
  }
506
- async function executeCodeAgent(agentData, args) {
506
+ async function executeTool(agentData, args) {
507
507
  if (!agentData.run_command) {
508
- throw new errors_1.CliError('This code agent does not have a run command defined.\n' +
508
+ throw new errors_1.CliError('This tool does not have a run command defined.\n' +
509
509
  'Use `orch call` to run it on the server instead.');
510
510
  }
511
511
  // Install the agent if needed
512
- await installCodeAgent(agentData);
512
+ await installTool(agentData);
513
513
  // Parse the run command and append user args
514
514
  const [cmd, ...cmdArgs] = agentData.run_command.split(' ');
515
515
  const fullArgs = [...cmdArgs, ...args];
@@ -760,7 +760,7 @@ async function saveAgentLocally(org, agent, agentData) {
760
760
  if (agentData.type === 'prompt' && agentData.prompt) {
761
761
  await promises_1.default.writeFile(path_1.default.join(agentDir, 'prompt.md'), agentData.prompt);
762
762
  }
763
- // For code agents, save files if provided
763
+ // For tools, save files if provided
764
764
  if (agentData.files) {
765
765
  for (const file of agentData.files) {
766
766
  const filePath = path_1.default.join(agentDir, file.path);
@@ -887,7 +887,7 @@ Paid Agents:
887
887
  // Fall back to getting public agent info if download endpoint not available
888
888
  const agentMeta = await (0, api_1.getPublicAgent)(resolved, org, parsed.agent, parsed.version);
889
889
  return {
890
- type: agentMeta.type || 'code',
890
+ type: agentMeta.type || 'tool',
891
891
  name: agentMeta.name,
892
892
  version: agentMeta.version,
893
893
  description: agentMeta.description || undefined,
@@ -903,10 +903,10 @@ Paid Agents:
903
903
  ` Install for AI tools: orchagent skill install ${org}/${parsed.agent}\n` +
904
904
  ` Use with an agent: orchagent run <agent> --skills ${org}/${parsed.agent}`);
905
905
  }
906
- // Agentic agents require a sandbox with tool use — cannot run locally
907
- if (agentData.type === 'agentic') {
908
- throw new errors_1.CliError('Agentic agents cannot be run locally.\n\n' +
909
- 'Agentic agents require a sandbox environment with tool use capabilities.\n\n' +
906
+ // Agent type requires a sandbox with tool use — cannot run locally
907
+ if (agentData.type === 'agent') {
908
+ throw new errors_1.CliError('Agent type cannot be run locally.\n\n' +
909
+ 'Agent type requires a sandbox environment with tool use capabilities.\n\n' +
910
910
  'Use server execution instead:\n' +
911
911
  ` orchagent call ${org}/${parsed.agent}@${parsed.version} --data '{"task": "..."}'`);
912
912
  }
@@ -953,31 +953,31 @@ Paid Agents:
953
953
  // Save locally
954
954
  const agentDir = await saveAgentLocally(org, parsed.agent, agentData);
955
955
  process.stderr.write(`\nAgent saved to: ${agentDir}\n`);
956
- if (agentData.type === 'code') {
956
+ if (agentData.type === 'tool') {
957
957
  // Check if this agent has a bundle available for local execution
958
958
  if (agentData.has_bundle) {
959
959
  if (options.downloadOnly) {
960
- process.stdout.write(`\nCode agent has bundle available for local execution.\n`);
960
+ process.stdout.write(`\nTool has bundle available for local execution.\n`);
961
961
  process.stdout.write(`Run with: orch run ${org}/${parsed.agent} [args...]\n`);
962
962
  return;
963
963
  }
964
- // Execute the bundle-based code agent locally
964
+ // Execute the bundle-based tool locally
965
965
  await executeBundleAgent(resolved, org, parsed.agent, parsed.version, agentData, args, options.input);
966
966
  return;
967
967
  }
968
968
  // Check for pip/source-based local execution (legacy)
969
969
  if (agentData.run_command && (agentData.source_url || agentData.pip_package)) {
970
970
  if (options.downloadOnly) {
971
- process.stdout.write(`\nCode agent ready for local execution.\n`);
971
+ process.stdout.write(`\nTool ready for local execution.\n`);
972
972
  process.stdout.write(`Run with: orch run ${org}/${parsed.agent} [args...]\n`);
973
973
  return;
974
974
  }
975
- // Execute the code agent locally
976
- await executeCodeAgent(agentData, args);
975
+ // Execute the tool locally
976
+ await executeTool(agentData, args);
977
977
  return;
978
978
  }
979
979
  // Fallback: agent doesn't support local execution
980
- process.stdout.write(`\nThis is a code-based agent that runs on the server.\n`);
980
+ process.stdout.write(`\nThis is a tool-based agent that runs on the server.\n`);
981
981
  process.stdout.write(`\nUse: orch call ${org}/${parsed.agent}@${parsed.version} --input '{...}'\n`);
982
982
  return;
983
983
  }
@@ -138,7 +138,7 @@ async function detectAgentType(agentDir) {
138
138
  return 'prompt';
139
139
  if (manifest.type === 'skill')
140
140
  return 'skill';
141
- if (manifest.type === 'code') {
141
+ if (manifest.type === 'tool') {
142
142
  // Detect language
143
143
  if (await fileExists(path_1.default.join(agentDir, 'requirements.txt')))
144
144
  return 'code-python';
@@ -146,7 +146,7 @@ async function detectAgentType(agentDir) {
146
146
  return 'code-python';
147
147
  if (await fileExists(path_1.default.join(agentDir, 'package.json')))
148
148
  return 'code-js';
149
- // Default to Python for code agents
149
+ // Default to Python for tool agents
150
150
  return 'code-python';
151
151
  }
152
152
  }
package/dist/lib/api.js CHANGED
@@ -299,12 +299,12 @@ async function searchMyAgents(config, query, options) {
299
299
  if (options?.type) {
300
300
  const typeFilter = options.type;
301
301
  if (typeFilter === 'agents') {
302
- agents = agents.filter(a => a.type === 'prompt' || a.type === 'code');
302
+ agents = agents.filter(a => a.type === 'prompt' || a.type === 'tool');
303
303
  }
304
304
  else if (typeFilter === 'skills' || typeFilter === 'skill') {
305
305
  agents = agents.filter(a => a.type === 'skill');
306
306
  }
307
- else if (typeFilter === 'code' || typeFilter === 'prompt') {
307
+ else if (typeFilter === 'tool' || typeFilter === 'prompt') {
308
308
  agents = agents.filter(a => a.type === typeFilter);
309
309
  }
310
310
  }
@@ -342,7 +342,7 @@ async function fetchLlmKeys(config) {
342
342
  return result.keys;
343
343
  }
344
344
  /**
345
- * Download a code bundle for local execution.
345
+ * Download a tool bundle for local execution.
346
346
  */
347
347
  async function downloadCodeBundle(config, org, agent, version) {
348
348
  const response = await safeFetch(`${config.apiUrl.replace(/\/$/, '')}/public/agents/${org}/${agent}/${version}/bundle`);
@@ -353,7 +353,7 @@ async function downloadCodeBundle(config, org, agent, version) {
353
353
  return Buffer.from(arrayBuffer);
354
354
  }
355
355
  /**
356
- * Upload a code bundle for a hosted code agent.
356
+ * Upload a code bundle for a hosted tool agent.
357
357
  */
358
358
  async function uploadCodeBundle(config, agentId, bundlePath, entrypoint) {
359
359
  if (!config.apiKey) {
@@ -421,7 +421,7 @@ async function getAgentWithFallback(config, org, agentName, version) {
421
421
  return myAgent;
422
422
  }
423
423
  /**
424
- * Download a code bundle for a private agent using authenticated endpoint.
424
+ * Download a tool bundle for a private agent using authenticated endpoint.
425
425
  */
426
426
  async function downloadCodeBundleAuthenticated(config, agentId) {
427
427
  if (!config.apiKey) {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * Code bundling utilities for hosted code agents.
3
+ * Code bundling utilities for hosted tools.
4
4
  *
5
5
  * Creates zip bundles from project directories for upload to orchagent.
6
6
  */
@@ -119,7 +119,7 @@ async function createCodeBundle(sourceDir, outputPath, options = {}) {
119
119
  if (!stat.isDirectory()) {
120
120
  throw new Error(`Source path is not a directory: ${sourceDir}`);
121
121
  }
122
- // Verify entrypoint exists if specified (skip for agentic agents that have no code)
122
+ // Verify entrypoint exists if specified (skip for agent type that has no code)
123
123
  if (!options.skipEntrypointCheck) {
124
124
  const entrypoint = options.entrypoint || 'main.py';
125
125
  const entrypointPath = path_1.default.join(sourceDir, entrypoint);
@@ -24,7 +24,7 @@ function printAgentsTable(agents, options) {
24
24
  const table = new cli_table3_1.default({ head });
25
25
  agents.forEach((agent) => {
26
26
  const fullName = `${agent.org_slug}/${agent.name}`;
27
- const type = agent.type || 'code';
27
+ const type = agent.type || 'tool';
28
28
  const providers = formatProviders(agent.supported_providers);
29
29
  const stars = agent.stars_count ?? 0;
30
30
  const price = (0, pricing_1.formatPrice)(agent);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orchagent/cli",
3
- "version": "0.3.42",
3
+ "version": "0.3.43",
4
4
  "description": "Command-line interface for the orchagent AI agent marketplace",
5
5
  "license": "MIT",
6
6
  "author": "orchagent <hello@orchagent.io>",