@orchagent/cli 0.3.43 → 0.3.45

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.
@@ -82,28 +82,28 @@ if __name__ == "__main__":
82
82
  main()
83
83
  `;
84
84
  function readmeTemplate(agentName, type) {
85
- const callExample = type === 'tool'
86
- ? `orchagent call ${agentName} input-file.txt`
87
- : `orchagent call ${agentName} --data '{"${type === 'agent' ? 'task' : 'input'}": "Hello world"}'`;
88
- const runExample = type === 'tool'
89
- ? `orchagent run ${agentName} --input '{"file_path": "src/app.py"}'`
90
- : `orchagent run ${agentName} --input '{"${type === 'agent' ? 'task' : 'input'}": "Hello world"}'`;
85
+ const cloudExample = type === 'tool'
86
+ ? `orchagent run ${agentName} input-file.txt`
87
+ : `orchagent run ${agentName} --data '{"${type === 'agent' ? 'task' : 'input'}": "Hello world"}'`;
88
+ const localExample = type === 'tool'
89
+ ? `orchagent run ${agentName} --local --data '{"file_path": "src/app.py"}'`
90
+ : `orchagent run ${agentName} --local --data '{"${type === 'agent' ? 'task' : 'input'}": "Hello world"}'`;
91
91
  return `# ${agentName}
92
92
 
93
93
  A brief description of what this agent does.
94
94
 
95
95
  ## Usage
96
96
 
97
- ### Server execution
97
+ ### Cloud execution (default)
98
98
 
99
99
  \`\`\`sh
100
- ${callExample}
100
+ ${cloudExample}
101
101
  \`\`\`
102
102
 
103
103
  ### Local execution
104
104
 
105
105
  \`\`\`sh
106
- ${runExample}
106
+ ${localExample}
107
107
  \`\`\`
108
108
 
109
109
  ## Input
@@ -124,27 +124,13 @@ const AGENT_MANIFEST_TEMPLATE = `{
124
124
  "description": "An AI agent with tool use",
125
125
  "type": "agent",
126
126
  "supported_providers": ["anthropic"],
127
- "max_turns": 25,
128
- "custom_tools": [
129
- {
130
- "name": "run_tests",
131
- "description": "Run the test suite",
132
- "command": "pytest"
133
- }
134
- ]
127
+ "max_turns": 25
135
128
  }
136
129
  `;
137
- const AGENT_PROMPT_TEMPLATE = `You are a helpful AI agent with access to a sandboxed environment.
130
+ const AGENT_PROMPT_TEMPLATE = `You are a helpful AI agent.
138
131
 
139
- Given the input, complete the task using the available tools:
140
- - Use bash to run commands
141
- - Use read_file and write_file to work with files
142
- - Use custom tools defined by the agent author
143
- - Call submit_result when you're done
144
-
145
- Input: The caller's input will be provided as JSON.
146
-
147
- Work step by step, verify your results, and submit the final output.
132
+ Given the input, complete the task step by step.
133
+ Verify your results before submitting.
148
134
  `;
