@orchagent/cli 0.3.63 → 0.3.65

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/lib/api.js CHANGED
@@ -275,8 +275,11 @@ async function publicRequest(config, path) {
275
275
  }
276
276
  return (await response.json());
277
277
  }
278
- async function getOrg(config) {
279
- return request(config, 'GET', '/org');
278
+ async function getOrg(config, workspaceId) {
279
+ const headers = {};
280
+ if (workspaceId)
281
+ headers['X-Workspace-Id'] = workspaceId;
282
+ return request(config, 'GET', '/org', { headers });
280
283
  }
281
284
  async function updateOrg(config, payload) {
282
285
  return request(config, 'PATCH', '/org', {
@@ -290,10 +293,13 @@ async function getPublicAgent(config, org, agent, version) {
290
293
  async function listMyAgents(config) {
291
294
  return request(config, 'GET', '/agents');
292
295
  }
293
- async function createAgent(config, data) {
296
+ async function createAgent(config, data, workspaceId) {
297
+ const headers = { 'Content-Type': 'application/json' };
298
+ if (workspaceId)
299
+ headers['X-Workspace-Id'] = workspaceId;
294
300
  return request(config, 'POST', '/agents', {
295
301
  body: JSON.stringify(data),
296
- headers: { 'Content-Type': 'application/json' },
302
+ headers,
297
303
  });
298
304
  }
299
305
  async function fetchLlmKeys(config) {
@@ -446,8 +452,11 @@ async function transferAgent(config, agentId, data) {
446
452
  /**
447
453
  * Preview the next version number for an agent.
448
454
  */
449
- async function previewAgentVersion(config, agentName) {
450
- return request(config, 'GET', `/agents/preview?name=${encodeURIComponent(agentName)}`);
455
+ async function previewAgentVersion(config, agentName, workspaceId) {
456
+ const headers = {};
457
+ if (workspaceId)
458
+ headers['X-Workspace-Id'] = workspaceId;
459
+ return request(config, 'GET', `/agents/preview?name=${encodeURIComponent(agentName)}`, { headers });
451
460
  }
452
461
  /**
453
462
  * Report a skill installation to the backend.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orchagent/cli",
3
- "version": "0.3.63",
3
+ "version": "0.3.65",
4
4
  "description": "Command-line interface for orchagent — deploy and run AI agents for your team",
5
5
  "license": "MIT",
6
6
  "author": "orchagent <hello@orchagent.io>",