bamboo-agents 0.1.5-dev.55.449e3e1 → 0.1.5-dev.56.68a2b19
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 +74 -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.56.68a2b19
|
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.56.68a2b19";
|
|
3041
3041
|
}
|
|
3042
3042
|
});
|
|
3043
3043
|
|
|
@@ -7391,6 +7391,8 @@ __export(agents_exports, {
|
|
|
7391
7391
|
CliCreateAgentRequestSchema: () => CliCreateAgentRequestSchema,
|
|
7392
7392
|
CliCreateAgentResponseSchema: () => CliCreateAgentResponseSchema,
|
|
7393
7393
|
CliDeleteAgentResponseSchema: () => CliDeleteAgentResponseSchema,
|
|
7394
|
+
CliEnableTemplateRequestSchema: () => CliEnableTemplateRequestSchema,
|
|
7395
|
+
CliEnableTemplateResponseSchema: () => CliEnableTemplateResponseSchema,
|
|
7394
7396
|
CliTierCapSchema: () => CliTierCapSchema,
|
|
7395
7397
|
CliUpdateAgentRequestSchema: () => CliUpdateAgentRequestSchema,
|
|
7396
7398
|
CliUpdateAgentResponseSchema: () => CliUpdateAgentResponseSchema,
|
|
@@ -7402,7 +7404,7 @@ __export(agents_exports, {
|
|
|
7402
7404
|
UploadClaudeMdRequestSchema: () => UploadClaudeMdRequestSchema,
|
|
7403
7405
|
UploadClaudeMdResponseSchema: () => UploadClaudeMdResponseSchema
|
|
7404
7406
|
});
|
|
7405
|
-
var SlugSchema, NameSchema, BrandIdSchema, CliAgentRowSchema, CliTierCapSchema, CliAgentsListResponseSchema, CliCreateAgentRequestSchema, CliAgentMutationResponseBase, CliCreateAgentResponseSchema, UPLOAD_MAX_BYTES, CliUploadAgentRequestSchema, CliUploadAgentResponseSchema, CliUpdateAgentRequestSchema, CliUpdateAgentResponseSchema, CliDeleteAgentResponseSchema, CliCloneAgentRequestSchema, CliCloneAgentResponseSchema, CliBrandRowSchema, CliBrandsListResponseSchema, CliAgentLifecycleStateSchema, CliAgentDetailSchema, CliAgentGetResponseSchema, CliAgentPauseResponseSchema, CliAgentPublishResponseSchema, CreateFromCliRequestSchema, CreateFromCliResponseSchema, UploadClaudeMdRequestSchema, UploadClaudeMdResponseSchema;
|
|
7407
|
+
var SlugSchema, NameSchema, BrandIdSchema, CliAgentRowSchema, CliTierCapSchema, CliAgentsListResponseSchema, CliCreateAgentRequestSchema, CliAgentMutationResponseBase, CliCreateAgentResponseSchema, UPLOAD_MAX_BYTES, CliUploadAgentRequestSchema, CliUploadAgentResponseSchema, CliUpdateAgentRequestSchema, CliUpdateAgentResponseSchema, CliDeleteAgentResponseSchema, CliCloneAgentRequestSchema, CliCloneAgentResponseSchema, CliEnableTemplateRequestSchema, CliEnableTemplateResponseSchema, CliBrandRowSchema, CliBrandsListResponseSchema, CliAgentLifecycleStateSchema, CliAgentDetailSchema, CliAgentGetResponseSchema, CliAgentPauseResponseSchema, CliAgentPublishResponseSchema, CreateFromCliRequestSchema, CreateFromCliResponseSchema, UploadClaudeMdRequestSchema, UploadClaudeMdResponseSchema;
|
|
7406
7408
|
var init_agents = __esm({
|
|
7407
7409
|
"../../src/lib/api-contracts/cli/agents.ts"() {
|
|
7408
7410
|
init_zod();
|
|
@@ -7503,6 +7505,18 @@ var init_agents = __esm({
|
|
|
7503
7505
|
files_total: external_exports.number(),
|
|
7504
7506
|
brands_copied: external_exports.number()
|
|
7505
7507
|
});
|
|
7508
|
+
CliEnableTemplateRequestSchema = external_exports.object({
|
|
7509
|
+
template_id: external_exports.string().min(1),
|
|
7510
|
+
brand_id: external_exports.string().uuid(),
|
|
7511
|
+
approval_emoji: external_exports.string().optional(),
|
|
7512
|
+
system_prompt: external_exports.string().optional()
|
|
7513
|
+
});
|
|
7514
|
+
CliEnableTemplateResponseSchema = external_exports.object({
|
|
7515
|
+
agent_id: external_exports.string().uuid(),
|
|
7516
|
+
template_id: external_exports.string(),
|
|
7517
|
+
anthropic_agent_id: external_exports.string().nullable(),
|
|
7518
|
+
endpoint_count: external_exports.number()
|
|
7519
|
+
});
|
|
7506
7520
|
CliBrandRowSchema = external_exports.object({
|
|
7507
7521
|
id: external_exports.string().uuid(),
|
|
7508
7522
|
name: external_exports.string()
|
|
@@ -12717,6 +12731,21 @@ async function cloneCliAgent(bambooSession, body) {
|
|
|
12717
12731
|
if (!res.ok) throw await parseError(res);
|
|
12718
12732
|
return CliCloneAgentResponseSchema.parse(await res.json());
|
|
12719
12733
|
}
|
|
12734
|
+
async function enableTemplateCliAgent(bambooSession, agentId, body) {
|
|
12735
|
+
const res = await cliApiFetch(
|
|
12736
|
+
`${apiBase()}/api/v1/cli/agents/${encodeURIComponent(agentId)}/enable-template`,
|
|
12737
|
+
{
|
|
12738
|
+
method: "POST",
|
|
12739
|
+
headers: {
|
|
12740
|
+
Authorization: `Bearer ${bambooSession}`,
|
|
12741
|
+
"Content-Type": "application/json"
|
|
12742
|
+
},
|
|
12743
|
+
body: JSON.stringify(body)
|
|
12744
|
+
}
|
|
12745
|
+
);
|
|
12746
|
+
if (!res.ok) throw await parseError(res);
|
|
12747
|
+
return CliEnableTemplateResponseSchema.parse(await res.json());
|
|
12748
|
+
}
|
|
12720
12749
|
async function publishCliAgent(bambooSession, agentId) {
|
|
12721
12750
|
const res = await cliApiFetch(
|
|
12722
12751
|
`${apiBase()}/api/v1/agents/${encodeURIComponent(agentId)}/provision`,
|
|
@@ -17105,6 +17134,7 @@ __export(agents_exports2, {
|
|
|
17105
17134
|
runAgentsActivate: () => runAgentsActivate,
|
|
17106
17135
|
runAgentsClone: () => runAgentsClone,
|
|
17107
17136
|
runAgentsDelete: () => runAgentsDelete,
|
|
17137
|
+
runAgentsEnableTemplate: () => runAgentsEnableTemplate,
|
|
17108
17138
|
runAgentsGet: () => runAgentsGet,
|
|
17109
17139
|
runAgentsList: () => runAgentsList,
|
|
17110
17140
|
runAgentsPause: () => runAgentsPause,
|
|
@@ -17388,6 +17418,42 @@ async function runAgentsClone(sourceRef, targetRef, options) {
|
|
|
17388
17418
|
);
|
|
17389
17419
|
}
|
|
17390
17420
|
}
|
|
17421
|
+
async function runAgentsEnableTemplate(agentRef, options) {
|
|
17422
|
+
const opts = options;
|
|
17423
|
+
const session = await requireSession8(opts);
|
|
17424
|
+
if (!options.template) {
|
|
17425
|
+
emitError({ code: "template_required", message: "Provide --template <id>." }, opts, 2);
|
|
17426
|
+
return;
|
|
17427
|
+
}
|
|
17428
|
+
if (!options.brand) {
|
|
17429
|
+
emitError({ code: "brand_required", message: "Provide --brand <id>." }, opts, 2);
|
|
17430
|
+
return;
|
|
17431
|
+
}
|
|
17432
|
+
const row = await resolveAgentRef(session, agentRef, opts);
|
|
17433
|
+
const body = {
|
|
17434
|
+
template_id: options.template,
|
|
17435
|
+
brand_id: options.brand,
|
|
17436
|
+
...options.emoji ? { approval_emoji: options.emoji } : {},
|
|
17437
|
+
...options.systemPrompt ? { system_prompt: options.systemPrompt } : {}
|
|
17438
|
+
};
|
|
17439
|
+
try {
|
|
17440
|
+
const res = await enableTemplateCliAgent(session, row.id, body);
|
|
17441
|
+
emitSuccess(
|
|
17442
|
+
res,
|
|
17443
|
+
opts,
|
|
17444
|
+
() => human(
|
|
17445
|
+
` Applied template "${res.template_id}" to ${row.name} (${row.id}).${res.endpoint_count ? ` ${res.endpoint_count} trigger endpoint${res.endpoint_count === 1 ? "" : "s"}.` : ""} (Slack channel binding, if any, is set in the UI.)`,
|
|
17446
|
+
opts
|
|
17447
|
+
)
|
|
17448
|
+
);
|
|
17449
|
+
} catch (err) {
|
|
17450
|
+
emitError(
|
|
17451
|
+
{ code: "agent_enable_template_failed", message: `couldn't enable template: ${err.message}` },
|
|
17452
|
+
opts,
|
|
17453
|
+
1
|
|
17454
|
+
);
|
|
17455
|
+
}
|
|
17456
|
+
}
|
|
17391
17457
|
async function runAgentsActivate(agentRef, options) {
|
|
17392
17458
|
const opts = options;
|
|
17393
17459
|
const session = await requireSession8(opts);
|
|
@@ -17813,6 +17879,12 @@ agents.command("clone <source> <target>").description("Clone files (+ brands) fr
|
|
|
17813
17879
|
await runAgentsClone2(source, target, options);
|
|
17814
17880
|
}
|
|
17815
17881
|
);
|
|
17882
|
+
agents.command("enable-template <agent>").description("Apply a template to an agent (template-only; Slack channel binding is set in the UI)").requiredOption("--template <id>", "Template id (e.g. marketing_account_manager)").requiredOption("--brand <id>", "Brand id to scope the template to").option("--emoji <name>", "Slack approval emoji short-name (defaults to the template's)").option("--system-prompt <text>", "Override the template's default system prompt").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(
|
|
17883
|
+
async (agent, options) => {
|
|
17884
|
+
const { runAgentsEnableTemplate: runAgentsEnableTemplate2 } = await Promise.resolve().then(() => (init_agents2(), agents_exports2));
|
|
17885
|
+
await runAgentsEnableTemplate2(agent, options);
|
|
17886
|
+
}
|
|
17887
|
+
);
|
|
17816
17888
|
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) => {
|
|
17817
17889
|
const { runAgentsActivate: runAgentsActivate2 } = await Promise.resolve().then(() => (init_agents2(), agents_exports2));
|
|
17818
17890
|
await runAgentsActivate2(agent, options);
|