149
135
  const AGENT_SCHEMA_TEMPLATE = `{
150
136
  "input": {
@@ -287,9 +273,8 @@ function registerInitCommand(program) {
287
273
  process.stdout.write(` 1. cd ${name}\n`);
288
274
  }
289
275
  process.stdout.write(` ${stepNum}. Edit prompt.md with your agent instructions\n`);
290
- process.stdout.write(` ${stepNum + 1}. Edit custom_tools in orchagent.json for your environment\n`);
291
- process.stdout.write(` ${stepNum + 2}. Edit schema.json with your input/output schemas\n`);
292
- process.stdout.write(` ${stepNum + 3}. Run: orchagent publish\n`);
276
+ process.stdout.write(` ${stepNum + 1}. Edit schema.json with your input/output schemas\n`);
277
+ process.stdout.write(` ${stepNum + 2}. Run: orchagent publish\n`);
293
278
  }
294
279
  else if (options.type !== 'tool') {
295
280
  const stepNum = name ? 2 : 1;
@@ -76,14 +76,14 @@ async function downloadAgentWithFallback(config, org, name, version) {
76
76
  // Non-owner - block with helpful message
77
77
  const price = (0, pricing_1.formatPrice)(publicMeta);
78
78
  throw new errors_1.CliError(`This agent is paid (${price}) and runs on server only.\n\n` +
79
- `Use: orch call ${org}/${name}@${version} --input '{...}'`);
79
+ `Use: orch run ${org}/${name}@${version} --data '{...}'`);
80
80
  }
81
81
  }
82
82
  else {
83
83
  // Not authenticated - block
84
84
  const price = (0, pricing_1.formatPrice)(publicMeta);
85
85
  throw new errors_1.CliError(`This agent is paid (${price}) and runs on server only.\n\n` +
86
- `Use: orch call ${org}/${name}@${version} --input '{...}'`);
86
+ `Use: orch run ${org}/${name}@${version} --data '{...}'`);
87
87
  }
88
88
  }
89
89
  // Check if download is disabled (server-only agent)
@@ -115,7 +115,7 @@ async function downloadAgentWithFallback(config, org, name, version) {
115
115
  }
116
116
  }
117
117
  throw new errors_1.CliError(`This agent is server-only and cannot be downloaded.\n\n` +
118
- `Use: orch call ${org}/${name}@${version} --input '{...}'`);
118
+ `Use: orch run ${org}/${name}@${version} --data '{...}'`);
119
119
  }
120
120
  // Free agent - proceed normally with public data
121
121
  if (publicMeta) {
@@ -161,7 +161,7 @@ function registerInstallCommand(program) {
161
161
  .option('--json', 'Output result as JSON (for automation/tooling)')
162
162
  .addHelpText('after', `
163
163
  Note: Paid agents cannot be installed locally - they run on server only.
164
- Use 'orch call' to execute paid agents.
164
+ Use 'orch run' to execute paid agents.
165
165
  `)
166
166
  .action(async (agentArg, options) => {
167
167
  const jsonMode = options.json === true;
@@ -13,7 +13,7 @@ function registerPricingCommand(program) {
13
13
  .command('pricing <agent> <mode>')
14
14
  .description('Set pricing for your agent (free or per-call in USD)')
15
15
  .option('--local-download', 'Allow users to download and run locally')
16
- .option('--no-local-download', 'Restrict to server-only (orch call)')
16
+ .option('--no-local-download', 'Restrict to server-only (cloud execution)')
17
17
  .action(async (agentRef, mode, options) => {
18
18
  const resolved = await (0, config_1.getResolvedConfig)();
19
19
  // Parse agent reference
@@ -309,6 +309,16 @@ function registerPublishCommand(program) {
309
309
  if (!manifest.name) {
310
310
  throw new errors_1.CliError('orchagent.json must have name');
311
311
  }
312
+ // Warn about deprecated fields that are ignored
313
+ if (manifest.prompt) {
314
+ process.stderr.write(chalk_1.default.yellow('Warning: "prompt" field in orchagent.json is ignored. Use prompt.md file instead.\n'));
315
+ }
316
+ if (manifest.input_schema) {
317
+ process.stderr.write(chalk_1.default.yellow('Warning: "input_schema" field in orchagent.json is ignored. Use schema.json file instead.\n'));
318
+ }
319
+ if (manifest.output_schema) {
320
+ process.stderr.write(chalk_1.default.yellow('Warning: "output_schema" field in orchagent.json is ignored. Use schema.json file instead.\n'));
321
+ }
312
322
  // Check for misplaced manifest fields at top level (common user error)
313
323
  const manifestFields = ['manifest_version', 'dependencies', 'max_hops', 'timeout_ms', 'per_call_downstream_cap'];
314
324
  const misplacedFields = manifestFields.filter(f => f in manifest && !manifest.manifest);