bamboo-agents 0.1.5-dev.52.cc9d1f5 → 0.1.5-dev.53.8db952b
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/VERSION +1 -1
- package/dist/index.js +71 -3
- package/dist/index.js.map +3 -3
- package/package.json +1 -1
package/dist/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.5-dev.
|
|
1
|
+
0.1.5-dev.53.8db952b
|
package/dist/index.js
CHANGED
|
@@ -3037,7 +3037,7 @@ var VERSION;
|
|
|
3037
3037
|
var init_version = __esm({
|
|
3038
3038
|
"src/version.ts"() {
|
|
3039
3039
|
"use strict";
|
|
3040
|
-
VERSION = "0.1.5-dev.
|
|
3040
|
+
VERSION = "0.1.5-dev.53.8db952b";
|
|
3041
3041
|
}
|
|
3042
3042
|
});
|
|
3043
3043
|
|
|
@@ -7389,6 +7389,8 @@ __export(agents_exports, {
|
|
|
7389
7389
|
CliCreateAgentRequestSchema: () => CliCreateAgentRequestSchema,
|
|
7390
7390
|
CliCreateAgentResponseSchema: () => CliCreateAgentResponseSchema,
|
|
7391
7391
|
CliTierCapSchema: () => CliTierCapSchema,
|
|
7392
|
+
CliUpdateAgentRequestSchema: () => CliUpdateAgentRequestSchema,
|
|
7393
|
+
CliUpdateAgentResponseSchema: () => CliUpdateAgentResponseSchema,
|
|
7392
7394
|
CliUploadAgentRequestSchema: () => CliUploadAgentRequestSchema,
|
|
7393
7395
|
CliUploadAgentResponseSchema: () => CliUploadAgentResponseSchema,
|
|
7394
7396
|
CreateFromCliRequestSchema: () => CreateFromCliRequestSchema,
|
|
@@ -7397,7 +7399,7 @@ __export(agents_exports, {
|
|
|
7397
7399
|
UploadClaudeMdRequestSchema: () => UploadClaudeMdRequestSchema,
|
|
7398
7400
|
UploadClaudeMdResponseSchema: () => UploadClaudeMdResponseSchema
|
|
7399
7401
|
});
|
|
7400
|
-
var SlugSchema, NameSchema, BrandIdSchema, CliAgentRowSchema, CliTierCapSchema, CliAgentsListResponseSchema, CliCreateAgentRequestSchema, CliAgentMutationResponseBase, CliCreateAgentResponseSchema, UPLOAD_MAX_BYTES, CliUploadAgentRequestSchema, CliUploadAgentResponseSchema, CliBrandRowSchema, CliBrandsListResponseSchema, CliAgentLifecycleStateSchema, CliAgentDetailSchema, CliAgentGetResponseSchema, CliAgentPauseResponseSchema, CliAgentPublishResponseSchema, CreateFromCliRequestSchema, CreateFromCliResponseSchema, UploadClaudeMdRequestSchema, UploadClaudeMdResponseSchema;
|
|
7402
|
+
var SlugSchema, NameSchema, BrandIdSchema, CliAgentRowSchema, CliTierCapSchema, CliAgentsListResponseSchema, CliCreateAgentRequestSchema, CliAgentMutationResponseBase, CliCreateAgentResponseSchema, UPLOAD_MAX_BYTES, CliUploadAgentRequestSchema, CliUploadAgentResponseSchema, CliUpdateAgentRequestSchema, CliUpdateAgentResponseSchema, CliBrandRowSchema, CliBrandsListResponseSchema, CliAgentLifecycleStateSchema, CliAgentDetailSchema, CliAgentGetResponseSchema, CliAgentPauseResponseSchema, CliAgentPublishResponseSchema, CreateFromCliRequestSchema, CreateFromCliResponseSchema, UploadClaudeMdRequestSchema, UploadClaudeMdResponseSchema;
|
|
7401
7403
|
var init_agents = __esm({
|
|
7402
7404
|
"../../src/lib/api-contracts/cli/agents.ts"() {
|
|
7403
7405
|
init_zod();
|
|
@@ -7468,6 +7470,19 @@ var init_agents = __esm({
|
|
|
7468
7470
|
claude_md_content: external_exports.string().min(1)
|
|
7469
7471
|
});
|
|
7470
7472
|
CliUploadAgentResponseSchema = CliAgentMutationResponseBase;
|
|
7473
|
+
CliUpdateAgentRequestSchema = external_exports.object({
|
|
7474
|
+
name: NameSchema.optional(),
|
|
7475
|
+
description: external_exports.string().max(2e3).optional(),
|
|
7476
|
+
template_key: external_exports.string().min(1).max(128).optional(),
|
|
7477
|
+
brand_id: BrandIdSchema.optional()
|
|
7478
|
+
}).refine(
|
|
7479
|
+
(d) => d.name !== void 0 || d.description !== void 0 || d.template_key !== void 0 || d.brand_id !== void 0,
|
|
7480
|
+
{ message: "Provide at least one field to update (name, description, template_key, brand_id)" }
|
|
7481
|
+
);
|
|
7482
|
+
CliUpdateAgentResponseSchema = external_exports.object({
|
|
7483
|
+
agent_id: external_exports.string().uuid(),
|
|
7484
|
+
status: external_exports.string().nullable()
|
|
7485
|
+
});
|
|
7471
7486
|
CliBrandRowSchema = external_exports.object({
|
|
7472
7487
|
id: external_exports.string().uuid(),
|
|
7473
7488
|
name: external_exports.string()
|
|
@@ -12647,6 +12662,21 @@ async function unpauseCliAgent(bambooSession, agentId) {
|
|
|
12647
12662
|
const json = await res.json();
|
|
12648
12663
|
return CliAgentPauseResponseSchema.parse(json.data);
|
|
12649
12664
|
}
|
|
12665
|
+
async function updateCliAgent(bambooSession, agentId, body) {
|
|
12666
|
+
const res = await cliApiFetch(
|
|
12667
|
+
`${apiBase()}/api/v1/cli/agents/${encodeURIComponent(agentId)}`,
|
|
12668
|
+
{
|
|
12669
|
+
method: "PATCH",
|
|
12670
|
+
headers: {
|
|
12671
|
+
Authorization: `Bearer ${bambooSession}`,
|
|
12672
|
+
"Content-Type": "application/json"
|
|
12673
|
+
},
|
|
12674
|
+
body: JSON.stringify(body)
|
|
12675
|
+
}
|
|
12676
|
+
);
|
|
12677
|
+
if (!res.ok) throw await parseError(res);
|
|
12678
|
+
return CliUpdateAgentResponseSchema.parse(await res.json());
|
|
12679
|
+
}
|
|
12650
12680
|
async function publishCliAgent(bambooSession, agentId) {
|
|
12651
12681
|
const res = await cliApiFetch(
|
|
12652
12682
|
`${apiBase()}/api/v1/agents/${encodeURIComponent(agentId)}/provision`,
|
|
@@ -17036,7 +17066,8 @@ __export(agents_exports2, {
|
|
|
17036
17066
|
runAgentsGet: () => runAgentsGet,
|
|
17037
17067
|
runAgentsList: () => runAgentsList,
|
|
17038
17068
|
runAgentsPause: () => runAgentsPause,
|
|
17039
|
-
runAgentsProvision: () => runAgentsProvision
|
|
17069
|
+
runAgentsProvision: () => runAgentsProvision,
|
|
17070
|
+
runAgentsUpdate: () => runAgentsUpdate
|
|
17040
17071
|
});
|
|
17041
17072
|
async function requireSession8(opts) {
|
|
17042
17073
|
const creds = await readCredentials();
|
|
@@ -17233,6 +17264,37 @@ async function runAgentsPause(agentRef, options) {
|
|
|
17233
17264
|
);
|
|
17234
17265
|
}
|
|
17235
17266
|
}
|
|
17267
|
+
async function runAgentsUpdate(agentRef, options) {
|
|
17268
|
+
const opts = options;
|
|
17269
|
+
const session = await requireSession8(opts);
|
|
17270
|
+
const body = {};
|
|
17271
|
+
if (options.name !== void 0) body.name = options.name;
|
|
17272
|
+
if (options.description !== void 0) body.description = options.description;
|
|
17273
|
+
if (options.template !== void 0) body.template_key = options.template;
|
|
17274
|
+
if (options.brand !== void 0) body.brand_id = options.brand;
|
|
17275
|
+
if (Object.keys(body).length === 0) {
|
|
17276
|
+
emitError(
|
|
17277
|
+
{
|
|
17278
|
+
code: "nothing_to_update",
|
|
17279
|
+
message: "Provide at least one of --name, --description, --template, --brand."
|
|
17280
|
+
},
|
|
17281
|
+
opts,
|
|
17282
|
+
2
|
|
17283
|
+
);
|
|
17284
|
+
return;
|
|
17285
|
+
}
|
|
17286
|
+
const row = await resolveAgentRef(session, agentRef, opts);
|
|
17287
|
+
try {
|
|
17288
|
+
const res = await updateCliAgent(session, row.id, body);
|
|
17289
|
+
emitSuccess(res, opts, () => human(` Updated ${row.name} (${row.id}).`, opts));
|
|
17290
|
+
} catch (err) {
|
|
17291
|
+
emitError(
|
|
17292
|
+
{ code: "agent_update_failed", message: `couldn't update agent: ${err.message}` },
|
|
17293
|
+
opts,
|
|
17294
|
+
1
|
|
17295
|
+
);
|
|
17296
|
+
}
|
|
17297
|
+
}
|
|
17236
17298
|
async function runAgentsActivate(agentRef, options) {
|
|
17237
17299
|
const opts = options;
|
|
17238
17300
|
const session = await requireSession8(opts);
|
|
@@ -17642,6 +17704,12 @@ agents.command("provision <name>").description("Create a new agent (immediately
|
|
|
17642
17704
|
await runAgentsProvision2(name, options);
|
|
17643
17705
|
}
|
|
17644
17706
|
);
|
|
17707
|
+
agents.command("update <agent>").description("Update an agent's name / description / template / brand (accepts id, slug, or name)").option("--name <name>", "New agent name").option("--description <text>", "New description").option("--template <key>", "Template key").option("--brand <id>", "Reassign to this brand (replaces the current assignment)").option("--json", "Emit a JSON envelope for agent consumption").option("--fields <list>", "Project only these dotted field paths from data (comma-separated)").option("--quiet", "Suppress human chatter (data/errors only)").option("--no-sync", "Skip the auto-sync git pull on this command").action(
|
|
17708
|
+
async (agent, options) => {
|
|
17709
|
+
const { runAgentsUpdate: runAgentsUpdate2 } = await Promise.resolve().then(() => (init_agents2(), agents_exports2));
|
|
17710
|
+
await runAgentsUpdate2(agent, options);
|
|
17711
|
+
}
|
|
17712
|
+
);
|
|
17645
17713
|
agents.command("activate <agent>").description("Activate an agent \u2014 unpause it (or publish a draft). Admin-only.").option("--json", "Emit a JSON envelope for agent consumption").option("--fields <list>", "Project only these dotted field paths from data (comma-separated)").option("--quiet", "Suppress human chatter (data/errors only)").option("--no-sync", "Skip the auto-sync git pull on this command").action(async (agent, options) => {
|
|
17646
17714
|
const { runAgentsActivate: runAgentsActivate2 } = await Promise.resolve().then(() => (init_agents2(), agents_exports2));
|
|
17647
17715
|
await runAgentsActivate2(agent, options);
|