@orchagent/cli 0.3.103 → 0.3.106
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.
- package/dist/commands/info.js +13 -0
- package/dist/commands/publish.js +2 -0
- package/dist/commands/pull.js +16 -2
- package/dist/commands/run.js +2 -2
- package/dist/lib/api.js +5 -4
- package/package.json +1 -1
package/dist/commands/info.js
CHANGED
|
@@ -91,6 +91,8 @@ async function getAgentInfo(config, org, agent, version, workspaceId) {
|
|
|
91
91
|
default_skills: meta.default_skills || [],
|
|
92
92
|
custom_tools: extractCustomTools(manifest),
|
|
93
93
|
environment: manifest?.environment,
|
|
94
|
+
required_secrets: meta.required_secrets || [],
|
|
95
|
+
optional_secrets: meta.optional_secrets || [],
|
|
94
96
|
};
|
|
95
97
|
}
|
|
96
98
|
catch (err) {
|
|
@@ -139,6 +141,8 @@ async function getAgentInfo(config, org, agent, version, workspaceId) {
|
|
|
139
141
|
default_skills: targetAgent.default_skills || [],
|
|
140
142
|
custom_tools: extractCustomTools(agentManifest),
|
|
141
143
|
environment: agentManifest?.environment,
|
|
144
|
+
required_secrets: targetAgent.required_secrets || [],
|
|
145
|
+
optional_secrets: targetAgent.optional_secrets || [],
|
|
142
146
|
};
|
|
143
147
|
}
|
|
144
148
|
function registerInfoCommand(program) {
|
|
@@ -180,6 +184,15 @@ function registerInfoCommand(program) {
|
|
|
180
184
|
process.stdout.write(`Callable: ${chalk_1.default.green('yes')} — other agents can invoke this via the orchagent SDK\n`);
|
|
181
185
|
}
|
|
182
186
|
process.stdout.write(`Providers: ${agentData.supported_providers.join(', ')}\n`);
|
|
187
|
+
// Display secrets
|
|
188
|
+
const hasRequired = agentData.required_secrets && agentData.required_secrets.length > 0;
|
|
189
|
+
const hasOptional = agentData.optional_secrets && agentData.optional_secrets.length > 0;
|
|
190
|
+
if (hasRequired) {
|
|
191
|
+
process.stdout.write(`Secrets (required): ${agentData.required_secrets.join(', ')}\n`);
|
|
192
|
+
}
|
|
193
|
+
if (hasOptional) {
|
|
194
|
+
process.stdout.write(`Secrets (optional): ${agentData.optional_secrets.join(', ')}\n`);
|
|
195
|
+
}
|
|
183
196
|
if (agentData.type === 'tool') {
|
|
184
197
|
// Don't show internal routing URLs - they confuse users
|
|
185
198
|
if (agentData.url && !agentData.url.includes('.internal')) {
|
package/dist/commands/publish.js
CHANGED
|
@@ -1231,6 +1231,7 @@ function registerPublishCommand(program) {
|
|
|
1231
1231
|
sdk_compatible: sdkCompatible || undefined,
|
|
1232
1232
|
manifest: manifest.manifest,
|
|
1233
1233
|
required_secrets: manifest.required_secrets,
|
|
1234
|
+
optional_secrets: manifest.optional_secrets,
|
|
1234
1235
|
default_skills: skillsFromFlag || manifest.default_skills,
|
|
1235
1236
|
skills_locked: manifest.skills_locked || options.skillsLocked || undefined,
|
|
1236
1237
|
allow_local_download: options.localDownload !== false,
|
|
@@ -1332,6 +1333,7 @@ function registerPublishCommand(program) {
|
|
|
1332
1333
|
// Orchestration manifest (includes dependencies)
|
|
1333
1334
|
manifest: manifest.manifest,
|
|
1334
1335
|
required_secrets: manifest.required_secrets,
|
|
1336
|
+
optional_secrets: manifest.optional_secrets,
|
|
1335
1337
|
default_skills: skillsFromFlag || manifest.default_skills,
|
|
1336
1338
|
skills_locked: manifest.skills_locked || options.skillsLocked || undefined,
|
|
1337
1339
|
allow_local_download: options.localDownload !== false,
|
package/dist/commands/pull.js
CHANGED
|
@@ -128,13 +128,21 @@ async function resolveAgent(config, org, agent, version, workspaceId) {
|
|
|
128
128
|
async function tryOwnerFallback(config, org, agent, version, workspaceId) {
|
|
129
129
|
try {
|
|
130
130
|
let match = findOwnerMatch(await (0, api_1.listMyAgents)(config, workspaceId), agent, version, org);
|
|
131
|
+
let effectiveWorkspaceId = workspaceId;
|
|
131
132
|
// Retry without workspace restriction to find agents in personal org
|
|
132
133
|
if (!match && workspaceId) {
|
|
133
134
|
match = findOwnerMatch(await (0, api_1.listMyAgents)(config, undefined), agent, version, org);
|
|
135
|
+
effectiveWorkspaceId = undefined;
|
|
134
136
|
}
|
|
135
137
|
if (!match)
|
|
136
138
|
return null;
|
|
137
|
-
|
|
139
|
+
// Pass workspace context so GET /agents/{id} uses the correct org scope.
|
|
140
|
+
// Without this header, the gateway scopes to the caller's personal org,
|
|
141
|
+
// which 404s when the agent lives in a team workspace.
|
|
142
|
+
const headers = {};
|
|
143
|
+
if (effectiveWorkspaceId)
|
|
144
|
+
headers['X-Workspace-Id'] = effectiveWorkspaceId;
|
|
145
|
+
const agentData = await (0, api_1.request)(config, 'GET', `/agents/${match.id}`, { headers });
|
|
138
146
|
return mapAgentToPullData(agentData);
|
|
139
147
|
}
|
|
140
148
|
catch {
|
|
@@ -164,7 +172,13 @@ async function resolveFromMyAgents(config, agent, version, org, workspaceId) {
|
|
|
164
172
|
return null;
|
|
165
173
|
target = found;
|
|
166
174
|
}
|
|
167
|
-
|
|
175
|
+
// Pass workspace context so GET /agents/{id} uses the correct org scope.
|
|
176
|
+
// Without this header, the gateway scopes to the caller's personal org,
|
|
177
|
+
// which 404s when the agent lives in a team workspace.
|
|
178
|
+
const headers = {};
|
|
179
|
+
if (workspaceId)
|
|
180
|
+
headers['X-Workspace-Id'] = workspaceId;
|
|
181
|
+
const agentData = await (0, api_1.request)(config, 'GET', `/agents/${target.id}`, { headers });
|
|
168
182
|
return mapAgentToPullData(agentData);
|
|
169
183
|
}
|
|
170
184
|
function mapAgentToPullData(agent) {
|
package/dist/commands/run.js
CHANGED
|
@@ -1887,7 +1887,7 @@ async function executeCloud(agentRef, file, options) {
|
|
|
1887
1887
|
// --estimate-only: show cost estimate and exit without running
|
|
1888
1888
|
if (options.estimate || options.estimateOnly) {
|
|
1889
1889
|
try {
|
|
1890
|
-
const est = await (0, api_1.getAgentCostEstimate)(resolved, org, agentName, version);
|
|
1890
|
+
const est = await (0, api_1.getAgentCostEstimate)(resolved, org, agentName, version, workspaceId);
|
|
1891
1891
|
const e = est.estimate;
|
|
1892
1892
|
if (e.sample_size === 0) {
|
|
1893
1893
|
process.stderr.write(chalk_1.default.yellow('\nNo run history available for cost estimation.\n'));
|
|
@@ -2875,7 +2875,7 @@ function registerRunCommand(program) {
|
|
|
2875
2875
|
// Local-only options
|
|
2876
2876
|
.option('--download-only', 'Just download the agent, do not execute (local only)')
|
|
2877
2877
|
.option('--with-deps', 'Automatically download all dependencies (local only)')
|
|
2878
|
-
.option('--here', '
|
|
2878
|
+
.option('--here', 'Send current directory as path input, for tool agents with a path field (local only)')
|
|
2879
2879
|
.option('--path <dir>', 'Shorthand for --data \'{"path": "<dir>"}\' (local only)')
|
|
2880
2880
|
.addHelpText('after', `
|
|
2881
2881
|
Examples:
|
package/dist/lib/api.js
CHANGED
|
@@ -286,10 +286,11 @@ async function getPublicAgent(config, org, agent, version) {
|
|
|
286
286
|
}
|
|
287
287
|
async function getAgentCostEstimate(config, org, agent, version, workspaceId) {
|
|
288
288
|
const path = `/public/agents/${org}/${agent}/${version}/cost-estimate`;
|
|
289
|
-
if (
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
289
|
+
if (config.apiKey) {
|
|
290
|
+
const headers = {};
|
|
291
|
+
if (workspaceId)
|
|
292
|
+
headers['X-Workspace-Id'] = workspaceId;
|
|
293
|
+
return request(config, 'GET', path, { headers });
|
|
293
294
|
}
|
|
294
295
|
return publicRequest(config, path);
|
|
295
296
|
}
|
package/package.json
CHANGED