@koda-sl/baker-cli 0.105.0 → 0.106.0-dev.2a665c873
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/README.md +18 -0
- package/dist/{chunk-3JVYU72O.js → chunk-26K7V346.js} +4 -4
- package/dist/chunk-26K7V346.js.map +1 -0
- package/dist/cli.js +220 -67
- package/dist/cli.js.map +1 -1
- package/dist/engine/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-3JVYU72O.js.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
defaultRegistry,
|
|
10
10
|
generateCatalog,
|
|
11
11
|
validateCanvasDeep
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-26K7V346.js";
|
|
13
13
|
|
|
14
14
|
// src/cli.ts
|
|
15
|
-
import { defineCommand as
|
|
15
|
+
import { defineCommand as defineCommand153, runMain } from "citty";
|
|
16
16
|
|
|
17
17
|
// src/commands/actions/index.ts
|
|
18
18
|
import { defineCommand as defineCommand18 } from "citty";
|
|
@@ -31,6 +31,7 @@ function getEnv() {
|
|
|
31
31
|
BAKER_API_KEY: z.string().startsWith("bk_", "API key must start with 'bk_'"),
|
|
32
32
|
BAKER_API_URL: z.url("BAKER_API_URL must be a valid URL"),
|
|
33
33
|
BAKER_CHAT_ID: z.string().optional(),
|
|
34
|
+
BAKER_ACTING_USER_ID: z.string().optional(),
|
|
34
35
|
BAKER_GOOGLE_ADS_CUSTOMER_ID: z.string().regex(/^\d{10}$/).optional(),
|
|
35
36
|
BAKER_GA4_PROPERTY_ID: z.string().optional(),
|
|
36
37
|
BAKER_GSC_SITE_URL: z.string().optional(),
|
|
@@ -16389,11 +16390,162 @@ Paid transforms (run on the Convex backend, cost-tracked):
|
|
|
16389
16390
|
}
|
|
16390
16391
|
});
|
|
16391
16392
|
|
|
16393
|
+
// src/commands/mcp/index.ts
|
|
16394
|
+
import { defineCommand as defineCommand121 } from "citty";
|
|
16395
|
+
var SCOPES = ["user", "company", "org"];
|
|
16396
|
+
function parseScope(raw) {
|
|
16397
|
+
const scope = raw === void 0 ? "company" : String(raw);
|
|
16398
|
+
if (!SCOPES.includes(scope)) {
|
|
16399
|
+
throw new ApiError("VALIDATION_ERROR", `Invalid --scope "${scope}". Use user | company | org.`);
|
|
16400
|
+
}
|
|
16401
|
+
return scope;
|
|
16402
|
+
}
|
|
16403
|
+
function actingUserId() {
|
|
16404
|
+
return getEnv().BAKER_ACTING_USER_ID;
|
|
16405
|
+
}
|
|
16406
|
+
function parseHeaders(raw) {
|
|
16407
|
+
const list = raw === void 0 ? [] : Array.isArray(raw) ? raw : [raw];
|
|
16408
|
+
const headers = {};
|
|
16409
|
+
for (const entry of list) {
|
|
16410
|
+
const text = String(entry);
|
|
16411
|
+
const sep = text.indexOf(":") >= 0 && (text.indexOf(":") < text.indexOf("=") || text.indexOf("=") < 0) ? ":" : "=";
|
|
16412
|
+
const at = text.indexOf(sep);
|
|
16413
|
+
if (at <= 0) {
|
|
16414
|
+
throw new ApiError("VALIDATION_ERROR", `Invalid header "${text}". Use "Key: Value".`);
|
|
16415
|
+
}
|
|
16416
|
+
headers[text.slice(0, at).trim()] = text.slice(at + 1).trim();
|
|
16417
|
+
}
|
|
16418
|
+
return Object.keys(headers).length > 0 ? headers : void 0;
|
|
16419
|
+
}
|
|
16420
|
+
function fail3(err) {
|
|
16421
|
+
if (err instanceof ApiError) {
|
|
16422
|
+
writeJson({ ok: false, error: { code: err.code, message: err.message } });
|
|
16423
|
+
process.exit(1);
|
|
16424
|
+
}
|
|
16425
|
+
writeJson({ ok: false, error: { code: "NETWORK_ERROR", message: "Unexpected error" } });
|
|
16426
|
+
process.exit(1);
|
|
16427
|
+
}
|
|
16428
|
+
registerSchema({
|
|
16429
|
+
command: "mcp.list",
|
|
16430
|
+
description: "List the custom MCP servers this company's chats see (org + company + your own user scope).",
|
|
16431
|
+
args: {}
|
|
16432
|
+
});
|
|
16433
|
+
var listCommand3 = defineCommand121({
|
|
16434
|
+
meta: { name: "list", description: "List custom MCP servers visible to this company's chats." },
|
|
16435
|
+
run: async () => {
|
|
16436
|
+
try {
|
|
16437
|
+
const user = actingUserId();
|
|
16438
|
+
const data = await apiGet(
|
|
16439
|
+
"/api/mcp/custom",
|
|
16440
|
+
user ? { actingUserId: user } : void 0
|
|
16441
|
+
);
|
|
16442
|
+
writeJson({ ok: true, data: data.servers });
|
|
16443
|
+
} catch (err) {
|
|
16444
|
+
fail3(err);
|
|
16445
|
+
}
|
|
16446
|
+
}
|
|
16447
|
+
});
|
|
16448
|
+
registerSchema({
|
|
16449
|
+
command: "mcp.add",
|
|
16450
|
+
description: "Register a custom MCP server. Tools appear as mcp__<name>__* on the next message. URL must be HTTPS. Scope: company (default, all chats) | org (org admin key) | user (only the current sender).",
|
|
16451
|
+
args: {
|
|
16452
|
+
name: { type: "string", description: "Server name \u2192 tools appear as mcp__<name>__*", required: true },
|
|
16453
|
+
url: { type: "string", description: "HTTPS MCP endpoint", required: true },
|
|
16454
|
+
scope: { type: "string", description: "user | company | org (default company)", required: false },
|
|
16455
|
+
header: { type: "string", description: 'Auth header "Key: Value" (repeatable)', required: false }
|
|
16456
|
+
}
|
|
16457
|
+
});
|
|
16458
|
+
var addCommand = defineCommand121({
|
|
16459
|
+
meta: {
|
|
16460
|
+
name: "add",
|
|
16461
|
+
description: `Register a custom MCP server. Tools appear as mcp__<name>__* on the NEXT message.
|
|
16462
|
+
|
|
16463
|
+
Scope: company (default \u2014 every chat in the company) | org (all companies in the org; needs an admin key) | user (only the current message sender).
|
|
16464
|
+
|
|
16465
|
+
Examples:
|
|
16466
|
+
baker mcp add --name weather --url https://mcp.example.com/mcp
|
|
16467
|
+
baker mcp add --name acme --url https://acme.dev/mcp --header "Authorization: Bearer sk-\u2026"
|
|
16468
|
+
baker mcp add --name mine --url https://my.dev/mcp --scope user`
|
|
16469
|
+
},
|
|
16470
|
+
args: {
|
|
16471
|
+
name: { type: "string", description: "Server name (mcp__<name>__*)", required: true },
|
|
16472
|
+
url: { type: "string", description: "HTTPS MCP endpoint", required: true },
|
|
16473
|
+
scope: { type: "string", description: "user | company | org (default company)", required: false },
|
|
16474
|
+
header: { type: "string", description: 'Auth header "Key: Value" (repeatable)', required: false }
|
|
16475
|
+
},
|
|
16476
|
+
run: async ({ args }) => {
|
|
16477
|
+
try {
|
|
16478
|
+
const scope = parseScope(args.scope);
|
|
16479
|
+
const user = actingUserId();
|
|
16480
|
+
const headers = parseHeaders(args.header);
|
|
16481
|
+
const data = await apiPost("/api/mcp/custom", {
|
|
16482
|
+
name: args.name,
|
|
16483
|
+
url: args.url,
|
|
16484
|
+
scope,
|
|
16485
|
+
...user ? { actingUserId: user } : {},
|
|
16486
|
+
...headers ? { headers } : {}
|
|
16487
|
+
});
|
|
16488
|
+
writeJson({ ok: true, data });
|
|
16489
|
+
} catch (err) {
|
|
16490
|
+
fail3(err);
|
|
16491
|
+
}
|
|
16492
|
+
}
|
|
16493
|
+
});
|
|
16494
|
+
registerSchema({
|
|
16495
|
+
command: "mcp.remove",
|
|
16496
|
+
description: "Remove a company custom MCP server by name.",
|
|
16497
|
+
args: { name: { type: "string", description: "Server name to remove", required: true } }
|
|
16498
|
+
});
|
|
16499
|
+
var removeCommand2 = defineCommand121({
|
|
16500
|
+
meta: {
|
|
16501
|
+
name: "remove",
|
|
16502
|
+
description: `Remove a company custom MCP server by name.
|
|
16503
|
+
|
|
16504
|
+
Example:
|
|
16505
|
+
baker mcp remove --name weather`
|
|
16506
|
+
},
|
|
16507
|
+
args: { name: { type: "string", description: "Server name to remove", required: true } },
|
|
16508
|
+
run: async ({ args }) => {
|
|
16509
|
+
try {
|
|
16510
|
+
const user = actingUserId();
|
|
16511
|
+
const data = await apiPost("/api/mcp/custom/remove", {
|
|
16512
|
+
name: args.name,
|
|
16513
|
+
...user ? { actingUserId: user } : {}
|
|
16514
|
+
});
|
|
16515
|
+
writeJson({ ok: true, data });
|
|
16516
|
+
} catch (err) {
|
|
16517
|
+
fail3(err);
|
|
16518
|
+
}
|
|
16519
|
+
}
|
|
16520
|
+
});
|
|
16521
|
+
var mcpCommand = defineCommand121({
|
|
16522
|
+
meta: {
|
|
16523
|
+
name: "mcp",
|
|
16524
|
+
description: `Custom MCP servers for this company \u2014 point the agent at any HTTPS MCP endpoint.
|
|
16525
|
+
|
|
16526
|
+
Tools from a registered server appear as mcp__<name>__* on the next message.
|
|
16527
|
+
Managed here are **company-scoped** servers; user- and org-scoped servers are managed in the dashboard.
|
|
16528
|
+
|
|
16529
|
+
Start here:
|
|
16530
|
+
baker mcp list
|
|
16531
|
+
|
|
16532
|
+
Examples:
|
|
16533
|
+
baker mcp add --name weather --url https://mcp.example.com/mcp
|
|
16534
|
+
baker mcp add --name acme --url https://acme.dev/mcp --header "Authorization: Bearer sk-\u2026"
|
|
16535
|
+
baker mcp remove --name weather`
|
|
16536
|
+
},
|
|
16537
|
+
subCommands: {
|
|
16538
|
+
list: listCommand3,
|
|
16539
|
+
add: addCommand,
|
|
16540
|
+
remove: removeCommand2
|
|
16541
|
+
}
|
|
16542
|
+
});
|
|
16543
|
+
|
|
16392
16544
|
// src/commands/research/index.ts
|
|
16393
|
-
import { defineCommand as
|
|
16545
|
+
import { defineCommand as defineCommand132 } from "citty";
|
|
16394
16546
|
|
|
16395
16547
|
// src/commands/research/advertisers.ts
|
|
16396
|
-
import { defineCommand as
|
|
16548
|
+
import { defineCommand as defineCommand122 } from "citty";
|
|
16397
16549
|
|
|
16398
16550
|
// src/commands/research/output.ts
|
|
16399
16551
|
var RESEARCH_DATA_NOTE = "Estimates based on third-party SERP data \u2014 not exact figures. Use for directional insights, not precise measurement.";
|
|
@@ -16506,7 +16658,7 @@ var FIELDS3 = {
|
|
|
16506
16658
|
etv: "Estimated traffic value (USD)",
|
|
16507
16659
|
visibility: "SERP visibility score (0-1)"
|
|
16508
16660
|
};
|
|
16509
|
-
var advertisersCommand =
|
|
16661
|
+
var advertisersCommand = defineCommand122({
|
|
16510
16662
|
meta: {
|
|
16511
16663
|
name: "advertisers",
|
|
16512
16664
|
description: `Find domains competing for a keyword in Google SERPs.
|
|
@@ -16553,7 +16705,7 @@ Examples:
|
|
|
16553
16705
|
});
|
|
16554
16706
|
|
|
16555
16707
|
// src/commands/research/autocomplete.ts
|
|
16556
|
-
import { defineCommand as
|
|
16708
|
+
import { defineCommand as defineCommand123 } from "citty";
|
|
16557
16709
|
registerSchema({
|
|
16558
16710
|
command: "research.autocomplete",
|
|
16559
16711
|
description: "Get Google Autocomplete suggestions for a seed keyword. Useful for keyword expansion and discovering what people actually search for. IMPORTANT: If --location and --language are omitted, defaults to United States (us) and English (en).",
|
|
@@ -16576,7 +16728,7 @@ registerSchema({
|
|
|
16576
16728
|
var FIELDS4 = {
|
|
16577
16729
|
suggestion: "Autocomplete suggestion from Google"
|
|
16578
16730
|
};
|
|
16579
|
-
var autocompleteCommand =
|
|
16731
|
+
var autocompleteCommand = defineCommand123({
|
|
16580
16732
|
meta: {
|
|
16581
16733
|
name: "autocomplete",
|
|
16582
16734
|
description: `Get Google Autocomplete suggestions for keyword expansion.
|
|
@@ -16622,7 +16774,7 @@ Examples:
|
|
|
16622
16774
|
});
|
|
16623
16775
|
|
|
16624
16776
|
// src/commands/research/countries.ts
|
|
16625
|
-
import { defineCommand as
|
|
16777
|
+
import { defineCommand as defineCommand124 } from "citty";
|
|
16626
16778
|
registerSchema({
|
|
16627
16779
|
command: "research.countries",
|
|
16628
16780
|
description: "List all supported country codes for --location flag in research commands.",
|
|
@@ -16679,7 +16831,7 @@ var FIELDS5 = {
|
|
|
16679
16831
|
code: "Country code to pass as --location",
|
|
16680
16832
|
name: "Country name"
|
|
16681
16833
|
};
|
|
16682
|
-
var countriesCommand =
|
|
16834
|
+
var countriesCommand = defineCommand124({
|
|
16683
16835
|
meta: {
|
|
16684
16836
|
name: "countries",
|
|
16685
16837
|
description: "List all supported country codes for --location flag."
|
|
@@ -16690,7 +16842,7 @@ var countriesCommand = defineCommand123({
|
|
|
16690
16842
|
});
|
|
16691
16843
|
|
|
16692
16844
|
// src/commands/research/intent.ts
|
|
16693
|
-
import { defineCommand as
|
|
16845
|
+
import { defineCommand as defineCommand125 } from "citty";
|
|
16694
16846
|
registerSchema({
|
|
16695
16847
|
command: "research.intent",
|
|
16696
16848
|
description: "Classify Google Search intent for keywords. Determines if someone searching is looking to buy, research, or navigate. IMPORTANT: If --language is omitted, defaults to English (en). The response includes a query_context object showing which language was used.",
|
|
@@ -16713,7 +16865,7 @@ var FIELDS6 = {
|
|
|
16713
16865
|
intent: "Primary Google Search intent: informational, navigational, commercial, transactional",
|
|
16714
16866
|
probability: "Confidence score 0.0-1.0"
|
|
16715
16867
|
};
|
|
16716
|
-
var intentCommand =
|
|
16868
|
+
var intentCommand = defineCommand125({
|
|
16717
16869
|
meta: {
|
|
16718
16870
|
name: "intent",
|
|
16719
16871
|
description: `Classify Google Search intent for keywords. Returns intent type and confidence.
|
|
@@ -16761,7 +16913,7 @@ Examples:
|
|
|
16761
16913
|
});
|
|
16762
16914
|
|
|
16763
16915
|
// src/commands/research/keyword-gap.ts
|
|
16764
|
-
import { defineCommand as
|
|
16916
|
+
import { defineCommand as defineCommand126 } from "citty";
|
|
16765
16917
|
registerSchema({
|
|
16766
16918
|
command: "research.keyword-gap",
|
|
16767
16919
|
description: "Find keywords a competitor ranks for (organic or paid) that you don't. Discovers expansion opportunities. IMPORTANT: If --location and --language are omitted, defaults to United States (us) and English (en). The response includes a query_context object showing which location/language were used.",
|
|
@@ -16790,7 +16942,7 @@ var FIELDS7 = {
|
|
|
16790
16942
|
cpc: "Cost per click USD",
|
|
16791
16943
|
their_position: "Competitor's ranking position"
|
|
16792
16944
|
};
|
|
16793
|
-
var keywordGapCommand =
|
|
16945
|
+
var keywordGapCommand = defineCommand126({
|
|
16794
16946
|
meta: {
|
|
16795
16947
|
name: "keyword-gap",
|
|
16796
16948
|
description: `Find keywords a competitor has that you don't. Supports pagination via --offset.
|
|
@@ -16864,7 +17016,7 @@ Examples:
|
|
|
16864
17016
|
});
|
|
16865
17017
|
|
|
16866
17018
|
// src/commands/research/keywords-for-site.ts
|
|
16867
|
-
import { defineCommand as
|
|
17019
|
+
import { defineCommand as defineCommand127 } from "citty";
|
|
16868
17020
|
registerSchema({
|
|
16869
17021
|
command: "research.keywords-for-site",
|
|
16870
17022
|
description: "Get keywords a competitor targets in Google. Use --type paid to see only paid keywords, --type organic for organic only. IMPORTANT: If --location and --language are omitted, defaults to United States (us) and English (en). The response includes a query_context object showing which location/language were used.",
|
|
@@ -16897,7 +17049,7 @@ var FIELDS8 = {
|
|
|
16897
17049
|
competition: "LOW, MEDIUM, or HIGH",
|
|
16898
17050
|
competition_index: "Competition score 0-100"
|
|
16899
17051
|
};
|
|
16900
|
-
var keywordsForSiteCommand =
|
|
17052
|
+
var keywordsForSiteCommand = defineCommand127({
|
|
16901
17053
|
meta: {
|
|
16902
17054
|
name: "keywords-for-site",
|
|
16903
17055
|
description: `Get keywords a competitor targets in Google. Use --type to filter paid/organic.
|
|
@@ -16950,7 +17102,7 @@ Examples:
|
|
|
16950
17102
|
});
|
|
16951
17103
|
|
|
16952
17104
|
// src/commands/research/languages.ts
|
|
16953
|
-
import { defineCommand as
|
|
17105
|
+
import { defineCommand as defineCommand128 } from "citty";
|
|
16954
17106
|
registerSchema({
|
|
16955
17107
|
command: "research.languages",
|
|
16956
17108
|
description: "List all supported language codes for --language flag in research commands.",
|
|
@@ -16980,7 +17132,7 @@ var FIELDS9 = {
|
|
|
16980
17132
|
code: "Language code to pass as --language",
|
|
16981
17133
|
name: "Language name (also accepted by --language)"
|
|
16982
17134
|
};
|
|
16983
|
-
var languagesCommand2 =
|
|
17135
|
+
var languagesCommand2 = defineCommand128({
|
|
16984
17136
|
meta: {
|
|
16985
17137
|
name: "languages",
|
|
16986
17138
|
description: "List all supported language codes for --language flag."
|
|
@@ -16991,7 +17143,7 @@ var languagesCommand2 = defineCommand127({
|
|
|
16991
17143
|
});
|
|
16992
17144
|
|
|
16993
17145
|
// src/commands/research/lighthouse.ts
|
|
16994
|
-
import { defineCommand as
|
|
17146
|
+
import { defineCommand as defineCommand129 } from "citty";
|
|
16995
17147
|
registerSchema({
|
|
16996
17148
|
command: "research.lighthouse",
|
|
16997
17149
|
description: "Landing page performance audit. Returns metrics that affect Google Ads Quality Score and CPC.",
|
|
@@ -17010,7 +17162,7 @@ var FIELDS10 = {
|
|
|
17010
17162
|
speed_index_ms: "Speed Index in ms (good: < 3400)",
|
|
17011
17163
|
interactive_ms: "Time to Interactive in ms (good: < 3800)"
|
|
17012
17164
|
};
|
|
17013
|
-
var lighthouseCommand =
|
|
17165
|
+
var lighthouseCommand = defineCommand129({
|
|
17014
17166
|
meta: {
|
|
17015
17167
|
name: "lighthouse",
|
|
17016
17168
|
description: `Landing page performance audit. Metrics affecting Google Ads Quality Score.
|
|
@@ -17048,7 +17200,7 @@ Examples:
|
|
|
17048
17200
|
});
|
|
17049
17201
|
|
|
17050
17202
|
// src/commands/research/relevant-pages.ts
|
|
17051
|
-
import { defineCommand as
|
|
17203
|
+
import { defineCommand as defineCommand130 } from "citty";
|
|
17052
17204
|
registerSchema({
|
|
17053
17205
|
command: "research.relevant-pages",
|
|
17054
17206
|
description: "Get the top pages of a competitor domain with organic traffic and ranking data. Shows which pages drive the most traffic. IMPORTANT: If --location and --language are omitted, defaults to United States (us) and English (en).",
|
|
@@ -17074,7 +17226,7 @@ var FIELDS11 = {
|
|
|
17074
17226
|
keywords: "Total organic keywords the page ranks for",
|
|
17075
17227
|
top_10: "Keywords in positions 1-10"
|
|
17076
17228
|
};
|
|
17077
|
-
var relevantPagesCommand =
|
|
17229
|
+
var relevantPagesCommand = defineCommand130({
|
|
17078
17230
|
meta: {
|
|
17079
17231
|
name: "relevant-pages",
|
|
17080
17232
|
description: `Get the top pages of a competitor domain with traffic data.
|
|
@@ -17120,7 +17272,7 @@ Examples:
|
|
|
17120
17272
|
});
|
|
17121
17273
|
|
|
17122
17274
|
// src/commands/research/web.ts
|
|
17123
|
-
import { defineCommand as
|
|
17275
|
+
import { defineCommand as defineCommand131 } from "citty";
|
|
17124
17276
|
registerSchema({
|
|
17125
17277
|
command: "research.web",
|
|
17126
17278
|
description: "Search the web with AI to answer marketing questions \u2014 competitors, ICP, pricing, pain points, market trends. Three depth levels: medium (quick, default), high (thorough), xhigh (exhaustive deep research).",
|
|
@@ -17171,7 +17323,7 @@ async function runDeepResearch(question) {
|
|
|
17171
17323
|
}
|
|
17172
17324
|
throw new Error("Deep research timed out");
|
|
17173
17325
|
}
|
|
17174
|
-
var webCommand =
|
|
17326
|
+
var webCommand = defineCommand131({
|
|
17175
17327
|
meta: {
|
|
17176
17328
|
name: "web",
|
|
17177
17329
|
description: `Search the web with AI to answer any open-ended marketing question. Uses live internet data via Google Search.
|
|
@@ -17231,7 +17383,7 @@ Examples:
|
|
|
17231
17383
|
});
|
|
17232
17384
|
|
|
17233
17385
|
// src/commands/research/index.ts
|
|
17234
|
-
var researchCommand =
|
|
17386
|
+
var researchCommand = defineCommand132({
|
|
17235
17387
|
meta: {
|
|
17236
17388
|
name: "research",
|
|
17237
17389
|
description: `Competitive intelligence and AI-powered research commands.
|
|
@@ -17271,10 +17423,10 @@ Examples:
|
|
|
17271
17423
|
});
|
|
17272
17424
|
|
|
17273
17425
|
// src/commands/scheduled-actions/index.ts
|
|
17274
|
-
import { defineCommand as
|
|
17426
|
+
import { defineCommand as defineCommand139 } from "citty";
|
|
17275
17427
|
|
|
17276
17428
|
// src/commands/scheduled-actions/create.ts
|
|
17277
|
-
import { defineCommand as
|
|
17429
|
+
import { defineCommand as defineCommand133 } from "citty";
|
|
17278
17430
|
|
|
17279
17431
|
// src/commands/scheduled-actions/shared.ts
|
|
17280
17432
|
var TEMP_SCHEDULED_ACTION_PREFIX = "temp_sched_";
|
|
@@ -17389,7 +17541,7 @@ registerSchema({
|
|
|
17389
17541
|
prompt: { type: "string", description: "Additional prompt instructions for the spawned agent", required: false }
|
|
17390
17542
|
}
|
|
17391
17543
|
});
|
|
17392
|
-
var createCommand2 =
|
|
17544
|
+
var createCommand2 = defineCommand133({
|
|
17393
17545
|
meta: {
|
|
17394
17546
|
name: "create",
|
|
17395
17547
|
description: 'Stage a scheduled action. Example: baker scheduled-actions create --name "Weekly report" --description "..." --cron "0 9 * * MON"'
|
|
@@ -17438,7 +17590,7 @@ var createCommand2 = defineCommand132({
|
|
|
17438
17590
|
});
|
|
17439
17591
|
|
|
17440
17592
|
// src/commands/scheduled-actions/delete.ts
|
|
17441
|
-
import { defineCommand as
|
|
17593
|
+
import { defineCommand as defineCommand134 } from "citty";
|
|
17442
17594
|
registerSchema({
|
|
17443
17595
|
command: "scheduled-actions.delete",
|
|
17444
17596
|
description: "Stage deletion of a published scheduled action or cancellation of a temp_sched_* draft creation.",
|
|
@@ -17446,7 +17598,7 @@ registerSchema({
|
|
|
17446
17598
|
id: { type: "string", description: "Published scheduled action ID or temp_sched_* draft ID", required: true }
|
|
17447
17599
|
}
|
|
17448
17600
|
});
|
|
17449
|
-
var deleteCommand2 =
|
|
17601
|
+
var deleteCommand2 = defineCommand134({
|
|
17450
17602
|
meta: {
|
|
17451
17603
|
name: "delete",
|
|
17452
17604
|
description: "Stage scheduled action deletion. Example: baker scheduled-actions delete <id-or-temp_sched_id>"
|
|
@@ -17475,7 +17627,7 @@ var deleteCommand2 = defineCommand133({
|
|
|
17475
17627
|
});
|
|
17476
17628
|
|
|
17477
17629
|
// src/commands/scheduled-actions/get.ts
|
|
17478
|
-
import { defineCommand as
|
|
17630
|
+
import { defineCommand as defineCommand135 } from "citty";
|
|
17479
17631
|
registerSchema({
|
|
17480
17632
|
command: "scheduled-actions.get",
|
|
17481
17633
|
description: "Get a published scheduled action or a temp_sched_* draft-created scheduled action.",
|
|
@@ -17483,7 +17635,7 @@ registerSchema({
|
|
|
17483
17635
|
id: { type: "string", description: "Published scheduled action ID or temp_sched_* draft ID", required: true }
|
|
17484
17636
|
}
|
|
17485
17637
|
});
|
|
17486
|
-
var getCommand3 =
|
|
17638
|
+
var getCommand3 = defineCommand135({
|
|
17487
17639
|
meta: {
|
|
17488
17640
|
name: "get",
|
|
17489
17641
|
description: "Get a scheduled action. Example: baker scheduled-actions get <id-or-temp_sched_id>"
|
|
@@ -17520,13 +17672,13 @@ var getCommand3 = defineCommand134({
|
|
|
17520
17672
|
});
|
|
17521
17673
|
|
|
17522
17674
|
// src/commands/scheduled-actions/list.ts
|
|
17523
|
-
import { defineCommand as
|
|
17675
|
+
import { defineCommand as defineCommand136 } from "citty";
|
|
17524
17676
|
registerSchema({
|
|
17525
17677
|
command: "scheduled-actions.list",
|
|
17526
17678
|
description: "List published scheduled actions. Includes draft state when BAKER_CHAT_ID is set.",
|
|
17527
17679
|
args: {}
|
|
17528
17680
|
});
|
|
17529
|
-
var
|
|
17681
|
+
var listCommand4 = defineCommand136({
|
|
17530
17682
|
meta: {
|
|
17531
17683
|
name: "list",
|
|
17532
17684
|
description: "List scheduled actions. Includes staged draft ops when BAKER_CHAT_ID is set."
|
|
@@ -17547,7 +17699,7 @@ var listCommand3 = defineCommand135({
|
|
|
17547
17699
|
});
|
|
17548
17700
|
|
|
17549
17701
|
// src/commands/scheduled-actions/trigger.ts
|
|
17550
|
-
import { defineCommand as
|
|
17702
|
+
import { defineCommand as defineCommand137 } from "citty";
|
|
17551
17703
|
registerSchema({
|
|
17552
17704
|
command: "scheduled-actions.trigger",
|
|
17553
17705
|
description: "Immediately trigger a published scheduled action. Does not require BAKER_CHAT_ID and rejects temp_sched_* IDs.",
|
|
@@ -17555,7 +17707,7 @@ registerSchema({
|
|
|
17555
17707
|
id: { type: "string", description: "Published scheduled action ID", required: true }
|
|
17556
17708
|
}
|
|
17557
17709
|
});
|
|
17558
|
-
var triggerCommand =
|
|
17710
|
+
var triggerCommand = defineCommand137({
|
|
17559
17711
|
meta: {
|
|
17560
17712
|
name: "trigger",
|
|
17561
17713
|
description: "Immediately trigger a published scheduled action. Example: baker scheduled-actions trigger <id>"
|
|
@@ -17592,7 +17744,7 @@ var triggerCommand = defineCommand136({
|
|
|
17592
17744
|
});
|
|
17593
17745
|
|
|
17594
17746
|
// src/commands/scheduled-actions/update.ts
|
|
17595
|
-
import { defineCommand as
|
|
17747
|
+
import { defineCommand as defineCommand138 } from "citty";
|
|
17596
17748
|
registerSchema({
|
|
17597
17749
|
command: "scheduled-actions.update",
|
|
17598
17750
|
description: "Stage an update to a published scheduled action or temp_sched_* draft-created scheduled action.",
|
|
@@ -17617,7 +17769,7 @@ registerSchema({
|
|
|
17617
17769
|
prompt: { type: "string", description: "Replacement additional spawned-agent instructions", required: false }
|
|
17618
17770
|
}
|
|
17619
17771
|
});
|
|
17620
|
-
var updateCommand2 =
|
|
17772
|
+
var updateCommand2 = defineCommand138({
|
|
17621
17773
|
meta: {
|
|
17622
17774
|
name: "update",
|
|
17623
17775
|
description: "Stage a scheduled action update. Example: baker scheduled-actions update <id> --enabled false"
|
|
@@ -17688,7 +17840,7 @@ var updateCommand2 = defineCommand137({
|
|
|
17688
17840
|
});
|
|
17689
17841
|
|
|
17690
17842
|
// src/commands/scheduled-actions/index.ts
|
|
17691
|
-
var scheduledActionsCommand =
|
|
17843
|
+
var scheduledActionsCommand = defineCommand139({
|
|
17692
17844
|
meta: {
|
|
17693
17845
|
name: "scheduled-actions",
|
|
17694
17846
|
description: `Manage Scheduled Actions. Subcommands: list, get, create, update, delete, trigger.
|
|
@@ -17704,7 +17856,7 @@ Examples:
|
|
|
17704
17856
|
baker scheduled-actions trigger <id>`
|
|
17705
17857
|
},
|
|
17706
17858
|
subCommands: {
|
|
17707
|
-
list:
|
|
17859
|
+
list: listCommand4,
|
|
17708
17860
|
get: getCommand3,
|
|
17709
17861
|
create: createCommand2,
|
|
17710
17862
|
update: updateCommand2,
|
|
@@ -17714,8 +17866,8 @@ Examples:
|
|
|
17714
17866
|
});
|
|
17715
17867
|
|
|
17716
17868
|
// src/commands/schema.ts
|
|
17717
|
-
import { defineCommand as
|
|
17718
|
-
var schemaCommand =
|
|
17869
|
+
import { defineCommand as defineCommand140 } from "citty";
|
|
17870
|
+
var schemaCommand = defineCommand140({
|
|
17719
17871
|
meta: {
|
|
17720
17872
|
name: "schema",
|
|
17721
17873
|
description: "Inspect command argument schemas (for AI agent introspection). Lists all commands if no argument given. Example: baker schema images.search"
|
|
@@ -17751,10 +17903,10 @@ var schemaCommand = defineCommand139({
|
|
|
17751
17903
|
});
|
|
17752
17904
|
|
|
17753
17905
|
// src/commands/testimonials/index.ts
|
|
17754
|
-
import { defineCommand as
|
|
17906
|
+
import { defineCommand as defineCommand144 } from "citty";
|
|
17755
17907
|
|
|
17756
17908
|
// src/commands/testimonials/get.ts
|
|
17757
|
-
import { defineCommand as
|
|
17909
|
+
import { defineCommand as defineCommand141 } from "citty";
|
|
17758
17910
|
registerSchema({
|
|
17759
17911
|
command: "testimonials.get",
|
|
17760
17912
|
description: "Get a single testimonial by ID",
|
|
@@ -17762,7 +17914,7 @@ registerSchema({
|
|
|
17762
17914
|
id: { type: "string", description: "Testimonial ID", required: true }
|
|
17763
17915
|
}
|
|
17764
17916
|
});
|
|
17765
|
-
var getCommand4 =
|
|
17917
|
+
var getCommand4 = defineCommand141({
|
|
17766
17918
|
meta: { name: "get", description: "Get a single testimonial by ID. Example: baker testimonials get j571abc123" },
|
|
17767
17919
|
args: {
|
|
17768
17920
|
id: { type: "positional", description: "Testimonial ID", required: false },
|
|
@@ -17799,7 +17951,7 @@ var getCommand4 = defineCommand140({
|
|
|
17799
17951
|
});
|
|
17800
17952
|
|
|
17801
17953
|
// src/commands/testimonials/list.ts
|
|
17802
|
-
import { defineCommand as
|
|
17954
|
+
import { defineCommand as defineCommand142 } from "citty";
|
|
17803
17955
|
registerSchema({
|
|
17804
17956
|
command: "testimonials.list",
|
|
17805
17957
|
description: "List testimonials with optional filters.",
|
|
@@ -17829,7 +17981,7 @@ registerSchema({
|
|
|
17829
17981
|
limit: { type: "number", description: "Max results (default 50)", required: false, default: 50 }
|
|
17830
17982
|
}
|
|
17831
17983
|
});
|
|
17832
|
-
var
|
|
17984
|
+
var listCommand5 = defineCommand142({
|
|
17833
17985
|
meta: {
|
|
17834
17986
|
name: "list",
|
|
17835
17987
|
description: "List testimonials with optional filters. Example: baker testimonials list --source google --sentiment positive"
|
|
@@ -17878,7 +18030,7 @@ var listCommand4 = defineCommand141({
|
|
|
17878
18030
|
});
|
|
17879
18031
|
|
|
17880
18032
|
// src/commands/testimonials/search.ts
|
|
17881
|
-
import { defineCommand as
|
|
18033
|
+
import { defineCommand as defineCommand143 } from "citty";
|
|
17882
18034
|
registerSchema({
|
|
17883
18035
|
command: "testimonials.search",
|
|
17884
18036
|
description: "Search testimonials by text query. Uses hybrid BM25 + vector + reranking.",
|
|
@@ -17909,7 +18061,7 @@ registerSchema({
|
|
|
17909
18061
|
tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
|
|
17910
18062
|
}
|
|
17911
18063
|
});
|
|
17912
|
-
var searchCommand2 =
|
|
18064
|
+
var searchCommand2 = defineCommand143({
|
|
17913
18065
|
meta: {
|
|
17914
18066
|
name: "search",
|
|
17915
18067
|
description: "Semantic search testimonials by text query. Uses hybrid BM25 + vector + reranking. Example: baker testimonials search 'great service' --rating-min 4"
|
|
@@ -17983,7 +18135,7 @@ var searchCommand2 = defineCommand142({
|
|
|
17983
18135
|
var tagsCommand3 = makeTagsCommand("testimonials", "testimonial", "/api/testimonials/tags");
|
|
17984
18136
|
|
|
17985
18137
|
// src/commands/testimonials/index.ts
|
|
17986
|
-
var testimonialsCommand =
|
|
18138
|
+
var testimonialsCommand = defineCommand144({
|
|
17987
18139
|
meta: {
|
|
17988
18140
|
name: "testimonials",
|
|
17989
18141
|
description: `Find and browse testimonials in Baker. Subcommands: search, get, list, tags.
|
|
@@ -17998,16 +18150,16 @@ Examples:
|
|
|
17998
18150
|
subCommands: {
|
|
17999
18151
|
get: getCommand4,
|
|
18000
18152
|
search: searchCommand2,
|
|
18001
|
-
list:
|
|
18153
|
+
list: listCommand5,
|
|
18002
18154
|
tags: tagsCommand3
|
|
18003
18155
|
}
|
|
18004
18156
|
});
|
|
18005
18157
|
|
|
18006
18158
|
// src/commands/videos/index.ts
|
|
18007
|
-
import { defineCommand as
|
|
18159
|
+
import { defineCommand as defineCommand149 } from "citty";
|
|
18008
18160
|
|
|
18009
18161
|
// src/commands/videos/delete.ts
|
|
18010
|
-
import { defineCommand as
|
|
18162
|
+
import { defineCommand as defineCommand145 } from "citty";
|
|
18011
18163
|
registerSchema({
|
|
18012
18164
|
command: "videos.delete",
|
|
18013
18165
|
description: "Delete a video by ID",
|
|
@@ -18021,7 +18173,7 @@ registerSchema({
|
|
|
18021
18173
|
}
|
|
18022
18174
|
}
|
|
18023
18175
|
});
|
|
18024
|
-
var deleteCommand3 =
|
|
18176
|
+
var deleteCommand3 = defineCommand145({
|
|
18025
18177
|
meta: {
|
|
18026
18178
|
name: "delete",
|
|
18027
18179
|
description: "Delete a video by ID. Use --dry-run to preview. Example: baker videos delete j571abc123 --dry-run"
|
|
@@ -18062,7 +18214,7 @@ var deleteCommand3 = defineCommand144({
|
|
|
18062
18214
|
});
|
|
18063
18215
|
|
|
18064
18216
|
// src/commands/videos/get.ts
|
|
18065
|
-
import { defineCommand as
|
|
18217
|
+
import { defineCommand as defineCommand146 } from "citty";
|
|
18066
18218
|
registerSchema({
|
|
18067
18219
|
command: "videos.get",
|
|
18068
18220
|
description: "Get a single video by ID",
|
|
@@ -18070,7 +18222,7 @@ registerSchema({
|
|
|
18070
18222
|
id: { type: "string", description: "Video ID", required: true }
|
|
18071
18223
|
}
|
|
18072
18224
|
});
|
|
18073
|
-
var getCommand5 =
|
|
18225
|
+
var getCommand5 = defineCommand146({
|
|
18074
18226
|
meta: { name: "get", description: "Get a single video by ID. Example: baker videos get j571abc123" },
|
|
18075
18227
|
args: {
|
|
18076
18228
|
id: { type: "positional", description: "Video ID", required: false },
|
|
@@ -18107,7 +18259,7 @@ var getCommand5 = defineCommand145({
|
|
|
18107
18259
|
});
|
|
18108
18260
|
|
|
18109
18261
|
// src/commands/videos/search.ts
|
|
18110
|
-
import { defineCommand as
|
|
18262
|
+
import { defineCommand as defineCommand147 } from "citty";
|
|
18111
18263
|
registerSchema({
|
|
18112
18264
|
command: "videos.search",
|
|
18113
18265
|
description: "Search videos by text query. Only returns ready videos.",
|
|
@@ -18117,7 +18269,7 @@ registerSchema({
|
|
|
18117
18269
|
tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
|
|
18118
18270
|
}
|
|
18119
18271
|
});
|
|
18120
|
-
var searchCommand3 =
|
|
18272
|
+
var searchCommand3 = defineCommand147({
|
|
18121
18273
|
meta: {
|
|
18122
18274
|
name: "search",
|
|
18123
18275
|
description: "Semantic search videos by text query. Uses hybrid BM25 + vector + reranking. Example: baker videos search 'product demo' --tags tutorial"
|
|
@@ -18169,7 +18321,7 @@ var tagsCommand4 = makeTagsCommand("videos", "video", "/api/videos/tags");
|
|
|
18169
18321
|
// src/commands/videos/upload.ts
|
|
18170
18322
|
import { readFile as readFile12, stat as stat3 } from "fs/promises";
|
|
18171
18323
|
import { extname as extname3 } from "path";
|
|
18172
|
-
import { defineCommand as
|
|
18324
|
+
import { defineCommand as defineCommand148 } from "citty";
|
|
18173
18325
|
var MIME_MAP = {
|
|
18174
18326
|
".mp4": "video/mp4",
|
|
18175
18327
|
".mov": "video/quicktime",
|
|
@@ -18203,7 +18355,7 @@ function detectContentType(filePath) {
|
|
|
18203
18355
|
}
|
|
18204
18356
|
return mime;
|
|
18205
18357
|
}
|
|
18206
|
-
var uploadCommand2 =
|
|
18358
|
+
var uploadCommand2 = defineCommand148({
|
|
18207
18359
|
meta: {
|
|
18208
18360
|
name: "upload",
|
|
18209
18361
|
description: "Upload a video file to Baker via Mux direct upload. Auto-detects content type. Example: baker videos upload ./demo.mp4"
|
|
@@ -18257,7 +18409,7 @@ var uploadCommand2 = defineCommand147({
|
|
|
18257
18409
|
});
|
|
18258
18410
|
|
|
18259
18411
|
// src/commands/videos/index.ts
|
|
18260
|
-
var videosCommand =
|
|
18412
|
+
var videosCommand = defineCommand149({
|
|
18261
18413
|
meta: {
|
|
18262
18414
|
name: "videos",
|
|
18263
18415
|
description: `Find and manage videos in Baker. Subcommands: search, get, upload, delete, tags.
|
|
@@ -18280,10 +18432,10 @@ Examples:
|
|
|
18280
18432
|
});
|
|
18281
18433
|
|
|
18282
18434
|
// src/commands/winning-ads/index.ts
|
|
18283
|
-
import { defineCommand as
|
|
18435
|
+
import { defineCommand as defineCommand152 } from "citty";
|
|
18284
18436
|
|
|
18285
18437
|
// src/commands/winning-ads/advertisers.ts
|
|
18286
|
-
import { defineCommand as
|
|
18438
|
+
import { defineCommand as defineCommand150 } from "citty";
|
|
18287
18439
|
registerSchema({
|
|
18288
18440
|
command: "winning-ads.advertisers",
|
|
18289
18441
|
description: "Resolve a brand name to advertiser_id(s) in the ad-dna corpus \u2014 to find your OWN advertiser (to --exclude-advertiser) or a competitor (to --advertiser-id).",
|
|
@@ -18296,7 +18448,7 @@ registerSchema({
|
|
|
18296
18448
|
function identity(record) {
|
|
18297
18449
|
return record;
|
|
18298
18450
|
}
|
|
18299
|
-
var advertisersCommand2 =
|
|
18451
|
+
var advertisersCommand2 = defineCommand150({
|
|
18300
18452
|
meta: {
|
|
18301
18453
|
name: "advertisers",
|
|
18302
18454
|
description: 'Resolve a brand name to advertiser_id(s). Use it to find your own advertiser for --exclude-advertiser, or a competitor for --advertiser-id. Example: baker winning-ads advertisers "Deel" --output md'
|
|
@@ -18347,7 +18499,7 @@ var advertisersCommand2 = defineCommand149({
|
|
|
18347
18499
|
});
|
|
18348
18500
|
|
|
18349
18501
|
// src/commands/winning-ads/search.ts
|
|
18350
|
-
import { defineCommand as
|
|
18502
|
+
import { defineCommand as defineCommand151 } from "citty";
|
|
18351
18503
|
registerSchema({
|
|
18352
18504
|
command: "winning-ads.search",
|
|
18353
18505
|
description: "Search the ad-dna corpus of scored winning ads. Returns a lean shortlist (advertiser, summary, scores, media_url) to pick a reference to reproduce.",
|
|
@@ -18455,7 +18607,7 @@ function buildSearchBody(args) {
|
|
|
18455
18607
|
}
|
|
18456
18608
|
return body;
|
|
18457
18609
|
}
|
|
18458
|
-
var searchCommand4 =
|
|
18610
|
+
var searchCommand4 = defineCommand151({
|
|
18459
18611
|
meta: {
|
|
18460
18612
|
name: "search",
|
|
18461
18613
|
description: "Search winning reference ads. Example: baker winning-ads search 'B2B SaaS before/after AI automation' --platform meta --format static --winner-category winner --exclude-advertiser adv_123 --output md"
|
|
@@ -18567,7 +18719,7 @@ var searchCommand4 = defineCommand150({
|
|
|
18567
18719
|
});
|
|
18568
18720
|
|
|
18569
18721
|
// src/commands/winning-ads/index.ts
|
|
18570
|
-
var winningAdsCommand =
|
|
18722
|
+
var winningAdsCommand = defineCommand152({
|
|
18571
18723
|
meta: {
|
|
18572
18724
|
name: "winning-ads",
|
|
18573
18725
|
description: `Search the ad-dna corpus of scored "winning" ads for reference creatives to reproduce. Proxied through the Baker backend (BAKER_API_KEY) \u2014 no separate token needed.
|
|
@@ -18607,7 +18759,7 @@ function getCliVersion() {
|
|
|
18607
18759
|
}
|
|
18608
18760
|
|
|
18609
18761
|
// src/cli.ts
|
|
18610
|
-
var main =
|
|
18762
|
+
var main = defineCommand153({
|
|
18611
18763
|
meta: {
|
|
18612
18764
|
name: "baker",
|
|
18613
18765
|
version: getCliVersion(),
|
|
@@ -18632,6 +18784,7 @@ Introspection: Run 'baker schema <command>' to inspect argument schemas.`
|
|
|
18632
18784
|
testimonials: testimonialsCommand,
|
|
18633
18785
|
canvas: canvasCommand,
|
|
18634
18786
|
"winning-ads": winningAdsCommand,
|
|
18787
|
+
mcp: mcpCommand,
|
|
18635
18788
|
schema: schemaCommand
|
|
18636
18789
|
}
|
|
18637
18790
|
});
|