@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/commands/index.js +2 -0
- package/dist/commands/init.js +452 -16
- package/dist/commands/publish.js +138 -9
- package/dist/commands/run.js +72 -0
- package/dist/commands/secrets.js +174 -0
- package/dist/commands/templates/github-weekly-summary.js +884 -0
- package/dist/lib/api.js +15 -6
- package/package.json +1 -1
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
|
-
|
|
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
|
|
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
|
-
|
|
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