bamboo-agents 0.1.5-dev.53.8db952b → 0.1.5-dev.54.477c24e
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 +42 -2
- 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.54.477c24e
|
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.54.477c24e";
|
|
3041
3041
|
}
|
|
3042
3042
|
});
|
|
3043
3043
|
|
|
@@ -7388,6 +7388,7 @@ __export(agents_exports, {
|
|
|
7388
7388
|
CliBrandsListResponseSchema: () => CliBrandsListResponseSchema,
|
|
7389
7389
|
CliCreateAgentRequestSchema: () => CliCreateAgentRequestSchema,
|
|
7390
7390
|
CliCreateAgentResponseSchema: () => CliCreateAgentResponseSchema,
|
|
7391
|
+
CliDeleteAgentResponseSchema: () => CliDeleteAgentResponseSchema,
|
|
7391
7392
|
CliTierCapSchema: () => CliTierCapSchema,
|
|
7392
7393
|
CliUpdateAgentRequestSchema: () => CliUpdateAgentRequestSchema,
|
|
7393
7394
|
CliUpdateAgentResponseSchema: () => CliUpdateAgentResponseSchema,
|
|
@@ -7399,7 +7400,7 @@ __export(agents_exports, {
|
|
|
7399
7400
|
UploadClaudeMdRequestSchema: () => UploadClaudeMdRequestSchema,
|
|
7400
7401
|
UploadClaudeMdResponseSchema: () => UploadClaudeMdResponseSchema
|
|
7401
7402
|
});
|
|
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;
|
|
7403
|
+
var SlugSchema, NameSchema, BrandIdSchema, CliAgentRowSchema, CliTierCapSchema, CliAgentsListResponseSchema, CliCreateAgentRequestSchema, CliAgentMutationResponseBase, CliCreateAgentResponseSchema, UPLOAD_MAX_BYTES, CliUploadAgentRequestSchema, CliUploadAgentResponseSchema, CliUpdateAgentRequestSchema, CliUpdateAgentResponseSchema, CliDeleteAgentResponseSchema, CliBrandRowSchema, CliBrandsListResponseSchema, CliAgentLifecycleStateSchema, CliAgentDetailSchema, CliAgentGetResponseSchema, CliAgentPauseResponseSchema, CliAgentPublishResponseSchema, CreateFromCliRequestSchema, CreateFromCliResponseSchema, UploadClaudeMdRequestSchema, UploadClaudeMdResponseSchema;
|
|
7403
7404
|
var init_agents = __esm({
|
|
7404
7405
|
"../../src/lib/api-contracts/cli/agents.ts"() {
|
|
7405
7406
|
init_zod();
|
|
@@ -7483,6 +7484,10 @@ var init_agents = __esm({
|
|
|
7483
7484
|
agent_id: external_exports.string().uuid(),
|
|
7484
7485
|
status: external_exports.string().nullable()
|
|
7485
7486
|
});
|
|
7487
|
+
CliDeleteAgentResponseSchema = external_exports.object({
|
|
7488
|
+
agent_id: external_exports.string().uuid(),
|
|
7489
|
+
pr_number: external_exports.number().nullable()
|
|
7490
|
+
});
|
|
7486
7491
|
CliBrandRowSchema = external_exports.object({
|
|
7487
7492
|
id: external_exports.string().uuid(),
|
|
7488
7493
|
name: external_exports.string()
|
|
@@ -12677,6 +12682,14 @@ async function updateCliAgent(bambooSession, agentId, body) {
|
|
|
12677
12682
|
if (!res.ok) throw await parseError(res);
|
|
12678
12683
|
return CliUpdateAgentResponseSchema.parse(await res.json());
|
|
12679
12684
|
}
|
|
12685
|
+
async function deleteCliAgent(bambooSession, agentId) {
|
|
12686
|
+
const res = await cliApiFetch(
|
|
12687
|
+
`${apiBase()}/api/v1/cli/agents/${encodeURIComponent(agentId)}`,
|
|
12688
|
+
{ method: "DELETE", headers: { Authorization: `Bearer ${bambooSession}` } }
|
|
12689
|
+
);
|
|
12690
|
+
if (!res.ok) throw await parseError(res);
|
|
12691
|
+
return CliDeleteAgentResponseSchema.parse(await res.json());
|
|
12692
|
+
}
|
|
12680
12693
|
async function publishCliAgent(bambooSession, agentId) {
|
|
12681
12694
|
const res = await cliApiFetch(
|
|
12682
12695
|
`${apiBase()}/api/v1/agents/${encodeURIComponent(agentId)}/provision`,
|
|
@@ -17063,6 +17076,7 @@ var init_brand2 = __esm({
|
|
|
17063
17076
|
var agents_exports2 = {};
|
|
17064
17077
|
__export(agents_exports2, {
|
|
17065
17078
|
runAgentsActivate: () => runAgentsActivate,
|
|
17079
|
+
runAgentsDelete: () => runAgentsDelete,
|
|
17066
17080
|
runAgentsGet: () => runAgentsGet,
|
|
17067
17081
|
runAgentsList: () => runAgentsList,
|
|
17068
17082
|
runAgentsPause: () => runAgentsPause,
|
|
@@ -17295,6 +17309,28 @@ async function runAgentsUpdate(agentRef, options) {
|
|
|
17295
17309
|
);
|
|
17296
17310
|
}
|
|
17297
17311
|
}
|
|
17312
|
+
async function runAgentsDelete(agentRef, options) {
|
|
17313
|
+
const opts = options;
|
|
17314
|
+
const session = await requireSession8(opts);
|
|
17315
|
+
const row = await resolveAgentRef(session, agentRef, opts);
|
|
17316
|
+
try {
|
|
17317
|
+
const res = await deleteCliAgent(session, row.id);
|
|
17318
|
+
emitSuccess(
|
|
17319
|
+
res,
|
|
17320
|
+
opts,
|
|
17321
|
+
() => human(
|
|
17322
|
+
` Deleted ${row.name} (${row.id}).${res.pr_number ? ` Tombstone PR #${res.pr_number}.` : ""}`,
|
|
17323
|
+
opts
|
|
17324
|
+
)
|
|
17325
|
+
);
|
|
17326
|
+
} catch (err) {
|
|
17327
|
+
emitError(
|
|
17328
|
+
{ code: "agent_delete_failed", message: `couldn't delete agent: ${err.message}` },
|
|
17329
|
+
opts,
|
|
17330
|
+
1
|
|
17331
|
+
);
|
|
17332
|
+
}
|
|
17333
|
+
}
|
|
17298
17334
|
async function runAgentsActivate(agentRef, options) {
|
|
17299
17335
|
const opts = options;
|
|
17300
17336
|
const session = await requireSession8(opts);
|
|
@@ -17710,6 +17746,10 @@ agents.command("update <agent>").description("Update an agent's name / descripti
|
|
|
17710
17746
|
await runAgentsUpdate2(agent, options);
|
|
17711
17747
|
}
|
|
17712
17748
|
);
|
|
17749
|
+
agents.command("delete <agent>").description("Delete a draft/broken agent (accepts id, slug, or name) \u2014 NOT reversible").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) => {
|
|
17750
|
+
const { runAgentsDelete: runAgentsDelete2 } = await Promise.resolve().then(() => (init_agents2(), agents_exports2));
|
|
17751
|
+
await runAgentsDelete2(agent, options);
|
|
17752
|
+
});
|
|
17713
17753
|
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) => {
|
|
17714
17754
|
const { runAgentsActivate: runAgentsActivate2 } = await Promise.resolve().then(() => (init_agents2(), agents_exports2));
|
|
17715
17755
|
await runAgentsActivate2(agent, options);
|