@brainbase-labs/cli 0.11.1 → 0.13.0
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/index.js +160 -50
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -29449,7 +29449,7 @@ function padStart(s, n) {
|
|
|
29449
29449
|
// package.json
|
|
29450
29450
|
var package_default = {
|
|
29451
29451
|
name: "@brainbase-labs/cli",
|
|
29452
|
-
version: "0.
|
|
29452
|
+
version: "0.13.0",
|
|
29453
29453
|
description: "Pack, share, and install agent templates across harnesses (Claude Code, Codex, ...).",
|
|
29454
29454
|
type: "module",
|
|
29455
29455
|
bin: {
|
|
@@ -51152,8 +51152,10 @@ var PlaybookContentSchema = exports_external.object({
|
|
|
51152
51152
|
message: "playbook content must set either `file` or `text`"
|
|
51153
51153
|
});
|
|
51154
51154
|
var PlaybookSchema = exports_external.object({
|
|
51155
|
+
id: exports_external.string().optional(),
|
|
51155
51156
|
title: exports_external.string().min(1),
|
|
51156
51157
|
description: exports_external.string().optional(),
|
|
51158
|
+
icon: exports_external.string().optional(),
|
|
51157
51159
|
content: PlaybookContentSchema
|
|
51158
51160
|
});
|
|
51159
51161
|
var SkillEntrySchema = exports_external.object({
|
|
@@ -51171,7 +51173,8 @@ var McpEntrySchema = exports_external.object({
|
|
|
51171
51173
|
var CapabilitiesSchema = exports_external.object({
|
|
51172
51174
|
memory: exports_external.boolean().optional(),
|
|
51173
51175
|
browser: exports_external.boolean().optional(),
|
|
51174
|
-
slack: exports_external.boolean().optional()
|
|
51176
|
+
slack: exports_external.boolean().optional(),
|
|
51177
|
+
meeting: exports_external.boolean().optional()
|
|
51175
51178
|
});
|
|
51176
51179
|
var AgentManifestSchema = exports_external.object({
|
|
51177
51180
|
schema: exports_external.literal(1),
|
|
@@ -51278,7 +51281,38 @@ function resolvePlaybookContent(cwd2, entry) {
|
|
|
51278
51281
|
return null;
|
|
51279
51282
|
}
|
|
51280
51283
|
function slugifyPlaybookTitle(title) {
|
|
51281
|
-
return title.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 60) || "playbook";
|
|
51284
|
+
return title.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 60).replace(/^-+|-+$/g, "") || "playbook";
|
|
51285
|
+
}
|
|
51286
|
+
function playbookYamlScalar(value) {
|
|
51287
|
+
const safe = value.replace(/\\/g, "\\\\").replace(/"/g, "\\\"").replace(/\n/g, " ").trim();
|
|
51288
|
+
return `"${safe}"`;
|
|
51289
|
+
}
|
|
51290
|
+
function assemblePlaybookWireBody(entry, body) {
|
|
51291
|
+
const lines = ["---", `title: ${playbookYamlScalar(entry.title)}`];
|
|
51292
|
+
if (entry.description) {
|
|
51293
|
+
lines.push(`description: ${playbookYamlScalar(entry.description)}`);
|
|
51294
|
+
}
|
|
51295
|
+
if (entry.icon) {
|
|
51296
|
+
lines.push(`icon: ${playbookYamlScalar(entry.icon)}`);
|
|
51297
|
+
}
|
|
51298
|
+
lines.push("---", "", "");
|
|
51299
|
+
return lines.join(`
|
|
51300
|
+
`) + body.replace(/^\n+/, "").trimEnd() + `
|
|
51301
|
+
`;
|
|
51302
|
+
}
|
|
51303
|
+
function assignPlaybookSlugs(titles) {
|
|
51304
|
+
const used = new Set;
|
|
51305
|
+
return titles.map((t) => {
|
|
51306
|
+
const base2 = slugifyPlaybookTitle(t);
|
|
51307
|
+
let slug = base2;
|
|
51308
|
+
let n = 1;
|
|
51309
|
+
while (used.has(slug)) {
|
|
51310
|
+
n += 1;
|
|
51311
|
+
slug = `${base2}-${n}`;
|
|
51312
|
+
}
|
|
51313
|
+
used.add(slug);
|
|
51314
|
+
return slug;
|
|
51315
|
+
});
|
|
51282
51316
|
}
|
|
51283
51317
|
|
|
51284
51318
|
// src/core/link.ts
|
|
@@ -51327,7 +51361,7 @@ var SyncedComponentSchema = exports_external.object({
|
|
|
51327
51361
|
});
|
|
51328
51362
|
var AgentMetaSnapshotSchema = exports_external.object({
|
|
51329
51363
|
name: exports_external.string(),
|
|
51330
|
-
tagline: exports_external.string().
|
|
51364
|
+
tagline: exports_external.string().nullish().transform((v3) => v3 ?? undefined),
|
|
51331
51365
|
entrypoint: exports_external.string().optional()
|
|
51332
51366
|
});
|
|
51333
51367
|
var SyncStateSchema = exports_external.object({
|
|
@@ -52069,6 +52103,39 @@ function buildSlackMcpComponent(scope) {
|
|
|
52069
52103
|
};
|
|
52070
52104
|
}
|
|
52071
52105
|
|
|
52106
|
+
// src/core/meeting-mcp.ts
|
|
52107
|
+
var DEFAULT_MEETING_MCP_BASE = "https://meeting.mcp.brainbaselabs.com";
|
|
52108
|
+
var MEETING_MCP_SLUG = "brainbase-meeting";
|
|
52109
|
+
function meetingMcpBaseUrl() {
|
|
52110
|
+
const envOverride = process.env.BRAINBASE_MEETING_MCP_URL;
|
|
52111
|
+
if (envOverride)
|
|
52112
|
+
return envOverride.replace(/\/+$/, "");
|
|
52113
|
+
return DEFAULT_MEETING_MCP_BASE;
|
|
52114
|
+
}
|
|
52115
|
+
function meetingMcpUrl() {
|
|
52116
|
+
return `${meetingMcpBaseUrl()}/t/\${BRAINBASE_THREAD_ID}/mcp`;
|
|
52117
|
+
}
|
|
52118
|
+
function meetingMcpPayload() {
|
|
52119
|
+
return {
|
|
52120
|
+
url: meetingMcpUrl(),
|
|
52121
|
+
headers: {
|
|
52122
|
+
Authorization: "Bearer ${BRAINBASE_TOKEN}"
|
|
52123
|
+
}
|
|
52124
|
+
};
|
|
52125
|
+
}
|
|
52126
|
+
function buildMeetingMcpComponent(scope) {
|
|
52127
|
+
return {
|
|
52128
|
+
type: "mcp",
|
|
52129
|
+
slug: MEETING_MCP_SLUG,
|
|
52130
|
+
scope,
|
|
52131
|
+
rootDir: "",
|
|
52132
|
+
description: "This agent's Meeting connector (join calls, read transcripts, manage " + "recordings and notes). Scoped to this agent only.",
|
|
52133
|
+
meta: { mcp: meetingMcpPayload() },
|
|
52134
|
+
payload: meetingMcpPayload(),
|
|
52135
|
+
checksum: "builtin:brainbase-meeting:v1"
|
|
52136
|
+
};
|
|
52137
|
+
}
|
|
52138
|
+
|
|
52072
52139
|
// src/core/browser-mcp.ts
|
|
52073
52140
|
var DEFAULT_BROWSER_MCP_BASE = "https://brainbase-browser-mcp.onrender.com";
|
|
52074
52141
|
var BROWSER_MCP_SLUG = "brainbase-browser";
|
|
@@ -52107,7 +52174,8 @@ function capabilitiesFromAgent(agent) {
|
|
|
52107
52174
|
return {
|
|
52108
52175
|
memory: agent.memory_enabled !== false,
|
|
52109
52176
|
browser: agent.browser_enabled !== false,
|
|
52110
|
-
slack: agent.slack_connected === true
|
|
52177
|
+
slack: agent.slack_connected === true,
|
|
52178
|
+
meeting: agent.meeting_connected === true
|
|
52111
52179
|
};
|
|
52112
52180
|
}
|
|
52113
52181
|
function capabilitiesFromManifest(manifest) {
|
|
@@ -52115,7 +52183,8 @@ function capabilitiesFromManifest(manifest) {
|
|
|
52115
52183
|
return {
|
|
52116
52184
|
memory: c2.memory !== false,
|
|
52117
52185
|
browser: c2.browser !== false,
|
|
52118
|
-
slack: c2.slack === true
|
|
52186
|
+
slack: c2.slack === true,
|
|
52187
|
+
meeting: c2.meeting === true
|
|
52119
52188
|
};
|
|
52120
52189
|
}
|
|
52121
52190
|
function resolveBuiltinMcps(input) {
|
|
@@ -52124,7 +52193,8 @@ function resolveBuiltinMcps(input) {
|
|
|
52124
52193
|
{ slug: ORCHESTRATION_MCP_SLUG, enabled: true, build: buildOrchestrationMcpComponent },
|
|
52125
52194
|
{ slug: MEMORY_MCP_SLUG, enabled: caps.memory, build: buildMemoryMcpComponent },
|
|
52126
52195
|
{ slug: BROWSER_MCP_SLUG, enabled: caps.browser, build: buildBrowserMcpComponent },
|
|
52127
|
-
{ slug: SLACK_MCP_SLUG, enabled: caps.slack, build: buildSlackMcpComponent }
|
|
52196
|
+
{ slug: SLACK_MCP_SLUG, enabled: caps.slack, build: buildSlackMcpComponent },
|
|
52197
|
+
{ slug: MEETING_MCP_SLUG, enabled: caps.meeting, build: buildMeetingMcpComponent }
|
|
52128
52198
|
];
|
|
52129
52199
|
const install = [];
|
|
52130
52200
|
const removeSlugs = [];
|
|
@@ -52604,34 +52674,25 @@ function readLocalComponents(cwd2, manifest) {
|
|
|
52604
52674
|
hash: hashMcpEntry(entry)
|
|
52605
52675
|
});
|
|
52606
52676
|
}
|
|
52607
|
-
|
|
52677
|
+
const pbEntries = manifest.playbooks ?? [];
|
|
52678
|
+
const pbSlugs = assignPlaybookSlugs(pbEntries.map((e2) => e2.title));
|
|
52679
|
+
for (let i = 0;i < pbEntries.length; i++) {
|
|
52680
|
+
const entry = pbEntries[i];
|
|
52681
|
+
const slug = pbSlugs[i];
|
|
52608
52682
|
const body = resolvePlaybookContent(cwd2, entry);
|
|
52609
52683
|
if (body === null) {
|
|
52610
|
-
out.push({
|
|
52611
|
-
type: "playbook",
|
|
52612
|
-
slug: slugifyPlaybookTitle(entry.title),
|
|
52613
|
-
hash: null
|
|
52614
|
-
});
|
|
52684
|
+
out.push({ type: "playbook", slug, hash: null });
|
|
52615
52685
|
continue;
|
|
52616
52686
|
}
|
|
52617
|
-
const wireBody =
|
|
52618
|
-
title: ${jsonOrPlain(entry.title)}` + (entry.description ? `
|
|
52619
|
-
description: ${jsonOrPlain(entry.description)}` : "") + `
|
|
52620
|
-
---
|
|
52621
|
-
${body.replace(/^\n+/, "")}`;
|
|
52687
|
+
const wireBody = assemblePlaybookWireBody(entry, body);
|
|
52622
52688
|
out.push({
|
|
52623
52689
|
type: "playbook",
|
|
52624
|
-
slug
|
|
52690
|
+
slug,
|
|
52625
52691
|
hash: componentHashFromFileHashes([hashString(wireBody)])
|
|
52626
52692
|
});
|
|
52627
52693
|
}
|
|
52628
52694
|
return out;
|
|
52629
52695
|
}
|
|
52630
|
-
function jsonOrPlain(s3) {
|
|
52631
|
-
if (!/[\n":#&*!|>'%@`{}[\]]/.test(s3) && s3.trim() === s3 && s3 !== "")
|
|
52632
|
-
return s3;
|
|
52633
|
-
return JSON.stringify(s3);
|
|
52634
|
-
}
|
|
52635
52696
|
function threeWayDiff(input) {
|
|
52636
52697
|
const lockMap = new Map;
|
|
52637
52698
|
for (const c2 of input.lock)
|
|
@@ -53154,7 +53215,7 @@ function materializePlaybooks(cwd2, cloud, toInstall, keepLocal, existingManifes
|
|
|
53154
53215
|
if (!raw.trim())
|
|
53155
53216
|
continue;
|
|
53156
53217
|
const { body } = stripFrontmatter(raw);
|
|
53157
|
-
const existing = existingManifest?.playbooks?.find((p2) =>
|
|
53218
|
+
const existing = existingManifest?.playbooks?.find((p2) => slugifyPlaybookTitle(p2.title) === c2.slug);
|
|
53158
53219
|
if (existing?.content?.text !== undefined)
|
|
53159
53220
|
continue;
|
|
53160
53221
|
const targetRel = existing?.content?.file ?? path48.join(DEFAULT_PLAYBOOKS_DIR, `${c2.slug}.md`);
|
|
@@ -53163,9 +53224,6 @@ function materializePlaybooks(cwd2, cloud, toInstall, keepLocal, existingManifes
|
|
|
53163
53224
|
fs45.writeFileSync(target, body, "utf8");
|
|
53164
53225
|
}
|
|
53165
53226
|
}
|
|
53166
|
-
function slugifyForCompare(s3) {
|
|
53167
|
-
return s3.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 60) || "playbook";
|
|
53168
|
-
}
|
|
53169
53227
|
function stripFrontmatter(raw) {
|
|
53170
53228
|
const m3 = /^---\s*\n([\s\S]*?)\n---\s*\n?/.exec(raw);
|
|
53171
53229
|
if (!m3)
|
|
@@ -53218,15 +53276,18 @@ function mergeManifest(cwd2, prev, cloud, cloudAgent, harness) {
|
|
|
53218
53276
|
const playbooks = cloud.components.filter((c2) => c2.type === "playbook").map((c2) => {
|
|
53219
53277
|
const raw = c2.files[0]?.content ?? "";
|
|
53220
53278
|
const { frontmatter } = stripFrontmatter(raw);
|
|
53221
|
-
const local = prev?.playbooks?.find((pb) =>
|
|
53279
|
+
const local = prev?.playbooks?.find((pb) => slugifyPlaybookTitle(pb.title) === c2.slug);
|
|
53222
53280
|
const title = local?.title ?? (typeof frontmatter.title === "string" && frontmatter.title || c2.slug);
|
|
53223
53281
|
const description = local?.description ?? (typeof frontmatter.description === "string" ? frontmatter.description : undefined);
|
|
53224
53282
|
const content = local?.content?.text !== undefined ? { text: local.content.text } : {
|
|
53225
53283
|
file: local?.content?.file ?? path48.join(DEFAULT_PLAYBOOKS_DIR, `${c2.slug}.md`)
|
|
53226
53284
|
};
|
|
53285
|
+
const pbMeta = c2.meta ?? {};
|
|
53227
53286
|
return {
|
|
53287
|
+
...typeof pbMeta.playbook_id === "string" && pbMeta.playbook_id ? { id: pbMeta.playbook_id } : {},
|
|
53228
53288
|
title,
|
|
53229
53289
|
...description ? { description } : {},
|
|
53290
|
+
...typeof pbMeta.icon === "string" && pbMeta.icon ? { icon: pbMeta.icon } : {},
|
|
53230
53291
|
content
|
|
53231
53292
|
};
|
|
53232
53293
|
});
|
|
@@ -53261,7 +53322,12 @@ function mergeManifest(cwd2, prev, cloud, cloudAgent, harness) {
|
|
|
53261
53322
|
playbooks,
|
|
53262
53323
|
skills,
|
|
53263
53324
|
mcp,
|
|
53264
|
-
capabilities: {
|
|
53325
|
+
capabilities: {
|
|
53326
|
+
memory: caps.memory,
|
|
53327
|
+
browser: caps.browser,
|
|
53328
|
+
slack: caps.slack,
|
|
53329
|
+
meeting: caps.meeting
|
|
53330
|
+
}
|
|
53265
53331
|
};
|
|
53266
53332
|
}
|
|
53267
53333
|
function materializeEntrypoint(cwd2, cloudEntrypoint, prev) {
|
|
@@ -53515,6 +53581,46 @@ async function buildOutgoingComponents(cwd2, manifest, cloud, resolvedVersions)
|
|
|
53515
53581
|
}
|
|
53516
53582
|
});
|
|
53517
53583
|
}
|
|
53584
|
+
const playbookEntries = manifest.playbooks ?? [];
|
|
53585
|
+
const playbookSlugs = assignPlaybookSlugs(playbookEntries.map((e2) => e2.title));
|
|
53586
|
+
for (let i = 0;i < playbookEntries.length; i++) {
|
|
53587
|
+
const entry = playbookEntries[i];
|
|
53588
|
+
const slug = playbookSlugs[i];
|
|
53589
|
+
if (entry.content.text !== undefined && entry.content.file !== undefined) {
|
|
53590
|
+
f2.error(`Playbook ${import_picocolors26.default.bold(entry.title)} sets both ${import_picocolors26.default.cyan("text")} and ${import_picocolors26.default.cyan("file")} — pick one.`);
|
|
53591
|
+
return null;
|
|
53592
|
+
}
|
|
53593
|
+
const body = resolvePlaybookContent(cwd2, entry);
|
|
53594
|
+
if (body === null) {
|
|
53595
|
+
if (entry.content.file) {
|
|
53596
|
+
f2.error(`Playbook ${import_picocolors26.default.bold(entry.title)} content file ${import_picocolors26.default.bold(entry.content.file)} not found.`);
|
|
53597
|
+
} else {
|
|
53598
|
+
f2.error(`Playbook ${import_picocolors26.default.bold(entry.title)} content is empty.`);
|
|
53599
|
+
}
|
|
53600
|
+
return null;
|
|
53601
|
+
}
|
|
53602
|
+
const wireBody = assemblePlaybookWireBody(entry, body);
|
|
53603
|
+
const fileName = `${slug}.md`;
|
|
53604
|
+
const fileHash2 = hashString(wireBody);
|
|
53605
|
+
const file = {
|
|
53606
|
+
path: fileName,
|
|
53607
|
+
content: wireBody,
|
|
53608
|
+
hash: fileHash2
|
|
53609
|
+
};
|
|
53610
|
+
out.push({
|
|
53611
|
+
type: "playbook",
|
|
53612
|
+
slug,
|
|
53613
|
+
description: entry.description,
|
|
53614
|
+
hash: componentHashFromFileHashes([fileHash2]),
|
|
53615
|
+
files: [file],
|
|
53616
|
+
meta: {
|
|
53617
|
+
title: entry.title,
|
|
53618
|
+
...entry.description ? { description: entry.description } : {},
|
|
53619
|
+
...entry.icon ? { icon: entry.icon } : {},
|
|
53620
|
+
...entry.id ? { playbook_id: entry.id } : {}
|
|
53621
|
+
}
|
|
53622
|
+
});
|
|
53623
|
+
}
|
|
53518
53624
|
for (const entry of manifest.mcp ?? []) {
|
|
53519
53625
|
if (!entry.url && !entry.command) {
|
|
53520
53626
|
f2.error(`MCP ${import_picocolors26.default.bold(entry.name)} needs either ${import_picocolors26.default.cyan("url")} or ${import_picocolors26.default.cyan("command")}.`);
|
|
@@ -53739,16 +53845,21 @@ async function runAgentPush(cwd2, args) {
|
|
|
53739
53845
|
return;
|
|
53740
53846
|
}
|
|
53741
53847
|
}
|
|
53848
|
+
const localPlaybooks = manifest.playbooks ?? [];
|
|
53849
|
+
const localPlaybookSlugs = assignPlaybookSlugs(localPlaybooks.map((entry) => entry.title));
|
|
53850
|
+
const idlessLocalSlugs = new Set(localPlaybooks.flatMap((entry, i) => entry.id ? [] : [localPlaybookSlugs[i]]));
|
|
53851
|
+
const preIdSchemaSlugs = cloud.components.filter((c2) => c2.type === "playbook").filter((c2) => {
|
|
53852
|
+
const id = c2.meta?.playbook_id;
|
|
53853
|
+
return typeof id === "string" && id && !localPlaybooks.some((p2) => p2.id === id) && idlessLocalSlugs.has(c2.slug);
|
|
53854
|
+
}).map((c2) => c2.slug);
|
|
53855
|
+
if (preIdSchemaSlugs.length > 0) {
|
|
53856
|
+
f2.error(`Playbook ${preIdSchemaSlugs.length === 1 ? "entry" : "entries"} ${preIdSchemaSlugs.map((s3) => import_picocolors27.default.bold(s3)).join(", ")} in ${import_picocolors27.default.bold("brainbase.agent.yaml")} ${preIdSchemaSlugs.length === 1 ? "is" : "are"} missing ${import_picocolors27.default.cyan("id:")}. Run ${import_picocolors27.default.bold("brainbase agent pull")} first to sync playbook ids, then push.`);
|
|
53857
|
+
return;
|
|
53858
|
+
}
|
|
53742
53859
|
const toSend = [];
|
|
53743
53860
|
const conflicts = [];
|
|
53744
53861
|
const upstreamOnly = [];
|
|
53745
|
-
const unpushablePlaybooks = [];
|
|
53746
53862
|
for (const r2 of rows) {
|
|
53747
|
-
const localish = r2.status === "modified-local" || r2.status === "added-only-local" || r2.status === "removed-local" || r2.status === "modified-both";
|
|
53748
|
-
if (r2.type === "playbook" && localish) {
|
|
53749
|
-
unpushablePlaybooks.push(r2);
|
|
53750
|
-
continue;
|
|
53751
|
-
}
|
|
53752
53863
|
switch (r2.status) {
|
|
53753
53864
|
case "modified-local":
|
|
53754
53865
|
case "added-only-local":
|
|
@@ -53765,9 +53876,6 @@ async function runAgentPush(cwd2, args) {
|
|
|
53765
53876
|
break;
|
|
53766
53877
|
}
|
|
53767
53878
|
}
|
|
53768
|
-
if (unpushablePlaybooks.length > 0) {
|
|
53769
|
-
f2.warn(`Local playbook change${unpushablePlaybooks.length === 1 ? "" : "s"} can't be pushed yet (the server doesn't accept playbooks) — edit playbooks in the UI instead: ${unpushablePlaybooks.map((r2) => import_picocolors27.default.bold(r2.slug)).join(", ")}`);
|
|
53770
|
-
}
|
|
53771
53879
|
if (!meta.localChanged && !entrypointChanged && toSend.length === 0 && conflicts.length === 0) {
|
|
53772
53880
|
f2.info("Nothing to push — local is in sync with the cloud.");
|
|
53773
53881
|
return;
|
|
@@ -53860,7 +53968,8 @@ async function runAgentPush(cwd2, args) {
|
|
|
53860
53968
|
try {
|
|
53861
53969
|
updatedCloud = await api.pushAgentManifest(agentId, {
|
|
53862
53970
|
components: outgoing,
|
|
53863
|
-
base_revision: cloud.revision
|
|
53971
|
+
base_revision: cloud.revision,
|
|
53972
|
+
reconcile_playbooks: true
|
|
53864
53973
|
});
|
|
53865
53974
|
pushSpinner.stop(`Pushed. New revision ${updatedCloud.revision}.`);
|
|
53866
53975
|
} catch (err) {
|
|
@@ -53882,8 +53991,6 @@ async function runAgentPush(cwd2, args) {
|
|
|
53882
53991
|
}
|
|
53883
53992
|
const localHashByKey = new Map;
|
|
53884
53993
|
for (const lc of localComponents) {
|
|
53885
|
-
if (lc.type === "playbook")
|
|
53886
|
-
continue;
|
|
53887
53994
|
if (lc.hash)
|
|
53888
53995
|
localHashByKey.set(`${lc.type}/${lc.slug}`, lc.hash);
|
|
53889
53996
|
}
|
|
@@ -54409,10 +54516,7 @@ async function runAgentCreate(cwd2, args) {
|
|
|
54409
54516
|
writeLink(cwd2, link2);
|
|
54410
54517
|
manifest = readManifest(cwd2);
|
|
54411
54518
|
let updatedCloud = null;
|
|
54412
|
-
|
|
54413
|
-
f2.info(`Playbooks aren't pushable yet — skipping ${manifest.playbooks.length}. Create playbooks in the UI instead.`);
|
|
54414
|
-
}
|
|
54415
|
-
const hasContent = !!manifest.instructions || manifest.skills.length > 0 || (manifest.mcp ?? []).length > 0;
|
|
54519
|
+
const hasContent = !!manifest.instructions || manifest.skills.length > 0 || (manifest.mcp ?? []).length > 0 || (manifest.playbooks ?? []).length > 0;
|
|
54416
54520
|
if (hasContent) {
|
|
54417
54521
|
const outgoing = await buildOutgoingComponents(cwd2, manifest, null);
|
|
54418
54522
|
if (outgoing === null) {
|
|
@@ -54423,7 +54527,8 @@ async function runAgentCreate(cwd2, args) {
|
|
|
54423
54527
|
try {
|
|
54424
54528
|
updatedCloud = await api.pushAgentManifest(agent.id, {
|
|
54425
54529
|
components: outgoing,
|
|
54426
|
-
base_revision: 0
|
|
54530
|
+
base_revision: 0,
|
|
54531
|
+
reconcile_playbooks: true
|
|
54427
54532
|
});
|
|
54428
54533
|
pushSpinner.stop(`Pushed at revision ${updatedCloud.revision}.`);
|
|
54429
54534
|
} catch (err) {
|
|
@@ -54877,7 +54982,7 @@ function printHelp() {
|
|
|
54877
54982
|
out.push("");
|
|
54878
54983
|
out.push(` ${import_picocolors32.default.cyan("create")} ${import_picocolors32.default.dim("claim an unclaimed brainbase.agent.yaml and create the cloud agent")}`);
|
|
54879
54984
|
out.push(` ${import_picocolors32.default.cyan("pull")} ${import_picocolors32.default.dim("[<id>]")} ${import_picocolors32.default.dim("apply cloud changes into this folder — pass <id> to switch (--force to override); --run-entrypoint to also execute the agent entrypoint")}`);
|
|
54880
|
-
out.push(` ${import_picocolors32.default.cyan("push")} ${import_picocolors32.default.dim("send local changes to the cloud")}`);
|
|
54985
|
+
out.push(` ${import_picocolors32.default.cyan("push")} ${import_picocolors32.default.dim("send local changes to the cloud — instructions, playbooks, skills, MCPs, entrypoint")}`);
|
|
54881
54986
|
out.push(` ${import_picocolors32.default.cyan("unpack")} ${import_picocolors32.default.dim("install the claimed agent into a harness layout (--harness to override)")}`);
|
|
54882
54987
|
out.push(` ${import_picocolors32.default.cyan("status")} ${import_picocolors32.default.dim("show what would push and what would pull")}`);
|
|
54883
54988
|
out.push(` ${import_picocolors32.default.cyan("env")} ${import_picocolors32.default.dim('print export statements — use with `eval "$(brainbase agent env)"`')}`);
|
|
@@ -55253,7 +55358,12 @@ function buildManifestFromCloud(cloud, agent) {
|
|
|
55253
55358
|
playbooks: [],
|
|
55254
55359
|
skills,
|
|
55255
55360
|
mcp,
|
|
55256
|
-
capabilities: {
|
|
55361
|
+
capabilities: {
|
|
55362
|
+
memory: caps.memory,
|
|
55363
|
+
browser: caps.browser,
|
|
55364
|
+
slack: caps.slack,
|
|
55365
|
+
meeting: caps.meeting
|
|
55366
|
+
}
|
|
55257
55367
|
};
|
|
55258
55368
|
}
|
|
55259
55369
|
async function pullAgentSecrets(cwd2, agentId) {
|
|
@@ -56810,7 +56920,7 @@ function help() {
|
|
|
56810
56920
|
out.push("");
|
|
56811
56921
|
out.push(` ${import_picocolors41.default.cyan("agent create")} ${import_picocolors41.default.dim("claim an unclaimed brainbase.agent.yaml and create the cloud agent")}`);
|
|
56812
56922
|
out.push(` ${import_picocolors41.default.cyan("agent pull")} ${import_picocolors41.default.dim("[<id>]")} ${import_picocolors41.default.dim("bring cloud changes into this folder (--force to override; --run-entrypoint to also execute the agent entrypoint)")}`);
|
|
56813
|
-
out.push(` ${import_picocolors41.default.cyan("agent push")} ${import_picocolors41.default.dim("send local changes to the cloud")}`);
|
|
56923
|
+
out.push(` ${import_picocolors41.default.cyan("agent push")} ${import_picocolors41.default.dim("send local changes to the cloud — instructions, playbooks, skills, MCPs, entrypoint")}`);
|
|
56814
56924
|
out.push(` ${import_picocolors41.default.cyan("agent unpack")} ${import_picocolors41.default.dim("install the claimed agent into a harness layout")}`);
|
|
56815
56925
|
out.push(` ${import_picocolors41.default.cyan("link")} ${import_picocolors41.default.dim("attach this folder to an existing agent")}`);
|
|
56816
56926
|
out.push(` ${import_picocolors41.default.cyan("agent status")} ${import_picocolors41.default.dim("show what would pull and what would push")}`);
|