@koda-sl/baker-cli 0.238.0-dev.43aacdb9e → 0.238.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/README.md +4 -36
- package/dist/{chunk-CMPAHYLB.js → chunk-EKLAHWSF.js} +4 -4
- package/dist/chunk-EKLAHWSF.js.map +1 -0
- package/dist/cli.js +464 -655
- package/dist/cli.js.map +1 -1
- package/dist/engine/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-CMPAHYLB.js.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
ulid,
|
|
59
59
|
validateCanvasDeep,
|
|
60
60
|
ytDlpBlockSignal
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-EKLAHWSF.js";
|
|
62
62
|
import {
|
|
63
63
|
csvOrJson,
|
|
64
64
|
daysAgoIso,
|
|
@@ -108,7 +108,7 @@ import {
|
|
|
108
108
|
} from "./chunk-DZUVUGEP.js";
|
|
109
109
|
|
|
110
110
|
// src/cli.ts
|
|
111
|
-
import { defineCommand as
|
|
111
|
+
import { defineCommand as defineCommand227, runMain } from "citty";
|
|
112
112
|
|
|
113
113
|
// src/cache-flag.ts
|
|
114
114
|
var NO_CACHE_ARG = {
|
|
@@ -3920,35 +3920,10 @@ var capabilitySurfaceReportSchema = z9.object({
|
|
|
3920
3920
|
/** Where to look next: `baker ads google`, `baker ga4`, … */
|
|
3921
3921
|
commands: z9.string()
|
|
3922
3922
|
});
|
|
3923
|
-
var capabilityToolSchema = z9.object({
|
|
3924
|
-
/** `microsoft_clarity`, `hubspot`, or the name the user gave a custom server. */
|
|
3925
|
-
key: z9.string(),
|
|
3926
|
-
label: z9.string(),
|
|
3927
|
-
/** `mcp` — tools in the agent's own list. `platform` — signed in, read through the CLI. */
|
|
3928
|
-
kind: z9.enum(["mcp", "platform"]),
|
|
3929
|
-
/** How to actually reach it, in one phrase the agent can act on. */
|
|
3930
|
-
reach: z9.string(),
|
|
3931
|
-
/**
|
|
3932
|
-
* Whether it can be used right now.
|
|
3933
|
-
*
|
|
3934
|
-
* A connection that exists and is expired is worse than one that is absent:
|
|
3935
|
-
* it reads as available and fails at the moment it is needed, which on an
|
|
3936
|
-
* unattended run is a report with a hole in it and no explanation.
|
|
3937
|
-
*/
|
|
3938
|
-
ready: z9.boolean(),
|
|
3939
|
-
/** Why it is not ready, or what it is for. Absent when neither needs saying. */
|
|
3940
|
-
note: z9.string().optional()
|
|
3941
|
-
});
|
|
3942
3923
|
var capabilitiesResponseSchema = z9.object({
|
|
3943
3924
|
ok: z9.literal(true),
|
|
3944
3925
|
data: z9.object({
|
|
3945
|
-
surfaces: z9.array(capabilitySurfaceReportSchema)
|
|
3946
|
-
/**
|
|
3947
|
-
* Everything else this company can reach. Shared connections only —
|
|
3948
|
-
* a teammate's private per-user connection belongs to whoever started the
|
|
3949
|
-
* session and is visible in the agent's own tool list, not here.
|
|
3950
|
-
*/
|
|
3951
|
-
tools: z9.array(capabilityToolSchema)
|
|
3926
|
+
surfaces: z9.array(capabilitySurfaceReportSchema)
|
|
3952
3927
|
})
|
|
3953
3928
|
});
|
|
3954
3929
|
|
|
@@ -3995,8 +3970,6 @@ var chatChangeTypeSchema = z10.enum([
|
|
|
3995
3970
|
// what the edge captures and one held until Publish would not measure the
|
|
3996
3971
|
// campaign it was written for.
|
|
3997
3972
|
"analytics-mapping",
|
|
3998
|
-
// An A/B test between a landing and its alternative. Staged, not immediate.
|
|
3999
|
-
"experiment",
|
|
4000
3973
|
"briefs"
|
|
4001
3974
|
]);
|
|
4002
3975
|
var chatChangeActionSchema = z10.enum(["created", "updated", "deleted"]);
|
|
@@ -11929,19 +11902,22 @@ var analyticsBeaconPayloadSchema = z23.object({
|
|
|
11929
11902
|
});
|
|
11930
11903
|
|
|
11931
11904
|
// ../api/src/analytics/trackingTemplate.ts
|
|
11932
|
-
|
|
11933
|
-
|
|
11934
|
-
|
|
11935
|
-
|
|
11936
|
-
|
|
11937
|
-
|
|
11938
|
-
|
|
11939
|
-
|
|
11940
|
-
device: "device",
|
|
11941
|
-
product_id: "product_id",
|
|
11942
|
-
merchant_id: "product_id",
|
|
11943
|
-
product_partition_id: "product_id"
|
|
11905
|
+
function placeholderKey(raw) {
|
|
11906
|
+
return raw.replace(/[{}]/g, "").replace(/^_+|_+$/g, "").trim().toLowerCase();
|
|
11907
|
+
}
|
|
11908
|
+
var EXTRA_PLACEHOLDER_ROLES = {
|
|
11909
|
+
google: {
|
|
11910
|
+
merchant_id: "product_id",
|
|
11911
|
+
product_partition_id: "product_id"
|
|
11912
|
+
}
|
|
11944
11913
|
};
|
|
11914
|
+
function placeholderRoles(platform) {
|
|
11915
|
+
const roles = {};
|
|
11916
|
+
for (const dimension of AD_PLATFORM_DEFINITIONS[platform].dimensions) {
|
|
11917
|
+
roles[placeholderKey(dimension.macro)] = dimension.role;
|
|
11918
|
+
}
|
|
11919
|
+
return { ...roles, ...EXTRA_PLACEHOLDER_ROLES[platform] ?? {} };
|
|
11920
|
+
}
|
|
11945
11921
|
function paramsFromTemplate(template) {
|
|
11946
11922
|
const start = template.indexOf("?");
|
|
11947
11923
|
const query = start === -1 ? template : template.slice(start + 1);
|
|
@@ -11957,13 +11933,13 @@ function paramsFromTemplate(template) {
|
|
|
11957
11933
|
}
|
|
11958
11934
|
function proposeMappingFromTemplate(template, platform) {
|
|
11959
11935
|
const builtIn = builtinAdParamMapping(platform);
|
|
11936
|
+
const vocabulary = placeholderRoles(platform);
|
|
11960
11937
|
const proposed = {};
|
|
11961
11938
|
const unexplained = [];
|
|
11962
11939
|
for (const param of paramsFromTemplate(template)) {
|
|
11963
11940
|
if (RESERVED_PARAM_NAMES.includes(param.name)) continue;
|
|
11964
11941
|
if (param.name in builtIn) continue;
|
|
11965
|
-
const
|
|
11966
|
-
const role = VALUETRACK_ROLES[placeholder];
|
|
11942
|
+
const role = vocabulary[placeholderKey(param.value)];
|
|
11967
11943
|
if (role) {
|
|
11968
11944
|
proposed[param.name] = role;
|
|
11969
11945
|
continue;
|
|
@@ -13178,10 +13154,74 @@ var analyticsMappingResponseSchema = z24.object({
|
|
|
13178
13154
|
* turn configuring `keyword` to mean keyword.
|
|
13179
13155
|
*/
|
|
13180
13156
|
builtIn: z24.array(z24.string()),
|
|
13157
|
+
/**
|
|
13158
|
+
* What the client's own ad account says about each parameter just staged.
|
|
13159
|
+
*
|
|
13160
|
+
* Present only when a Session staged a `set` on a platform whose tracking
|
|
13161
|
+
* configuration Baker can read. `contradicted` is the entry worth stopping
|
|
13162
|
+
* for: the account fills that name with a placeholder meaning something
|
|
13163
|
+
* else, so the answer just given would produce a report that is wrong and
|
|
13164
|
+
* looks entirely plausible.
|
|
13165
|
+
*/
|
|
13166
|
+
evidence: z24.record(
|
|
13167
|
+
z24.string(),
|
|
13168
|
+
z24.object({
|
|
13169
|
+
status: z24.enum(["confirmed", "contradicted", "unseen", "not_read"]),
|
|
13170
|
+
macro: z24.string().optional(),
|
|
13171
|
+
suggestedRole: adParamRoleSchema.optional(),
|
|
13172
|
+
source: z24.string().optional(),
|
|
13173
|
+
reason: z24.string().optional()
|
|
13174
|
+
})
|
|
13175
|
+
).optional(),
|
|
13181
13176
|
updatedAt: z24.number().nullable()
|
|
13182
13177
|
}),
|
|
13183
13178
|
hints: z24.array(z24.string()).optional()
|
|
13184
13179
|
});
|
|
13180
|
+
var analyticsTrackingRequestSchema = z24.object({
|
|
13181
|
+
platform: z24.enum(AD_PLATFORMS).optional(),
|
|
13182
|
+
days: z24.number().int().min(1).max(365).optional()
|
|
13183
|
+
});
|
|
13184
|
+
var trackingDimensionSchema = z24.object({
|
|
13185
|
+
role: adParamRoleSchema,
|
|
13186
|
+
/** The platform's own macro for it — what goes in the URL. */
|
|
13187
|
+
macro: z24.string(),
|
|
13188
|
+
/** The account's own spelling where it has one, else the canonical name. */
|
|
13189
|
+
name: z24.string(),
|
|
13190
|
+
/**
|
|
13191
|
+
* What has to happen for this dimension to reach a report.
|
|
13192
|
+
*
|
|
13193
|
+
* Four states rather than a boolean, because two of them need opposite fixes
|
|
13194
|
+
* and one of them is not a finding at all. `unmapped` is one
|
|
13195
|
+
* `baker analytics map` call and repairs the history with it; `missing` is a
|
|
13196
|
+
* change to the ad account and everything before it stays unattributable;
|
|
13197
|
+
* `unknown` means no visit arrived and the account could not be read, which
|
|
13198
|
+
* must never be reported as untagged.
|
|
13199
|
+
*/
|
|
13200
|
+
state: z24.enum(["covered", "unmapped", "missing", "unknown"]),
|
|
13201
|
+
evidence: z24.string().optional(),
|
|
13202
|
+
note: z24.string().optional()
|
|
13203
|
+
});
|
|
13204
|
+
var analyticsTrackingPlatformSchema = z24.object({
|
|
13205
|
+
platform: z24.enum(AD_PLATFORMS),
|
|
13206
|
+
label: z24.string(),
|
|
13207
|
+
sessions: z24.number(),
|
|
13208
|
+
/** Whether the ad account itself could be read, and why not when it could not. */
|
|
13209
|
+
account: z24.object({ read: z24.boolean(), templates: z24.number(), reason: z24.string().optional() }),
|
|
13210
|
+
dimensions: z24.array(trackingDimensionSchema),
|
|
13211
|
+
/** Names the URLs already carry that Baker does not read yet. */
|
|
13212
|
+
unmapped: z24.record(z24.string(), adParamRoleSchema),
|
|
13213
|
+
mapCommand: z24.string(),
|
|
13214
|
+
unexplained: z24.array(z24.object({ name: z24.string(), value: z24.string() })),
|
|
13215
|
+
/** The pairs to append to the account's tagging, or `""`. */
|
|
13216
|
+
suffix: z24.string(),
|
|
13217
|
+
whereItGoes: z24.string(),
|
|
13218
|
+
fix: z24.string().optional()
|
|
13219
|
+
});
|
|
13220
|
+
var analyticsTrackingResponseSchema = z24.object({
|
|
13221
|
+
ok: z24.literal(true),
|
|
13222
|
+
data: z24.object({ days: z24.number(), platforms: z24.array(analyticsTrackingPlatformSchema) }),
|
|
13223
|
+
hints: z24.array(z24.string()).optional()
|
|
13224
|
+
});
|
|
13185
13225
|
var submissionRecordRequestSchema = z24.object({
|
|
13186
13226
|
/** Injected by the Worker from the host or the site key. Never from the page. */
|
|
13187
13227
|
companyId: z24.string().min(1),
|
|
@@ -23890,13 +23930,13 @@ var mapCommand = (() => {
|
|
|
23890
23930
|
};
|
|
23891
23931
|
registerSchema({
|
|
23892
23932
|
command: "analytics.map",
|
|
23893
|
-
description: "
|
|
23933
|
+
description: "Stage how this company's campaign URLs spell each ad dimension, applied on publish",
|
|
23894
23934
|
args
|
|
23895
23935
|
});
|
|
23896
23936
|
return defineCommand88({
|
|
23897
23937
|
meta: {
|
|
23898
23938
|
name: "map",
|
|
23899
|
-
description: "Teach Baker how this company's campaign URLs spell each ad dimension on one platform \u2014 `--platform google --set kw=keyword`. Run it with no flags to see the whole mapping. Mappings are always per platform, because the platforms do not describe the same world: `builtIn` in the response is what that platform is already understood to send, so you do not spend a turn mapping `keyword` to keyword.
|
|
23939
|
+
description: "Teach Baker how this company's campaign URLs spell each ad dimension on one platform \u2014 `--platform google --set kw=keyword`. Run it with no flags to see the whole mapping, including what this chat has already staged. STAGED, not applied: the answers are reviewed in the chat and take effect when it is published, so nothing you map here changes a report or what the edge stores until then; discarding the chat takes them all back. Mappings are always per platform, because the platforms do not describe the same world: `builtIn` in the response is what that platform is already understood to send, so you do not spend a turn mapping `keyword` to keyword. Each --set is checked against the client's OWN ad account \u2014 `evidence` in the response says whether their tracking template really fills that name with what you claimed. Read it: `contradicted` means the account disagrees, and mapping it your way would produce a report that is wrong and looks plausible. Renaming a parameter Baker already captured fixes the history too, because roles are applied when a report is read; naming one it never read only starts collecting it from the publish onward, since no value was stored. You do NOT need to have seen a parameter to map it: a name nobody has sent yet is a valid --set, which is how a tracking template gets configured before the campaign that uses it runs. To drop an answer, --remove takes it back to whatever Baker knows by itself, and --set <name>=ignore says it is not campaign information at all so it stops being listed."
|
|
23900
23940
|
},
|
|
23901
23941
|
args,
|
|
23902
23942
|
run: async ({ args: raw }) => {
|
|
@@ -23914,6 +23954,61 @@ var mapCommand = (() => {
|
|
|
23914
23954
|
}
|
|
23915
23955
|
});
|
|
23916
23956
|
})();
|
|
23957
|
+
var trackingCommand = (() => {
|
|
23958
|
+
const args = {
|
|
23959
|
+
platform: {
|
|
23960
|
+
type: "string",
|
|
23961
|
+
description: "One platform: google, meta, microsoft, linkedin, tiktok, reddit, pinterest, snapchat. Omit to check the ones worth checking \u2014 every platform sending visits, plus Google and Meta, whose accounts Baker can read directly",
|
|
23962
|
+
required: false
|
|
23963
|
+
},
|
|
23964
|
+
days: { type: "string", description: "Lookback window for the traffic half (default: 30)", required: false }
|
|
23965
|
+
};
|
|
23966
|
+
registerSchema({
|
|
23967
|
+
command: "analytics.tracking",
|
|
23968
|
+
description: "Check whether a platform's ad URLs carry the campaign, ad group and ad a report needs",
|
|
23969
|
+
args
|
|
23970
|
+
});
|
|
23971
|
+
return defineCommand88({
|
|
23972
|
+
meta: {
|
|
23973
|
+
name: "tracking",
|
|
23974
|
+
description: `Check whether this company's ad URLs carry the dimensions any budget decision needs \u2014 the campaign, the ad group, the ad, and the keyword where the platform has one.
|
|
23975
|
+
|
|
23976
|
+
Read this before auditing an ad account and before answering any "which ad performed best" question. Each dimension comes back in one of four states, and they need different things:
|
|
23977
|
+
covered \u2014 arriving and understood, nothing to do
|
|
23978
|
+
unmapped \u2014 the URLs carry it under a name Baker does not read yet. Free to fix, and it repairs the traffic already collected: run the \`mapCommand\` in the response
|
|
23979
|
+
missing \u2014 nothing carries it. Add \`suffix\` to the account's tagging (\`whereItGoes\` says where, \`fix\` says whether Baker can stage it). This one cannot be filled in later \u2014 a parameter's values are only stored once it starts arriving
|
|
23980
|
+
unknown \u2014 no visit arrived AND the account could not be read. Not a finding; do not report it as untagged
|
|
23981
|
+
|
|
23982
|
+
Baker reads the client's own Google tracking templates and Meta URL parameters, so a platform that has not run yet still gets a real answer.
|
|
23983
|
+
|
|
23984
|
+
Examples:
|
|
23985
|
+
baker analytics tracking
|
|
23986
|
+
baker analytics tracking --platform meta
|
|
23987
|
+
baker analytics tracking --platform google --days 90`
|
|
23988
|
+
},
|
|
23989
|
+
args,
|
|
23990
|
+
run: async ({ args: raw }) => {
|
|
23991
|
+
try {
|
|
23992
|
+
const platform = raw.platform === void 0 ? void 0 : String(raw.platform);
|
|
23993
|
+
if (platform !== void 0 && !isAdPlatform(platform)) {
|
|
23994
|
+
writeJsonEnvelope({
|
|
23995
|
+
ok: false,
|
|
23996
|
+
error: { code: "BAD_REQUEST", message: `Unknown platform "${platform}"` }
|
|
23997
|
+
});
|
|
23998
|
+
process.exit(1);
|
|
23999
|
+
}
|
|
24000
|
+
const days = raw.days === void 0 ? void 0 : Number(raw.days);
|
|
24001
|
+
const response = await apiPost("/api/analytics/tracking", {
|
|
24002
|
+
...platform ? { platform } : {},
|
|
24003
|
+
...days !== void 0 && Number.isFinite(days) ? { days } : {}
|
|
24004
|
+
});
|
|
24005
|
+
writeJsonEnvelope(response);
|
|
24006
|
+
} catch (err) {
|
|
24007
|
+
handleError(err);
|
|
24008
|
+
}
|
|
24009
|
+
}
|
|
24010
|
+
});
|
|
24011
|
+
})();
|
|
23917
24012
|
function parsePairs(raw) {
|
|
23918
24013
|
if (raw === void 0) return void 0;
|
|
23919
24014
|
const out = {};
|
|
@@ -23962,7 +24057,9 @@ Examples:
|
|
|
23962
24057
|
baker analytics ads --role keyword \u2014 keywords by conversions AND by how many bounced
|
|
23963
24058
|
baker analytics ads --platform google --role keyword \u2014 the same, in Google's vocabulary and from Google's traffic only
|
|
23964
24059
|
baker analytics overview --role keyword --value "solar panels" \u2014 the whole report for those visits only
|
|
23965
|
-
baker analytics
|
|
24060
|
+
baker analytics tracking \u2014 do the ad URLs carry the campaign, ad group and ad at all
|
|
24061
|
+
baker analytics tracking --platform meta \u2014 the same for one platform, read from their own ad account
|
|
24062
|
+
baker analytics map --platform google --set kw=keyword \u2014 stage a parameter name, seen or not yet
|
|
23966
24063
|
baker analytics map --platform google --remove kw \u2014 take that answer back
|
|
23967
24064
|
baker analytics delivery --page 2 --page-size 50 \u2014 the next page of a long list
|
|
23968
24065
|
baker analytics overview --compare \u2014 this window against the one before it
|
|
@@ -23987,6 +24084,7 @@ Full guide: __tooling__/docs/tools/baker/analytics.md`
|
|
|
23987
24084
|
devices: devicesCommand,
|
|
23988
24085
|
ads: adsCommand3,
|
|
23989
24086
|
map: mapCommand,
|
|
24087
|
+
tracking: trackingCommand,
|
|
23990
24088
|
presets: presetsCommand
|
|
23991
24089
|
}
|
|
23992
24090
|
});
|
|
@@ -32646,7 +32744,7 @@ registerSchema({
|
|
|
32646
32744
|
}
|
|
32647
32745
|
}
|
|
32648
32746
|
});
|
|
32649
|
-
function capabilityHints(surfaces
|
|
32747
|
+
function capabilityHints(surfaces) {
|
|
32650
32748
|
const hints = [];
|
|
32651
32749
|
const immediate = surfaces.filter((surface) => surface.writeMode === "applies-at-publish");
|
|
32652
32750
|
if (immediate.length > 0) {
|
|
@@ -32669,18 +32767,6 @@ function capabilityHints(surfaces, tools = []) {
|
|
|
32669
32767
|
"Naming one surface (`baker capabilities google-ads`) adds `ops` \u2014 the exact fields and accepted values of every change there. Read that instead of guessing a field name."
|
|
32670
32768
|
);
|
|
32671
32769
|
}
|
|
32672
|
-
const usable = tools.filter((tool) => tool.ready);
|
|
32673
|
-
if (usable.length > 0) {
|
|
32674
|
-
hints.push(
|
|
32675
|
-
`ALSO AVAILABLE, and not on any surface above: ${usable.map((tool) => tool.label).join(", ")}. These answer WHY a page behaves as it does, which no surface here can. See \`tools[].reach\` for how to call each one.`
|
|
32676
|
-
);
|
|
32677
|
-
}
|
|
32678
|
-
const broken = tools.filter((tool) => !tool.ready);
|
|
32679
|
-
if (broken.length > 0) {
|
|
32680
|
-
hints.push(
|
|
32681
|
-
`CONNECTED BUT UNUSABLE: ${broken.map((tool) => `${tool.label} \u2014 ${tool.note ?? "not reachable"}`).join(" ")} Tell the user rather than planning around it silently.`
|
|
32682
|
-
);
|
|
32683
|
-
}
|
|
32684
32770
|
return hints;
|
|
32685
32771
|
}
|
|
32686
32772
|
var runCapabilities = defineCommand108({
|
|
@@ -32690,8 +32776,6 @@ var runCapabilities = defineCommand108({
|
|
|
32690
32776
|
|
|
32691
32777
|
Reports, per surface: what is connected and with what access, what a write there does when it lands, the entities that can be changed, and \u2014 the part nothing else tells you \u2014 what cannot be changed and why.
|
|
32692
32778
|
|
|
32693
|
-
Also returns \`tools\`: everything else this company can reach that is not one of those surfaces \u2014 Microsoft Clarity and any other MCP toolkit, custom servers, HubSpot. This is the one call that answers "what do I actually have".
|
|
32694
|
-
|
|
32695
32779
|
Examples:
|
|
32696
32780
|
baker capabilities
|
|
32697
32781
|
baker capabilities google-ads
|
|
@@ -32727,7 +32811,7 @@ Full guide: __tooling__/docs/tools/baker/capabilities.md`
|
|
|
32727
32811
|
body.full = true;
|
|
32728
32812
|
}
|
|
32729
32813
|
const response = await apiPost("/api/capabilities", body);
|
|
32730
|
-
const hints = capabilityHints(response.data.surfaces
|
|
32814
|
+
const hints = capabilityHints(response.data.surfaces);
|
|
32731
32815
|
writeJson({
|
|
32732
32816
|
...response,
|
|
32733
32817
|
meta: { count: response.data.surfaces.length },
|
|
@@ -33197,286 +33281,12 @@ Full guide: __tooling__/docs/tools/baker/creatives.md`
|
|
|
33197
33281
|
}
|
|
33198
33282
|
});
|
|
33199
33283
|
|
|
33200
|
-
// src/commands/experiment/index.ts
|
|
33201
|
-
import { defineCommand as defineCommand112 } from "citty";
|
|
33202
|
-
|
|
33203
|
-
// src/commands/experiment/goal.ts
|
|
33204
|
-
function parseEventGoal(argument) {
|
|
33205
|
-
const [name, filter] = argument.split("/");
|
|
33206
|
-
if (!name) return { error: "Name the event: --goal event:request_demo" };
|
|
33207
|
-
if (!filter) return { kind: "custom_event", name };
|
|
33208
|
-
const separator = filter.indexOf("=");
|
|
33209
|
-
if (separator === -1) {
|
|
33210
|
-
return { error: `Write the property as key=value: --goal event:${name}/section=pricing` };
|
|
33211
|
-
}
|
|
33212
|
-
return { kind: "custom_event", name, property: filter.slice(0, separator), value: filter.slice(separator + 1) };
|
|
33213
|
-
}
|
|
33214
|
-
function parseGoal(raw) {
|
|
33215
|
-
if (raw === void 0 || raw === "") return void 0;
|
|
33216
|
-
const separator = raw.indexOf(":");
|
|
33217
|
-
const kind = separator === -1 ? raw : raw.slice(0, separator);
|
|
33218
|
-
const argument = separator === -1 ? "" : raw.slice(separator + 1);
|
|
33219
|
-
if (kind === "leads") return argument ? { kind: "conversion", flowSlug: argument } : { kind: "conversion" };
|
|
33220
|
-
if (kind === "click") return argument ? { kind: "outbound_click", targetHost: argument } : { kind: "outbound_click" };
|
|
33221
|
-
if (kind === "event") return parseEventGoal(argument);
|
|
33222
|
-
return {
|
|
33223
|
-
error: `Unknown goal "${raw}". Use leads, leads:<form>, event:<name>, event:<name>/<key>=<value>, click, or click:<host>`
|
|
33224
|
-
};
|
|
33225
|
-
}
|
|
33226
|
-
|
|
33227
|
-
// src/commands/experiment/hints.ts
|
|
33228
|
-
var RUNNING_HINT = {
|
|
33229
|
-
keep_running: (row) => `${row.experimentId} is not finished \u2014 do not read its numbers as a result, and do not end it hoping for one.${row.earliestDecisionAt ? ` Earliest it could say anything: ${new Date(row.earliestDecisionAt).toISOString().slice(0, 10)}.` : " This page has too little traffic to project a finish date yet."}`,
|
|
33230
|
-
winner: (row) => `${row.experimentId} has a winner. Run \`baker experiment finish --id ${row.experimentId}\` to send all the traffic to it. That only re-routes between two pages already published \u2014 it does not edit either.`,
|
|
33231
|
-
no_difference: (row) => `${row.experimentId} found no difference. Finish it (the page you have stays live) and test a bigger change \u2014 a headline, an offer, the shape of the page, not a button colour.`,
|
|
33232
|
-
stopped_early_harmful: (row) => `${row.experimentId} is doing damage. Finish it now \u2014 traffic goes back to the original page.`,
|
|
33233
|
-
// Unreachable in practice — only `finish --abandon` produces it, and that
|
|
33234
|
-
// leaves the test finished. The Record is exhaustive by type so a verdict
|
|
33235
|
-
// added upstream fails to compile here rather than printing nothing.
|
|
33236
|
-
abandoned: (row) => `${row.experimentId} was stopped before it concluded and found nothing.`,
|
|
33237
|
-
invalid: (row) => `${row.experimentId} cannot be read: ${row.invalidReason === "crossover" ? "too many visitors saw both versions" : "the traffic did not split evenly"}. Finish it and start again rather than reporting anything from it.`
|
|
33238
|
-
};
|
|
33239
|
-
function buildStatusHints(experiments) {
|
|
33240
|
-
const hints = experiments.filter((row) => row.status === "running").map((row) => RUNNING_HINT[row.verdict](row));
|
|
33241
|
-
if (experiments.length === 0) {
|
|
33242
|
-
hints.push(
|
|
33243
|
-
"No tests yet. `baker experiment plan --landing <slug> --variant <slug>` says whether a page has enough traffic for one before you build the alternative."
|
|
33244
|
-
);
|
|
33245
|
-
}
|
|
33246
|
-
return hints;
|
|
33247
|
-
}
|
|
33248
|
-
function buildPlanHints(plan) {
|
|
33249
|
-
if (!plan.canRun) {
|
|
33250
|
-
return [
|
|
33251
|
-
plan.reason ?? "This test cannot run on this page.",
|
|
33252
|
-
"A test that cannot conclude is worse than no test \u2014 it still produces a number, and somebody acts on it."
|
|
33253
|
-
];
|
|
33254
|
-
}
|
|
33255
|
-
const hints = [
|
|
33256
|
-
`This test measures ${plan.goalLabel}. That is fixed when it starts and cannot be changed later.`,
|
|
33257
|
-
// Fires at the exact moment the hypothesis gets invented, whether or not
|
|
33258
|
-
// the agent read the family doc. `plan` says a question CAN be settled here
|
|
33259
|
-
// and says nothing about which question is worth asking — and a well-run
|
|
33260
|
-
// test of a bad idea costs three weeks and returns `no_difference`.
|
|
33261
|
-
"Now decide WHAT to change, from evidence rather than taste. These numbers say which page and which step; they cannot say why. A second opinion answers why \u2014 Microsoft Clarity for what visitors actually do on the page, `baker gsc` for what they searched, `baker ads <platform>` for what the ad promised, `baker ga4` for the client's own measurement. `baker capabilities` lists everything this client has in one call \u2014 the surfaces, and under `tools` everything else that is reachable. Message match \u2014 what the ad or the search promised against what the page opens with \u2014 is the cheapest hypothesis worth testing and is wrong surprisingly often.",
|
|
33262
|
-
// The base always works, so a missing integration is never a reason to
|
|
33263
|
-
// stop. Naming what it would have shown is worth more to the client than
|
|
33264
|
-
// either a silent gap or a run that waited.
|
|
33265
|
-
"If none of that is connected, this page's own drop-off is enough to test on \u2014 say which source you lacked and what it would have told you, then run the test anyway. A test never waits on an integration."
|
|
33266
|
-
];
|
|
33267
|
-
if (plan.estimatedDays !== null && plan.estimatedDays > 60) {
|
|
33268
|
-
hints.push(
|
|
33269
|
-
`At this page's traffic it would take about ${plan.estimatedDays} days. Consider testing a bigger change, which needs less traffic to detect.`
|
|
33270
|
-
);
|
|
33271
|
-
}
|
|
33272
|
-
return hints;
|
|
33273
|
-
}
|
|
33274
|
-
|
|
33275
|
-
// src/commands/experiment/index.ts
|
|
33276
|
-
var GOAL_ARG = {
|
|
33277
|
-
type: "string",
|
|
33278
|
-
description: "What counts as success, and it is fixed for the life of the test. `leads` (default \u2014 whatever this company already marks as a conversion), `leads:<form>`, `event:<name>` for an event the page declares itself (see `baker analytics events`), `event:<name>/<key>=<value>` to narrow it, `click` or `click:<host>` for leaving the site. Pick the thing the business actually wants; a test that measures the wrong outcome can have the variant win and the revenue fall.",
|
|
33279
|
-
required: false
|
|
33280
|
-
};
|
|
33281
|
-
var LIFT_ARG = {
|
|
33282
|
-
type: "string",
|
|
33283
|
-
description: "The smallest improvement worth detecting, relative \u2014 0.2 is +20% (default). The single most consequential number here: halving it roughly quadruples the traffic needed. Ask for the smallest lift that would actually change what the client does, not the smallest one you would like to see.",
|
|
33284
|
-
required: false
|
|
33285
|
-
};
|
|
33286
|
-
function fail5(message) {
|
|
33287
|
-
writeJsonEnvelope({ ok: false, error: { code: "VALIDATION_ERROR", message } });
|
|
33288
|
-
process.exit(1);
|
|
33289
|
-
}
|
|
33290
|
-
function reportApiError(error) {
|
|
33291
|
-
if (error instanceof ApiError) {
|
|
33292
|
-
writeJsonEnvelope({ ok: false, error: { code: error.code ?? "ERROR", message: error.message } });
|
|
33293
|
-
process.exit(1);
|
|
33294
|
-
}
|
|
33295
|
-
throw error;
|
|
33296
|
-
}
|
|
33297
|
-
registerSchema({
|
|
33298
|
-
command: "experiment.plan",
|
|
33299
|
-
description: "Whether a page has enough traffic to settle a question, before anything is built",
|
|
33300
|
-
args: {
|
|
33301
|
-
landing: { type: "string", description: "The page under test, by slug", required: true },
|
|
33302
|
-
variant: { type: "string", description: "The alternative page's slug", required: true },
|
|
33303
|
-
goal: GOAL_ARG,
|
|
33304
|
-
lift: LIFT_ARG
|
|
33305
|
-
}
|
|
33306
|
-
});
|
|
33307
|
-
var planCommand = defineCommand112({
|
|
33308
|
-
meta: {
|
|
33309
|
-
name: "plan",
|
|
33310
|
-
description: "Start here, BEFORE building the alternative page. Says whether this page gets enough traffic to settle the question, how long it would take, and whether the thing you want to measure has ever happened on it. Most landing pages cannot run most tests \u2014 finding that out now costs one call, and finding it out later costs three weeks and a decision made on noise."
|
|
33311
|
-
},
|
|
33312
|
-
args: {
|
|
33313
|
-
landing: { type: "string", description: "The page under test, by slug", required: true },
|
|
33314
|
-
variant: { type: "string", description: "The alternative page's slug", required: true },
|
|
33315
|
-
goal: GOAL_ARG,
|
|
33316
|
-
lift: LIFT_ARG
|
|
33317
|
-
},
|
|
33318
|
-
run: async ({ args }) => {
|
|
33319
|
-
const goal = parseGoal(args.goal ? String(args.goal) : void 0);
|
|
33320
|
-
if (goal && "error" in goal) fail5(goal.error);
|
|
33321
|
-
try {
|
|
33322
|
-
const response = await apiPost("/api/experiments/plan", {
|
|
33323
|
-
landingSlug: String(args.landing),
|
|
33324
|
-
variantSlug: String(args.variant),
|
|
33325
|
-
...goal ? { goal } : {},
|
|
33326
|
-
...args.lift ? { minDetectableRelativeLift: Number(args.lift) } : {}
|
|
33327
|
-
});
|
|
33328
|
-
writeJsonEnvelope({ ok: true, data: response.data, hints: buildPlanHints(response.data) });
|
|
33329
|
-
} catch (error) {
|
|
33330
|
-
reportApiError(error);
|
|
33331
|
-
}
|
|
33332
|
-
}
|
|
33333
|
-
});
|
|
33334
|
-
registerSchema({
|
|
33335
|
-
command: "experiment.start",
|
|
33336
|
-
description: "Stage an A/B test between a page and its alternative",
|
|
33337
|
-
args: {
|
|
33338
|
-
landing: { type: "string", description: "The page under test, by slug", required: true },
|
|
33339
|
-
variant: { type: "string", description: "The alternative page's slug", required: true },
|
|
33340
|
-
hypothesis: { type: "string", description: "What should change and why it should convert better", required: true },
|
|
33341
|
-
goal: GOAL_ARG,
|
|
33342
|
-
lift: LIFT_ARG
|
|
33343
|
-
}
|
|
33344
|
-
});
|
|
33345
|
-
var startCommand = defineCommand112({
|
|
33346
|
-
meta: {
|
|
33347
|
-
name: "start",
|
|
33348
|
-
description: "Stage a test between the page and its alternative. Both are ordinary published pages; visitors are split 50/50 at the edge, so there is no flicker and nothing for an ad blocker to suppress. Nothing goes live until the session is published \u2014 the person publishing is the review of the alternative page. Re-runs `plan` first and refuses on the same grounds."
|
|
33349
|
-
},
|
|
33350
|
-
args: {
|
|
33351
|
-
landing: { type: "string", description: "The page under test, by slug", required: true },
|
|
33352
|
-
variant: { type: "string", description: "The alternative page's slug", required: true },
|
|
33353
|
-
hypothesis: { type: "string", description: "What should change and why it should convert better", required: true },
|
|
33354
|
-
goal: GOAL_ARG,
|
|
33355
|
-
lift: LIFT_ARG
|
|
33356
|
-
},
|
|
33357
|
-
run: async ({ args }) => {
|
|
33358
|
-
const goal = parseGoal(args.goal ? String(args.goal) : void 0);
|
|
33359
|
-
if (goal && "error" in goal) fail5(goal.error);
|
|
33360
|
-
try {
|
|
33361
|
-
const response = await apiPost("/api/experiments/start", {
|
|
33362
|
-
landingSlug: String(args.landing),
|
|
33363
|
-
variantSlug: String(args.variant),
|
|
33364
|
-
hypothesis: String(args.hypothesis),
|
|
33365
|
-
...goal ? { goal } : {},
|
|
33366
|
-
...args.lift ? { minDetectableRelativeLift: Number(args.lift) } : {}
|
|
33367
|
-
});
|
|
33368
|
-
writeJsonEnvelope({
|
|
33369
|
-
ok: true,
|
|
33370
|
-
data: response.data,
|
|
33371
|
-
hints: [
|
|
33372
|
-
"Staged. The split starts when this session is published \u2014 publishing is the review of the alternative page.",
|
|
33373
|
-
"Do not read the numbers before the test says it has finished. A weekly check IS peeking: stopping the first time a probability looks good has several times the false-positive rate that probability implies."
|
|
33374
|
-
]
|
|
33375
|
-
});
|
|
33376
|
-
} catch (error) {
|
|
33377
|
-
reportApiError(error);
|
|
33378
|
-
}
|
|
33379
|
-
}
|
|
33380
|
-
});
|
|
33381
|
-
registerSchema({
|
|
33382
|
-
command: "experiment.status",
|
|
33383
|
-
description: "The verdict on every A/B test, running and finished",
|
|
33384
|
-
args: {
|
|
33385
|
-
id: { type: "string", description: "One test, by its id", required: false },
|
|
33386
|
-
full: { type: "boolean", description: "Include the posteriors behind the verdict", required: false }
|
|
33387
|
-
}
|
|
33388
|
-
});
|
|
33389
|
-
var statusCommand4 = defineCommand112({
|
|
33390
|
-
meta: {
|
|
33391
|
-
name: "status",
|
|
33392
|
-
description: "The verdict on each test. Read `verdict` and nothing else to decide: keep_running | winner | no_difference | invalid | stopped_early_harmful. `summary` is one sentence you can show the client. The numbers under `--full` are for printing, never for deciding \u2014 a test that says keep_running has not finished, however good its numbers look."
|
|
33393
|
-
},
|
|
33394
|
-
args: {
|
|
33395
|
-
id: { type: "string", description: "One test, by its id", required: false },
|
|
33396
|
-
full: { type: "boolean", description: "Include the posteriors behind the verdict", required: false }
|
|
33397
|
-
},
|
|
33398
|
-
run: async ({ args }) => {
|
|
33399
|
-
try {
|
|
33400
|
-
const response = await apiPost("/api/experiments/status", {
|
|
33401
|
-
...args.id ? { experimentId: String(args.id) } : {},
|
|
33402
|
-
...args.full === true ? { full: true } : {}
|
|
33403
|
-
});
|
|
33404
|
-
writeJsonEnvelope({
|
|
33405
|
-
ok: true,
|
|
33406
|
-
data: response.data,
|
|
33407
|
-
hints: buildStatusHints(response.data.experiments)
|
|
33408
|
-
});
|
|
33409
|
-
} catch (error) {
|
|
33410
|
-
reportApiError(error);
|
|
33411
|
-
}
|
|
33412
|
-
}
|
|
33413
|
-
});
|
|
33414
|
-
registerSchema({
|
|
33415
|
-
command: "experiment.finish",
|
|
33416
|
-
description: "End a test and send all its traffic to the surviving page",
|
|
33417
|
-
args: {
|
|
33418
|
-
id: { type: "string", description: "The test, by its id", required: true },
|
|
33419
|
-
abandon: {
|
|
33420
|
-
type: "boolean",
|
|
33421
|
-
description: "Stop the test, keep the original page, and record no result. The only way to end a test that has not concluded \u2014 and it OVERRIDES a verdict if there is one, throwing that finding away. Do not pass it by reflex.",
|
|
33422
|
-
required: false
|
|
33423
|
-
}
|
|
33424
|
-
}
|
|
33425
|
-
});
|
|
33426
|
-
var finishCommand = defineCommand112({
|
|
33427
|
-
meta: {
|
|
33428
|
-
name: "finish",
|
|
33429
|
-
description: "End a test and send all its traffic to whichever page survived. Only a test whose verdict has concluded can be finished with a result \u2014 a `keep_running` test can only be `--abandon`ed, which keeps the original page and records no finding. Promotion is a traffic change over two pages that were both already published and reviewed; it does not edit either page."
|
|
33430
|
-
},
|
|
33431
|
-
args: {
|
|
33432
|
-
id: { type: "string", description: "The test, by its id", required: true },
|
|
33433
|
-
abandon: {
|
|
33434
|
-
type: "boolean",
|
|
33435
|
-
description: "Stop the test, keep the original page, and record no result. The only way to end a test that has not concluded \u2014 and it OVERRIDES a verdict if there is one, throwing that finding away. Do not pass it by reflex.",
|
|
33436
|
-
required: false
|
|
33437
|
-
}
|
|
33438
|
-
},
|
|
33439
|
-
run: async ({ args }) => {
|
|
33440
|
-
try {
|
|
33441
|
-
const response = await apiPost("/api/experiments/finish", {
|
|
33442
|
-
experimentId: String(args.id),
|
|
33443
|
-
...args.abandon === true ? { abandon: true } : {}
|
|
33444
|
-
});
|
|
33445
|
-
writeJsonEnvelope({
|
|
33446
|
-
ok: true,
|
|
33447
|
-
data: response.data,
|
|
33448
|
-
hints: [
|
|
33449
|
-
`Staged. All the traffic goes to the ${response.data.survivor === "variant" ? "alternative" : "original"} page when this session is published.`,
|
|
33450
|
-
...response.data.discardedVerdict ? [
|
|
33451
|
-
`You abandoned a test that HAD concluded (${response.data.discardedVerdict}). The original page keeps the traffic and no result is recorded \u2014 the finding is gone. If that was not what you meant, run this again without --abandon.`
|
|
33452
|
-
] : [],
|
|
33453
|
-
"If the alternative won and you want it to become the page itself, that is an ordinary page edit afterwards \u2014 copy its content over and delete the alternative."
|
|
33454
|
-
]
|
|
33455
|
-
});
|
|
33456
|
-
} catch (error) {
|
|
33457
|
-
reportApiError(error);
|
|
33458
|
-
}
|
|
33459
|
-
}
|
|
33460
|
-
});
|
|
33461
|
-
var experimentCommand = defineCommand112({
|
|
33462
|
-
meta: {
|
|
33463
|
-
name: "experiment",
|
|
33464
|
-
description: "Run an A/B test between a landing page and an alternative version of it, and be told which one is better. Always `plan` first: most pages do not get enough traffic to settle most questions, and a test that cannot conclude still produces a number somebody will act on."
|
|
33465
|
-
},
|
|
33466
|
-
subCommands: {
|
|
33467
|
-
plan: planCommand,
|
|
33468
|
-
start: startCommand,
|
|
33469
|
-
status: statusCommand4,
|
|
33470
|
-
finish: finishCommand
|
|
33471
|
-
}
|
|
33472
|
-
});
|
|
33473
|
-
|
|
33474
33284
|
// src/commands/flows/index.ts
|
|
33475
|
-
import { defineCommand as
|
|
33285
|
+
import { defineCommand as defineCommand116 } from "citty";
|
|
33476
33286
|
|
|
33477
33287
|
// src/commands/flows/add.ts
|
|
33478
33288
|
import { randomUUID } from "crypto";
|
|
33479
|
-
import { defineCommand as
|
|
33289
|
+
import { defineCommand as defineCommand112 } from "citty";
|
|
33480
33290
|
|
|
33481
33291
|
// src/commands/flows/shared.ts
|
|
33482
33292
|
import { existsSync as existsSync5, readdirSync as readdirSync2, readFileSync as readFileSync9, writeFileSync as writeFileSync3 } from "fs";
|
|
@@ -33686,7 +33496,7 @@ registerSchema({
|
|
|
33686
33496
|
parent: { type: "string", description: "Parent node id. Omit to append to the root's children.", required: false }
|
|
33687
33497
|
}
|
|
33688
33498
|
});
|
|
33689
|
-
var addNodeCommand =
|
|
33499
|
+
var addNodeCommand = defineCommand112({
|
|
33690
33500
|
meta: {
|
|
33691
33501
|
name: "add-node",
|
|
33692
33502
|
description: 'Add a step to a form, with the skeleton its type requires. Example: baker flows add-node contact --type customForm --name "Contact Info"'
|
|
@@ -33782,7 +33592,7 @@ registerSchema({
|
|
|
33782
33592
|
}
|
|
33783
33593
|
}
|
|
33784
33594
|
});
|
|
33785
|
-
var addSideEffectCommand =
|
|
33595
|
+
var addSideEffectCommand = defineCommand112({
|
|
33786
33596
|
meta: {
|
|
33787
33597
|
name: "add-side-effect",
|
|
33788
33598
|
description: "Add a side effect to a step, with the skeleton its type requires. Example: baker flows add-side-effect contact --node <id> --type googleSpreadsheet"
|
|
@@ -33864,7 +33674,7 @@ var addSideEffectCommand = defineCommand113({
|
|
|
33864
33674
|
|
|
33865
33675
|
// src/commands/flows/map.ts
|
|
33866
33676
|
import { readFileSync as readFileSync11 } from "fs";
|
|
33867
|
-
import { defineCommand as
|
|
33677
|
+
import { defineCommand as defineCommand113 } from "citty";
|
|
33868
33678
|
|
|
33869
33679
|
// src/commands/flows/value-expression.ts
|
|
33870
33680
|
import { existsSync as existsSync6, readFileSync as readFileSync10 } from "fs";
|
|
@@ -34637,7 +34447,7 @@ async function mapOptions(args, fromFile, into) {
|
|
|
34637
34447
|
destinationFields: hubspotForm ? await hubspotFieldCatalog(hubspotForm) : void 0
|
|
34638
34448
|
};
|
|
34639
34449
|
}
|
|
34640
|
-
var mapCommand2 =
|
|
34450
|
+
var mapCommand2 = defineCommand113({
|
|
34641
34451
|
meta: {
|
|
34642
34452
|
name: "map",
|
|
34643
34453
|
description: "Map form fields onto any value a side effect sends \u2014 never hand-write a mapping. Start here: baker flows map contact --from map.json --write"
|
|
@@ -34735,7 +34545,7 @@ var mapCommand2 = defineCommand114({
|
|
|
34735
34545
|
});
|
|
34736
34546
|
|
|
34737
34547
|
// src/commands/flows/normalize.ts
|
|
34738
|
-
import { defineCommand as
|
|
34548
|
+
import { defineCommand as defineCommand114 } from "citty";
|
|
34739
34549
|
var OPTIONAL_STRINGS = ["oauthProviderId"];
|
|
34740
34550
|
var ARRAY_FIELDS = [
|
|
34741
34551
|
"fieldMapping",
|
|
@@ -34804,7 +34614,7 @@ registerSchema({
|
|
|
34804
34614
|
}
|
|
34805
34615
|
}
|
|
34806
34616
|
});
|
|
34807
|
-
var normalizeCommand =
|
|
34617
|
+
var normalizeCommand = defineCommand114({
|
|
34808
34618
|
meta: {
|
|
34809
34619
|
name: "normalize",
|
|
34810
34620
|
description: "Repair the shapes a form file is allowed to get slightly wrong. Example: baker flows normalize contact --write"
|
|
@@ -34835,7 +34645,7 @@ var normalizeCommand = defineCommand115({
|
|
|
34835
34645
|
});
|
|
34836
34646
|
|
|
34837
34647
|
// src/commands/flows/schema.ts
|
|
34838
|
-
import { defineCommand as
|
|
34648
|
+
import { defineCommand as defineCommand115 } from "citty";
|
|
34839
34649
|
registerSchema({
|
|
34840
34650
|
command: "flows.schema",
|
|
34841
34651
|
description: "The shape of one node or side-effect type: a pasteable skeleton, who fills each part, and the reference file with the craft. Start here before authoring anything in a form's _data.json.",
|
|
@@ -34860,7 +34670,7 @@ function triggerHints(triggers) {
|
|
|
34860
34670
|
`A side effect on this step carries \`triggerId: "${triggers.completion}"\`, and \`baker flows add-side-effect\` writes it for you. The trigger belongs to the STEP, not to the side-effect type: one that does not match is valid, ships, and never runs.` + (others.length > 0 ? ` Other moments this step raises: ${others.join(", ")}.` : "")
|
|
34861
34671
|
];
|
|
34862
34672
|
}
|
|
34863
|
-
var schemaCommand =
|
|
34673
|
+
var schemaCommand = defineCommand115({
|
|
34864
34674
|
meta: {
|
|
34865
34675
|
name: "schema",
|
|
34866
34676
|
description: "Show a node or side-effect type's shape. Start here: baker flows schema node customForm \xB7 baker flows schema side-effect googleSpreadsheet \xB7 baker flows schema (lists both)"
|
|
@@ -34994,7 +34804,7 @@ function displayName(slug) {
|
|
|
34994
34804
|
const name = tree.displayName;
|
|
34995
34805
|
return typeof name === "string" && name.trim() ? name.trim() : slug;
|
|
34996
34806
|
}
|
|
34997
|
-
var listCommand12 =
|
|
34807
|
+
var listCommand12 = defineCommand116({
|
|
34998
34808
|
meta: {
|
|
34999
34809
|
name: "list",
|
|
35000
34810
|
description: "List Forms in this workspace with the count of confidential fields still needing setup. Example: baker flows list"
|
|
@@ -35015,7 +34825,7 @@ var listCommand12 = defineCommand117({
|
|
|
35015
34825
|
});
|
|
35016
34826
|
}
|
|
35017
34827
|
});
|
|
35018
|
-
var showCommand3 =
|
|
34828
|
+
var showCommand3 = defineCommand116({
|
|
35019
34829
|
meta: {
|
|
35020
34830
|
name: "show",
|
|
35021
34831
|
description: "Show a Form's confidential fields and their configuration status (never secret values). Example: baker flows show contact"
|
|
@@ -35043,7 +34853,7 @@ var showCommand3 = defineCommand117({
|
|
|
35043
34853
|
});
|
|
35044
34854
|
}
|
|
35045
34855
|
});
|
|
35046
|
-
var flowsCommand =
|
|
34856
|
+
var flowsCommand = defineCommand116({
|
|
35047
34857
|
meta: {
|
|
35048
34858
|
name: "flows",
|
|
35049
34859
|
description: `Read and shape this workspace's Forms (flows).
|
|
@@ -35077,10 +34887,10 @@ Full guide: __tooling__/docs/tools/baker/flows.md`
|
|
|
35077
34887
|
});
|
|
35078
34888
|
|
|
35079
34889
|
// src/commands/ga4/index.ts
|
|
35080
|
-
import { defineCommand as
|
|
34890
|
+
import { defineCommand as defineCommand123 } from "citty";
|
|
35081
34891
|
|
|
35082
34892
|
// src/commands/ga4/audit.ts
|
|
35083
|
-
import { defineCommand as
|
|
34893
|
+
import { defineCommand as defineCommand117 } from "citty";
|
|
35084
34894
|
|
|
35085
34895
|
// src/commands/ga4/resolve.ts
|
|
35086
34896
|
async function fetchProperties(useCache = true) {
|
|
@@ -35146,7 +34956,7 @@ registerSchema({
|
|
|
35146
34956
|
"no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false }
|
|
35147
34957
|
}
|
|
35148
34958
|
});
|
|
35149
|
-
var auditCommand2 =
|
|
34959
|
+
var auditCommand2 = defineCommand117({
|
|
35150
34960
|
meta: {
|
|
35151
34961
|
name: "audit",
|
|
35152
34962
|
description: `Run all GA4 admin health checks. Returns property config with playbook warnings.
|
|
@@ -35201,7 +35011,7 @@ Examples:
|
|
|
35201
35011
|
});
|
|
35202
35012
|
|
|
35203
35013
|
// src/commands/ga4/config.ts
|
|
35204
|
-
import { defineCommand as
|
|
35014
|
+
import { defineCommand as defineCommand118 } from "citty";
|
|
35205
35015
|
|
|
35206
35016
|
// src/commands/ga4/shared.ts
|
|
35207
35017
|
import { readFileSync as readFileSync12 } from "fs";
|
|
@@ -35397,7 +35207,7 @@ function configHints(config) {
|
|
|
35397
35207
|
}
|
|
35398
35208
|
return hints;
|
|
35399
35209
|
}
|
|
35400
|
-
var configCommand =
|
|
35210
|
+
var configCommand = defineCommand118({
|
|
35401
35211
|
meta: {
|
|
35402
35212
|
name: "config",
|
|
35403
35213
|
description: `Read how the property is configured to measure \u2014 key events, custom definitions, custom events, retention
|
|
@@ -35429,7 +35239,7 @@ Examples:
|
|
|
35429
35239
|
});
|
|
35430
35240
|
|
|
35431
35241
|
// src/commands/ga4/draft.ts
|
|
35432
|
-
import { defineCommand as
|
|
35242
|
+
import { defineCommand as defineCommand119 } from "citty";
|
|
35433
35243
|
registerSchema({
|
|
35434
35244
|
command: "ga4.draft",
|
|
35435
35245
|
description: "Review and undo the Google Analytics changes staged on this chat. Use `list` to see everything staged, `show` to inspect one change in full before the chat completes, `amend` to correct one in place, and `remove`/`clear` to drop them. `list` and `show` take --chat <id> to read an earlier chat's changes instead.",
|
|
@@ -35438,13 +35248,13 @@ registerSchema({
|
|
|
35438
35248
|
chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
|
|
35439
35249
|
}
|
|
35440
35250
|
});
|
|
35441
|
-
var draftCommand3 =
|
|
35251
|
+
var draftCommand3 = defineCommand119({
|
|
35442
35252
|
meta: {
|
|
35443
35253
|
name: "draft",
|
|
35444
35254
|
description: "List, show, amend, remove or clear the Google Analytics changes staged on this chat. `list` and `show` take --chat <id> to read an earlier chat's changes instead."
|
|
35445
35255
|
},
|
|
35446
35256
|
subCommands: {
|
|
35447
|
-
list:
|
|
35257
|
+
list: defineCommand119({
|
|
35448
35258
|
meta: { name: "list", description: "Review everything staged on this chat (--json for the raw envelope)" },
|
|
35449
35259
|
args: {
|
|
35450
35260
|
json: { type: "boolean", description: "Print the raw JSON envelope", required: false },
|
|
@@ -35454,7 +35264,7 @@ var draftCommand3 = defineCommand120({
|
|
|
35454
35264
|
await draftList(args.json === true, args.chat);
|
|
35455
35265
|
}
|
|
35456
35266
|
}),
|
|
35457
|
-
show:
|
|
35267
|
+
show: defineCommand119({
|
|
35458
35268
|
meta: {
|
|
35459
35269
|
name: "show",
|
|
35460
35270
|
description: "Print the full staged payload for one change, alongside how the property looks today \u2014 the receipt to verify it before the chat completes (never truncated)."
|
|
@@ -35471,7 +35281,7 @@ var draftCommand3 = defineCommand120({
|
|
|
35471
35281
|
);
|
|
35472
35282
|
}
|
|
35473
35283
|
}),
|
|
35474
|
-
amend:
|
|
35284
|
+
amend: defineCommand119({
|
|
35475
35285
|
meta: {
|
|
35476
35286
|
name: "amend",
|
|
35477
35287
|
description: "Update a staged change in place \u2014 merges a JSON patch into its payload (objects deep-merge, null deletes a key, arrays/scalars replace) and re-runs every check. Use this instead of remove + re-create."
|
|
@@ -35488,7 +35298,7 @@ var draftCommand3 = defineCommand120({
|
|
|
35488
35298
|
});
|
|
35489
35299
|
}
|
|
35490
35300
|
}),
|
|
35491
|
-
remove:
|
|
35301
|
+
remove: defineCommand119({
|
|
35492
35302
|
meta: { name: "remove", description: "Remove one staged change" },
|
|
35493
35303
|
args: { ref: { type: "positional", description: "Staged ref or target id", required: false } },
|
|
35494
35304
|
run: async ({ args }) => {
|
|
@@ -35497,7 +35307,7 @@ var draftCommand3 = defineCommand120({
|
|
|
35497
35307
|
});
|
|
35498
35308
|
}
|
|
35499
35309
|
}),
|
|
35500
|
-
clear:
|
|
35310
|
+
clear: defineCommand119({
|
|
35501
35311
|
meta: { name: "clear", description: "Discard all Google Analytics changes staged on this chat" },
|
|
35502
35312
|
run: async () => {
|
|
35503
35313
|
await draftAction2("/api/ga4/draft/clear", {});
|
|
@@ -35507,7 +35317,7 @@ var draftCommand3 = defineCommand120({
|
|
|
35507
35317
|
});
|
|
35508
35318
|
|
|
35509
35319
|
// src/commands/ga4/properties.ts
|
|
35510
|
-
import { defineCommand as
|
|
35320
|
+
import { defineCommand as defineCommand120 } from "citty";
|
|
35511
35321
|
registerSchema({
|
|
35512
35322
|
command: "ga4.properties",
|
|
35513
35323
|
description: "List the GA4 properties this company connected \u2014 there can be several, and every one of them is yours to query. Returns the property IDs the query and audit commands take. Run this first to find property IDs.",
|
|
@@ -35523,7 +35333,7 @@ function propertyHints(properties) {
|
|
|
35523
35333
|
resources: properties.map((property) => ({ id: property.externalId, label: property.name }))
|
|
35524
35334
|
});
|
|
35525
35335
|
}
|
|
35526
|
-
var propertiesCommand =
|
|
35336
|
+
var propertiesCommand = defineCommand120({
|
|
35527
35337
|
meta: {
|
|
35528
35338
|
name: "properties",
|
|
35529
35339
|
description: `List accessible GA4 properties.
|
|
@@ -35573,7 +35383,7 @@ Examples:
|
|
|
35573
35383
|
// src/commands/ga4/query.ts
|
|
35574
35384
|
import { appendFileSync as appendFileSync2, existsSync as existsSync7, readFileSync as readFileSync13, writeFileSync as writeFileSync4 } from "fs";
|
|
35575
35385
|
import { resolve as resolve2 } from "path";
|
|
35576
|
-
import { defineCommand as
|
|
35386
|
+
import { defineCommand as defineCommand121 } from "citty";
|
|
35577
35387
|
|
|
35578
35388
|
// src/commands/ga4/presets.ts
|
|
35579
35389
|
var GA4_PRESETS = [
|
|
@@ -35708,7 +35518,7 @@ function handleError3(err) {
|
|
|
35708
35518
|
});
|
|
35709
35519
|
process.exit(1);
|
|
35710
35520
|
}
|
|
35711
|
-
var queryCommand2 =
|
|
35521
|
+
var queryCommand2 = defineCommand121({
|
|
35712
35522
|
meta: {
|
|
35713
35523
|
name: "query",
|
|
35714
35524
|
description: `Run GA4 Data API reports. Preset-first with free-form escape hatch.
|
|
@@ -35779,7 +35589,7 @@ Free-form (escape hatch):
|
|
|
35779
35589
|
});
|
|
35780
35590
|
|
|
35781
35591
|
// src/commands/ga4/write-commands.ts
|
|
35782
|
-
import { defineCommand as
|
|
35592
|
+
import { defineCommand as defineCommand122 } from "citty";
|
|
35783
35593
|
var PROPERTY_ARG_DESCRIPTION = "GA4 property id (optional only when one property is connected \u2014 run `baker ga4 properties`)";
|
|
35784
35594
|
var propertyArg = { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false };
|
|
35785
35595
|
function createJsonDescription(noun) {
|
|
@@ -35797,7 +35607,7 @@ registerSchema({
|
|
|
35797
35607
|
"property-id": { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false }
|
|
35798
35608
|
}
|
|
35799
35609
|
});
|
|
35800
|
-
var keyEventCommand =
|
|
35610
|
+
var keyEventCommand = defineCommand122({
|
|
35801
35611
|
meta: {
|
|
35802
35612
|
name: "key-event",
|
|
35803
35613
|
description: `Stage key-event (conversion) changes
|
|
@@ -35810,7 +35620,7 @@ Examples:
|
|
|
35810
35620
|
baker ga4 key-event delete 4185`
|
|
35811
35621
|
},
|
|
35812
35622
|
subCommands: {
|
|
35813
|
-
create:
|
|
35623
|
+
create: defineCommand122({
|
|
35814
35624
|
meta: {
|
|
35815
35625
|
name: "create",
|
|
35816
35626
|
description: "Stage a new key event. Needs eventName and countingMethod (ONCE_PER_EVENT or ONCE_PER_SESSION); defaultValue sets a monetary value when the event does not send one."
|
|
@@ -35831,7 +35641,7 @@ Examples:
|
|
|
35831
35641
|
);
|
|
35832
35642
|
}
|
|
35833
35643
|
}),
|
|
35834
|
-
update:
|
|
35644
|
+
update: defineCommand122({
|
|
35835
35645
|
meta: {
|
|
35836
35646
|
name: "update",
|
|
35837
35647
|
description: "Stage a change to an existing key event (pass its id). Only countingMethod and defaultValue can change \u2014 Google will not rename a key event."
|
|
@@ -35851,7 +35661,7 @@ Examples:
|
|
|
35851
35661
|
});
|
|
35852
35662
|
}
|
|
35853
35663
|
}),
|
|
35854
|
-
delete:
|
|
35664
|
+
delete: defineCommand122({
|
|
35855
35665
|
meta: {
|
|
35856
35666
|
name: "delete",
|
|
35857
35667
|
description: "Stage removing a key event, so the event stops counting as a conversion. The event itself keeps being collected. Irreversible once the chat completes \u2014 confirm with the user first."
|
|
@@ -35899,7 +35709,7 @@ for (const { kind, noun, createHint } of DEFINITIONS) {
|
|
|
35899
35709
|
}
|
|
35900
35710
|
function definitionCommand(definition) {
|
|
35901
35711
|
const { command, kind, noun, example } = definition;
|
|
35902
|
-
return
|
|
35712
|
+
return defineCommand122({
|
|
35903
35713
|
meta: {
|
|
35904
35714
|
name: command,
|
|
35905
35715
|
description: `Stage ${noun} changes
|
|
@@ -35911,7 +35721,7 @@ Examples:
|
|
|
35911
35721
|
baker ga4 ${command} archive 12`
|
|
35912
35722
|
},
|
|
35913
35723
|
subCommands: {
|
|
35914
|
-
create:
|
|
35724
|
+
create: defineCommand122({
|
|
35915
35725
|
meta: { name: "create", description: `Stage a new ${noun} (or a JSON array of them, staged together)` },
|
|
35916
35726
|
args: {
|
|
35917
35727
|
json: { type: "string", description: createJsonDescription(noun), required: false },
|
|
@@ -35929,7 +35739,7 @@ Examples:
|
|
|
35929
35739
|
);
|
|
35930
35740
|
}
|
|
35931
35741
|
}),
|
|
35932
|
-
update:
|
|
35742
|
+
update: defineCommand122({
|
|
35933
35743
|
meta: {
|
|
35934
35744
|
name: "update",
|
|
35935
35745
|
description: `Stage a change to an existing ${noun} (pass its id). The parameter name and scope cannot change \u2014 archive and recreate for that.`
|
|
@@ -35949,7 +35759,7 @@ Examples:
|
|
|
35949
35759
|
});
|
|
35950
35760
|
}
|
|
35951
35761
|
}),
|
|
35952
|
-
archive:
|
|
35762
|
+
archive: defineCommand122({
|
|
35953
35763
|
meta: {
|
|
35954
35764
|
name: "archive",
|
|
35955
35765
|
description: `Stage archiving a ${noun} (pass its id). It stops collecting and leaves reporting; past data stays. Irreversible once the chat completes \u2014 confirm with the user first.`
|
|
@@ -35994,7 +35804,7 @@ var dataStreamArg = {
|
|
|
35994
35804
|
function withStream(args) {
|
|
35995
35805
|
return typeof args["data-stream"] === "string" ? { dataStream: args["data-stream"] } : {};
|
|
35996
35806
|
}
|
|
35997
|
-
var customEventCommand =
|
|
35807
|
+
var customEventCommand = defineCommand122({
|
|
35998
35808
|
meta: {
|
|
35999
35809
|
name: "custom-event",
|
|
36000
35810
|
description: `Stage custom events \u2014 new events built from events the site already sends
|
|
@@ -36005,7 +35815,7 @@ Examples:
|
|
|
36005
35815
|
baker ga4 custom-event delete 7`
|
|
36006
35816
|
},
|
|
36007
35817
|
subCommands: {
|
|
36008
|
-
create:
|
|
35818
|
+
create: defineCommand122({
|
|
36009
35819
|
meta: {
|
|
36010
35820
|
name: "create",
|
|
36011
35821
|
description: "Stage a new custom event. Conditions match the source event: use field `event_name` to match the event itself, or any parameter name to match its value."
|
|
@@ -36028,7 +35838,7 @@ Examples:
|
|
|
36028
35838
|
);
|
|
36029
35839
|
}
|
|
36030
35840
|
}),
|
|
36031
|
-
update:
|
|
35841
|
+
update: defineCommand122({
|
|
36032
35842
|
meta: { name: "update", description: "Stage a change to an existing custom event (pass its id)" },
|
|
36033
35843
|
args: {
|
|
36034
35844
|
id: { type: "positional", description: "Custom event rule id", required: false },
|
|
@@ -36047,7 +35857,7 @@ Examples:
|
|
|
36047
35857
|
});
|
|
36048
35858
|
}
|
|
36049
35859
|
}),
|
|
36050
|
-
delete:
|
|
35860
|
+
delete: defineCommand122({
|
|
36051
35861
|
meta: {
|
|
36052
35862
|
name: "delete",
|
|
36053
35863
|
description: "Stage removing a custom event (pass its id). The event stops being created from then on; data already collected under it stays. Confirm with the user first."
|
|
@@ -36102,7 +35912,7 @@ function booleanArg(input, flag) {
|
|
|
36102
35912
|
if (input === "false") return false;
|
|
36103
35913
|
return failValidation3(`--${flag} must be true or false`);
|
|
36104
35914
|
}
|
|
36105
|
-
var dataRetentionCommand =
|
|
35915
|
+
var dataRetentionCommand = defineCommand122({
|
|
36106
35916
|
meta: {
|
|
36107
35917
|
name: "data-retention",
|
|
36108
35918
|
description: `Stage a change to how long Google Analytics keeps data
|
|
@@ -36112,7 +35922,7 @@ Examples:
|
|
|
36112
35922
|
baker ga4 data-retention set --event-data 14 --user-data 14 --reset-on-activity true`
|
|
36113
35923
|
},
|
|
36114
35924
|
subCommands: {
|
|
36115
|
-
set:
|
|
35925
|
+
set: defineCommand122({
|
|
36116
35926
|
meta: { name: "set", description: "Stage the retention window (months)" },
|
|
36117
35927
|
args: {
|
|
36118
35928
|
"event-data": { type: "string", description: "2, 14, 26, 38 or 50", required: false },
|
|
@@ -36148,7 +35958,7 @@ registerSchema({
|
|
|
36148
35958
|
"property-id": { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false }
|
|
36149
35959
|
}
|
|
36150
35960
|
});
|
|
36151
|
-
var audienceCommand =
|
|
35961
|
+
var audienceCommand = defineCommand122({
|
|
36152
35962
|
meta: {
|
|
36153
35963
|
name: "audience",
|
|
36154
35964
|
description: `Stage audience changes (saved groups of users, for retargeting and analysis)
|
|
@@ -36180,7 +35990,7 @@ Examples:
|
|
|
36180
35990
|
baker ga4 audience archive 8813`
|
|
36181
35991
|
},
|
|
36182
35992
|
subCommands: {
|
|
36183
|
-
create:
|
|
35993
|
+
create: defineCommand122({
|
|
36184
35994
|
meta: { name: "create", description: createJsonDescription("audience") },
|
|
36185
35995
|
args: {
|
|
36186
35996
|
json: { type: "string", description: createJsonDescription("audience"), required: false },
|
|
@@ -36198,7 +36008,7 @@ Examples:
|
|
|
36198
36008
|
);
|
|
36199
36009
|
}
|
|
36200
36010
|
}),
|
|
36201
|
-
update:
|
|
36011
|
+
update: defineCommand122({
|
|
36202
36012
|
meta: {
|
|
36203
36013
|
name: "update",
|
|
36204
36014
|
description: "Stage a new name or description (pass the audience id). Who is in it cannot be changed."
|
|
@@ -36219,7 +36029,7 @@ Examples:
|
|
|
36219
36029
|
});
|
|
36220
36030
|
}
|
|
36221
36031
|
}),
|
|
36222
|
-
archive:
|
|
36032
|
+
archive: defineCommand122({
|
|
36223
36033
|
meta: {
|
|
36224
36034
|
name: "archive",
|
|
36225
36035
|
description: "Stage retiring an audience. Cannot be undone \u2014 the users it gathered do not come back."
|
|
@@ -36248,7 +36058,7 @@ registerSchema({
|
|
|
36248
36058
|
"property-id": { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false }
|
|
36249
36059
|
}
|
|
36250
36060
|
});
|
|
36251
|
-
var propertyCommand =
|
|
36061
|
+
var propertyCommand = defineCommand122({
|
|
36252
36062
|
meta: {
|
|
36253
36063
|
name: "property",
|
|
36254
36064
|
description: `Stage a change to the property's own settings
|
|
@@ -36258,7 +36068,7 @@ Examples:
|
|
|
36258
36068
|
baker ga4 property set --name "Acme \u2014 Web" --industry REAL_ESTATE`
|
|
36259
36069
|
},
|
|
36260
36070
|
subCommands: {
|
|
36261
|
-
set:
|
|
36071
|
+
set: defineCommand122({
|
|
36262
36072
|
meta: { name: "set", description: "Stage the property name and/or industry category" },
|
|
36263
36073
|
args: {
|
|
36264
36074
|
name: { type: "string", description: "New property display name", required: false },
|
|
@@ -36298,7 +36108,7 @@ registerSchema({
|
|
|
36298
36108
|
"property-id": { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false }
|
|
36299
36109
|
}
|
|
36300
36110
|
});
|
|
36301
|
-
var adsLinkCommand =
|
|
36111
|
+
var adsLinkCommand = defineCommand122({
|
|
36302
36112
|
meta: {
|
|
36303
36113
|
name: "ads-link",
|
|
36304
36114
|
description: `Stage linking this property to a Google Ads account
|
|
@@ -36313,7 +36123,7 @@ Examples:
|
|
|
36313
36123
|
baker ga4 ads-link delete L1234`
|
|
36314
36124
|
},
|
|
36315
36125
|
subCommands: {
|
|
36316
|
-
create:
|
|
36126
|
+
create: defineCommand122({
|
|
36317
36127
|
meta: { name: "create", description: "Stage linking the property to a Google Ads account" },
|
|
36318
36128
|
args: {
|
|
36319
36129
|
"customer-id": { type: "string", description: "Google Ads customer id (123-456-7890)", required: false },
|
|
@@ -36332,7 +36142,7 @@ Examples:
|
|
|
36332
36142
|
await stageOp3({ kind: "ga4.googleAdsLink.create", payload, ...withProperty(args) });
|
|
36333
36143
|
}
|
|
36334
36144
|
}),
|
|
36335
|
-
update:
|
|
36145
|
+
update: defineCommand122({
|
|
36336
36146
|
meta: {
|
|
36337
36147
|
name: "update",
|
|
36338
36148
|
description: "Stage the ads-personalisation setting on an existing link (pass its id)"
|
|
@@ -36354,7 +36164,7 @@ Examples:
|
|
|
36354
36164
|
});
|
|
36355
36165
|
}
|
|
36356
36166
|
}),
|
|
36357
|
-
delete:
|
|
36167
|
+
delete: defineCommand122({
|
|
36358
36168
|
meta: {
|
|
36359
36169
|
name: "delete",
|
|
36360
36170
|
description: "Stage unlinking. Stops conversion imports and strands every audience on this property."
|
|
@@ -36405,7 +36215,7 @@ var MEASUREMENT_FLAGS = {
|
|
|
36405
36215
|
"page-changes": "pageChangesEnabled",
|
|
36406
36216
|
"form-interactions": "formInteractionsEnabled"
|
|
36407
36217
|
};
|
|
36408
|
-
var enhancedMeasurementCommand =
|
|
36218
|
+
var enhancedMeasurementCommand = defineCommand122({
|
|
36409
36219
|
meta: {
|
|
36410
36220
|
name: "enhanced-measurement",
|
|
36411
36221
|
description: `Stage the automatic events GA4 collects on a website stream
|
|
@@ -36419,7 +36229,7 @@ Examples:
|
|
|
36419
36229
|
baker ga4 enhanced-measurement set --video false`
|
|
36420
36230
|
},
|
|
36421
36231
|
subCommands: {
|
|
36422
|
-
set:
|
|
36232
|
+
set: defineCommand122({
|
|
36423
36233
|
meta: { name: "set", description: "Stage which automatic events the website stream collects" },
|
|
36424
36234
|
args: {
|
|
36425
36235
|
scrolls: { type: "string", description: "true|false", required: false },
|
|
@@ -36462,7 +36272,7 @@ Examples:
|
|
|
36462
36272
|
});
|
|
36463
36273
|
|
|
36464
36274
|
// src/commands/ga4/index.ts
|
|
36465
|
-
var ga4Command =
|
|
36275
|
+
var ga4Command = defineCommand123({
|
|
36466
36276
|
meta: {
|
|
36467
36277
|
name: "ga4",
|
|
36468
36278
|
description: `Google Analytics 4. Report on a property, audit its config, and change what it measures.
|
|
@@ -36511,12 +36321,12 @@ Full guide: __tooling__/docs/tools/baker/ga4.md`
|
|
|
36511
36321
|
});
|
|
36512
36322
|
|
|
36513
36323
|
// src/commands/gsc/index.ts
|
|
36514
|
-
import { defineCommand as
|
|
36324
|
+
import { defineCommand as defineCommand127 } from "citty";
|
|
36515
36325
|
|
|
36516
36326
|
// src/commands/gsc/query.ts
|
|
36517
36327
|
import { appendFileSync as appendFileSync3, existsSync as existsSync8, readFileSync as readFileSync14, writeFileSync as writeFileSync5 } from "fs";
|
|
36518
36328
|
import { resolve as resolve3 } from "path";
|
|
36519
|
-
import { defineCommand as
|
|
36329
|
+
import { defineCommand as defineCommand124 } from "citty";
|
|
36520
36330
|
|
|
36521
36331
|
// src/commands/gsc/presets.ts
|
|
36522
36332
|
var GSC_PRESETS = [
|
|
@@ -36710,7 +36520,7 @@ function handleError4(err) {
|
|
|
36710
36520
|
});
|
|
36711
36521
|
process.exit(1);
|
|
36712
36522
|
}
|
|
36713
|
-
var queryCommand3 =
|
|
36523
|
+
var queryCommand3 = defineCommand124({
|
|
36714
36524
|
meta: {
|
|
36715
36525
|
name: "query",
|
|
36716
36526
|
description: `Run GSC Search Analytics queries. Preset-first with free-form escape hatch.
|
|
@@ -36788,7 +36598,7 @@ Free-form (escape hatch):
|
|
|
36788
36598
|
});
|
|
36789
36599
|
|
|
36790
36600
|
// src/commands/gsc/sitemaps.ts
|
|
36791
|
-
import { defineCommand as
|
|
36601
|
+
import { defineCommand as defineCommand125 } from "citty";
|
|
36792
36602
|
registerSchema({
|
|
36793
36603
|
command: "gsc.sitemaps",
|
|
36794
36604
|
description: "List sitemaps for a Search Console site. Check sitemap health and errors.",
|
|
@@ -36797,7 +36607,7 @@ registerSchema({
|
|
|
36797
36607
|
"no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false }
|
|
36798
36608
|
}
|
|
36799
36609
|
});
|
|
36800
|
-
var sitemapsCommand =
|
|
36610
|
+
var sitemapsCommand = defineCommand125({
|
|
36801
36611
|
meta: {
|
|
36802
36612
|
name: "sitemaps",
|
|
36803
36613
|
description: `List sitemaps for a site. Check health and errors.
|
|
@@ -36850,7 +36660,7 @@ Examples:
|
|
|
36850
36660
|
});
|
|
36851
36661
|
|
|
36852
36662
|
// src/commands/gsc/sites.ts
|
|
36853
|
-
import { defineCommand as
|
|
36663
|
+
import { defineCommand as defineCommand126 } from "citty";
|
|
36854
36664
|
registerSchema({
|
|
36855
36665
|
command: "gsc.sites",
|
|
36856
36666
|
description: "List the Search Console sites this company connected \u2014 there can be several, and every one of them is yours to query. Returns the site URLs the query and sitemaps commands take.",
|
|
@@ -36866,7 +36676,7 @@ function siteHints(sites) {
|
|
|
36866
36676
|
resources: sites.map((site) => ({ id: site.siteUrl, label: site.permissionLevel }))
|
|
36867
36677
|
});
|
|
36868
36678
|
}
|
|
36869
|
-
var sitesCommand =
|
|
36679
|
+
var sitesCommand = defineCommand126({
|
|
36870
36680
|
meta: {
|
|
36871
36681
|
name: "sites",
|
|
36872
36682
|
description: `List verified Search Console sites.
|
|
@@ -36914,7 +36724,7 @@ Examples:
|
|
|
36914
36724
|
});
|
|
36915
36725
|
|
|
36916
36726
|
// src/commands/gsc/index.ts
|
|
36917
|
-
var gscCommand =
|
|
36727
|
+
var gscCommand = defineCommand127({
|
|
36918
36728
|
meta: {
|
|
36919
36729
|
name: "gsc",
|
|
36920
36730
|
description: `Google Search Console commands. PPC-SEO arbitrage, brand halo analysis, negative keyword discovery.
|
|
@@ -36938,7 +36748,7 @@ Full guide: __tooling__/docs/tools/baker/gsc.md`
|
|
|
36938
36748
|
});
|
|
36939
36749
|
|
|
36940
36750
|
// src/commands/history/index.ts
|
|
36941
|
-
import { defineCommand as
|
|
36751
|
+
import { defineCommand as defineCommand128 } from "citty";
|
|
36942
36752
|
registerSchema({
|
|
36943
36753
|
command: "history.list",
|
|
36944
36754
|
description: "Start here: unified account history (audit log) \u2014 everything that changed on this account, newest first: publishes, chat lifecycle, backlog actions, team changes, setup links, tags, schedules, ad-platform writes, followed advertisers, media, creatives, reports, domains, and integrations. Use it to see what happened recently before planning work. Compact by default; add --full for raw metadata per entry.",
|
|
@@ -36993,7 +36803,7 @@ function parseBoundedInt2(raw, name, min, max) {
|
|
|
36993
36803
|
}
|
|
36994
36804
|
return value;
|
|
36995
36805
|
}
|
|
36996
|
-
var listCommand13 =
|
|
36806
|
+
var listCommand13 = defineCommand128({
|
|
36997
36807
|
meta: {
|
|
36998
36808
|
name: "list",
|
|
36999
36809
|
description: "List recent account changes (unified audit log), newest first."
|
|
@@ -37039,7 +36849,7 @@ var listCommand13 = defineCommand129({
|
|
|
37039
36849
|
}
|
|
37040
36850
|
}
|
|
37041
36851
|
});
|
|
37042
|
-
var historyCommand =
|
|
36852
|
+
var historyCommand = defineCommand128({
|
|
37043
36853
|
meta: {
|
|
37044
36854
|
name: "history",
|
|
37045
36855
|
description: `Unified account history (audit log): what changed, who did it, and when.
|
|
@@ -37049,7 +36859,7 @@ Full guide: __tooling__/docs/tools/baker/history.md`
|
|
|
37049
36859
|
});
|
|
37050
36860
|
|
|
37051
36861
|
// src/commands/hubspot/index.ts
|
|
37052
|
-
import { defineCommand as
|
|
36862
|
+
import { defineCommand as defineCommand129 } from "citty";
|
|
37053
36863
|
var EMBED_TYPES = ["legacy", "v4", "unknown"];
|
|
37054
36864
|
function failNotConnected(err) {
|
|
37055
36865
|
if (err instanceof ApiError && err.code === "FORBIDDEN" && err.message.includes(HUBSPOT_MISSING_GRANT_MARKER)) {
|
|
@@ -37203,7 +37013,7 @@ registerSchema({
|
|
|
37203
37013
|
}
|
|
37204
37014
|
}
|
|
37205
37015
|
});
|
|
37206
|
-
var formsListCommand =
|
|
37016
|
+
var formsListCommand = defineCommand129({
|
|
37207
37017
|
meta: {
|
|
37208
37018
|
name: "list",
|
|
37209
37019
|
description: "List HubSpot forms with embed type and post-submit action. Example: baker hubspot forms list --redirecting-only"
|
|
@@ -37248,7 +37058,7 @@ var formsListCommand = defineCommand130({
|
|
|
37248
37058
|
}
|
|
37249
37059
|
}
|
|
37250
37060
|
});
|
|
37251
|
-
var formsViewCommand =
|
|
37061
|
+
var formsViewCommand = defineCommand129({
|
|
37252
37062
|
meta: {
|
|
37253
37063
|
name: "view",
|
|
37254
37064
|
description: "Show one HubSpot form's fields and configuration. Example: baker hubspot forms view 1a2b3c"
|
|
@@ -37300,7 +37110,7 @@ var formsViewCommand = defineCommand130({
|
|
|
37300
37110
|
}
|
|
37301
37111
|
}
|
|
37302
37112
|
});
|
|
37303
|
-
var meetingsListCommand =
|
|
37113
|
+
var meetingsListCommand = defineCommand129({
|
|
37304
37114
|
meta: {
|
|
37305
37115
|
name: "list",
|
|
37306
37116
|
description: "List HubSpot meeting links (calendars). Example: baker hubspot meetings list"
|
|
@@ -37342,7 +37152,7 @@ var meetingsListCommand = defineCommand130({
|
|
|
37342
37152
|
}
|
|
37343
37153
|
}
|
|
37344
37154
|
});
|
|
37345
|
-
var meetingsViewCommand =
|
|
37155
|
+
var meetingsViewCommand = defineCommand129({
|
|
37346
37156
|
meta: {
|
|
37347
37157
|
name: "view",
|
|
37348
37158
|
description: "Show one HubSpot meeting link's booking fields. Example: baker hubspot meetings view discovery-call"
|
|
@@ -37386,7 +37196,7 @@ var meetingsViewCommand = defineCommand130({
|
|
|
37386
37196
|
}
|
|
37387
37197
|
}
|
|
37388
37198
|
});
|
|
37389
|
-
var formsSubmissionsCommand =
|
|
37199
|
+
var formsSubmissionsCommand = defineCommand129({
|
|
37390
37200
|
meta: {
|
|
37391
37201
|
name: "submissions",
|
|
37392
37202
|
description: "How many leads a form received, and when. Example: baker hubspot forms submissions <formId> --days 30"
|
|
@@ -37435,7 +37245,7 @@ var formsSubmissionsCommand = defineCommand130({
|
|
|
37435
37245
|
}
|
|
37436
37246
|
}
|
|
37437
37247
|
});
|
|
37438
|
-
var workflowsListCommand =
|
|
37248
|
+
var workflowsListCommand = defineCommand129({
|
|
37439
37249
|
meta: {
|
|
37440
37250
|
name: "list",
|
|
37441
37251
|
description: "List HubSpot workflows. Example: baker hubspot workflows list --enabled-only"
|
|
@@ -37500,7 +37310,7 @@ function workflowViewHints(workflow) {
|
|
|
37500
37310
|
}
|
|
37501
37311
|
return hints;
|
|
37502
37312
|
}
|
|
37503
|
-
var workflowsViewCommand =
|
|
37313
|
+
var workflowsViewCommand = defineCommand129({
|
|
37504
37314
|
meta: {
|
|
37505
37315
|
name: "view",
|
|
37506
37316
|
description: "Read one workflow's real configuration \u2014 enrolment, branches in order, and what each step writes. Example: baker hubspot workflows view 121183594 --full"
|
|
@@ -37527,7 +37337,7 @@ var workflowsViewCommand = defineCommand130({
|
|
|
37527
37337
|
}
|
|
37528
37338
|
}
|
|
37529
37339
|
});
|
|
37530
|
-
var pipelinesListCommand =
|
|
37340
|
+
var pipelinesListCommand = defineCommand129({
|
|
37531
37341
|
meta: {
|
|
37532
37342
|
name: "list",
|
|
37533
37343
|
description: "List HubSpot deal pipelines and their stages. Example: baker hubspot pipelines list"
|
|
@@ -37544,7 +37354,7 @@ var pipelinesListCommand = defineCommand130({
|
|
|
37544
37354
|
}
|
|
37545
37355
|
}
|
|
37546
37356
|
});
|
|
37547
|
-
var contactsSummaryCommand =
|
|
37357
|
+
var contactsSummaryCommand = defineCommand129({
|
|
37548
37358
|
meta: {
|
|
37549
37359
|
name: "summary",
|
|
37550
37360
|
description: "Whether recent leads are being worked, as counts. Example: baker hubspot contacts summary --days 30"
|
|
@@ -37614,7 +37424,7 @@ function contactLookupHints(data) {
|
|
|
37614
37424
|
}
|
|
37615
37425
|
return hints;
|
|
37616
37426
|
}
|
|
37617
|
-
var contactsLookupCommand =
|
|
37427
|
+
var contactsLookupCommand = defineCommand129({
|
|
37618
37428
|
meta: {
|
|
37619
37429
|
name: "lookup",
|
|
37620
37430
|
description: "Find one contact by email and see whether it was worked. Example: baker hubspot contacts lookup a@b.com"
|
|
@@ -37638,27 +37448,27 @@ var contactsLookupCommand = defineCommand130({
|
|
|
37638
37448
|
}
|
|
37639
37449
|
}
|
|
37640
37450
|
});
|
|
37641
|
-
var contactsCommand =
|
|
37451
|
+
var contactsCommand = defineCommand129({
|
|
37642
37452
|
meta: { name: "contacts", description: "Contacts on the connected HubSpot account." },
|
|
37643
37453
|
subCommands: { summary: contactsSummaryCommand, lookup: contactsLookupCommand }
|
|
37644
37454
|
});
|
|
37645
|
-
var formsCommand =
|
|
37455
|
+
var formsCommand = defineCommand129({
|
|
37646
37456
|
meta: { name: "forms", description: "HubSpot forms on the connected account." },
|
|
37647
37457
|
subCommands: { list: formsListCommand, view: formsViewCommand, submissions: formsSubmissionsCommand }
|
|
37648
37458
|
});
|
|
37649
|
-
var workflowsCommand =
|
|
37459
|
+
var workflowsCommand = defineCommand129({
|
|
37650
37460
|
meta: { name: "workflows", description: "HubSpot workflows on the connected account." },
|
|
37651
37461
|
subCommands: { list: workflowsListCommand, view: workflowsViewCommand }
|
|
37652
37462
|
});
|
|
37653
|
-
var pipelinesCommand =
|
|
37463
|
+
var pipelinesCommand = defineCommand129({
|
|
37654
37464
|
meta: { name: "pipelines", description: "HubSpot deal pipelines on the connected account." },
|
|
37655
37465
|
subCommands: { list: pipelinesListCommand }
|
|
37656
37466
|
});
|
|
37657
|
-
var meetingsCommand =
|
|
37467
|
+
var meetingsCommand = defineCommand129({
|
|
37658
37468
|
meta: { name: "meetings", description: "HubSpot meeting links (calendars) on the connected account." },
|
|
37659
37469
|
subCommands: { list: meetingsListCommand, view: meetingsViewCommand }
|
|
37660
37470
|
});
|
|
37661
|
-
var hubspotCommand =
|
|
37471
|
+
var hubspotCommand = defineCommand129({
|
|
37662
37472
|
meta: {
|
|
37663
37473
|
name: "hubspot",
|
|
37664
37474
|
description: `Read the connected HubSpot account \u2014 forms, the leads they received, workflows, deal pipelines and
|
|
@@ -37696,10 +37506,10 @@ Full guide: __tooling__/docs/tools/baker/hubspot.md`
|
|
|
37696
37506
|
});
|
|
37697
37507
|
|
|
37698
37508
|
// src/commands/images/index.ts
|
|
37699
|
-
import { defineCommand as
|
|
37509
|
+
import { defineCommand as defineCommand155 } from "citty";
|
|
37700
37510
|
|
|
37701
37511
|
// src/commands/images/crop.ts
|
|
37702
|
-
import { defineCommand as
|
|
37512
|
+
import { defineCommand as defineCommand130 } from "citty";
|
|
37703
37513
|
|
|
37704
37514
|
// src/lib/image/crop-sprite.ts
|
|
37705
37515
|
import sharp from "sharp";
|
|
@@ -37821,7 +37631,7 @@ function emitError2(err) {
|
|
|
37821
37631
|
}
|
|
37822
37632
|
process.exit(1);
|
|
37823
37633
|
}
|
|
37824
|
-
var cropCommand =
|
|
37634
|
+
var cropCommand = defineCommand130({
|
|
37825
37635
|
meta: {
|
|
37826
37636
|
name: "crop",
|
|
37827
37637
|
description: "Crop a rectangular region from an image.\n\nExample: baker images crop sprite.png --x 0 --y 0 --width 64 --height 64 --output icon.png"
|
|
@@ -37857,7 +37667,7 @@ var cropCommand = defineCommand131({
|
|
|
37857
37667
|
});
|
|
37858
37668
|
|
|
37859
37669
|
// src/commands/images/delete.ts
|
|
37860
|
-
import { defineCommand as
|
|
37670
|
+
import { defineCommand as defineCommand131 } from "citty";
|
|
37861
37671
|
registerSchema({
|
|
37862
37672
|
command: "images.delete",
|
|
37863
37673
|
description: "Delete an image by ID",
|
|
@@ -37871,7 +37681,7 @@ registerSchema({
|
|
|
37871
37681
|
}
|
|
37872
37682
|
}
|
|
37873
37683
|
});
|
|
37874
|
-
var deleteCommand2 =
|
|
37684
|
+
var deleteCommand2 = defineCommand131({
|
|
37875
37685
|
meta: {
|
|
37876
37686
|
name: "delete",
|
|
37877
37687
|
description: "Delete an image by ID. Use --dry-run to preview. Example: baker images delete j571abc123 --dry-run"
|
|
@@ -37912,7 +37722,7 @@ var deleteCommand2 = defineCommand132({
|
|
|
37912
37722
|
});
|
|
37913
37723
|
|
|
37914
37724
|
// src/commands/images/dimensions.ts
|
|
37915
|
-
import { defineCommand as
|
|
37725
|
+
import { defineCommand as defineCommand132 } from "citty";
|
|
37916
37726
|
|
|
37917
37727
|
// src/lib/image/dimensions.ts
|
|
37918
37728
|
import { imageSize } from "image-size";
|
|
@@ -37941,7 +37751,7 @@ registerSchema({
|
|
|
37941
37751
|
}
|
|
37942
37752
|
}
|
|
37943
37753
|
});
|
|
37944
|
-
var dimensionsCommand =
|
|
37754
|
+
var dimensionsCommand = defineCommand132({
|
|
37945
37755
|
meta: {
|
|
37946
37756
|
name: "dimensions",
|
|
37947
37757
|
description: "Read image dimensions without decoding the full file.\n\nExample: baker images dimensions ./logo.png\nExample: baker images dimensions https://acme.com/hero.png"
|
|
@@ -37997,7 +37807,7 @@ var dimensionsCommand = defineCommand133({
|
|
|
37997
37807
|
});
|
|
37998
37808
|
|
|
37999
37809
|
// src/commands/images/download.ts
|
|
38000
|
-
import { defineCommand as
|
|
37810
|
+
import { defineCommand as defineCommand133 } from "citty";
|
|
38001
37811
|
|
|
38002
37812
|
// src/commands/images/downloadPaths.ts
|
|
38003
37813
|
import { basename as basename2, extname as extname3, join as join6 } from "path";
|
|
@@ -38222,7 +38032,7 @@ function emitError3(err) {
|
|
|
38222
38032
|
writeJson({ ok: false, error: { code: "INTERNAL_ERROR", message: "Unexpected error" } });
|
|
38223
38033
|
process.exit(1);
|
|
38224
38034
|
}
|
|
38225
|
-
var downloadCommand =
|
|
38035
|
+
var downloadCommand = defineCommand133({
|
|
38226
38036
|
meta: {
|
|
38227
38037
|
name: "download",
|
|
38228
38038
|
description: "Download image URLs and/or library images to local files \u2014 the missing first half of `source \u2192 download \u2192 normalize \u2192 place`. Never use `curl` for this.\n\nExamples:\n baker images download https://media.withbaker.com/\u2026/logo.webp\n baker images download j57abc123 j57def456 --out src/pages/pricing/_images/\n baker images download https://\u2026/hero.png --out ./hero.png"
|
|
@@ -38255,7 +38065,7 @@ var downloadCommand = defineCommand134({
|
|
|
38255
38065
|
});
|
|
38256
38066
|
|
|
38257
38067
|
// src/commands/images/extract.ts
|
|
38258
|
-
import { defineCommand as
|
|
38068
|
+
import { defineCommand as defineCommand134 } from "citty";
|
|
38259
38069
|
|
|
38260
38070
|
// src/commands/images/autoIngest.ts
|
|
38261
38071
|
var AUTO_INGEST_MAX = {
|
|
@@ -38302,7 +38112,7 @@ registerSchema({
|
|
|
38302
38112
|
}
|
|
38303
38113
|
}
|
|
38304
38114
|
});
|
|
38305
|
-
var extractCommand =
|
|
38115
|
+
var extractCommand = defineCommand134({
|
|
38306
38116
|
meta: {
|
|
38307
38117
|
name: "extract",
|
|
38308
38118
|
description: "Pull every image from a single URL via Firecrawl. ~$0.001/scrape. Cap auto-ingest at 20.\n\nExample: baker images extract https://stripe.com --auto-ingest 5"
|
|
@@ -38357,7 +38167,7 @@ var extractCommand = defineCommand135({
|
|
|
38357
38167
|
});
|
|
38358
38168
|
|
|
38359
38169
|
// src/commands/images/find.ts
|
|
38360
|
-
import { defineCommand as
|
|
38170
|
+
import { defineCommand as defineCommand135 } from "citty";
|
|
38361
38171
|
|
|
38362
38172
|
// src/commands/images/providerHits.ts
|
|
38363
38173
|
function asRecord3(value) {
|
|
@@ -38495,7 +38305,7 @@ registerSchema({
|
|
|
38495
38305
|
full: { type: "boolean", description: "Include full metadata", required: false, default: false }
|
|
38496
38306
|
}
|
|
38497
38307
|
});
|
|
38498
|
-
var findCommand =
|
|
38308
|
+
var findCommand = defineCommand135({
|
|
38499
38309
|
meta: {
|
|
38500
38310
|
name: "find",
|
|
38501
38311
|
description: "Library-first fanout image search. Opt in to providers with --sources. `--fallback` short-circuits to externals only when library is thin. With --auto-ingest, ingested external hits return Baker-owned URLs.\n\nExample: baker images find 'office' --sources library,magnific --limit 20"
|
|
@@ -38568,7 +38378,7 @@ var findCommand = defineCommand136({
|
|
|
38568
38378
|
});
|
|
38569
38379
|
|
|
38570
38380
|
// src/commands/images/get.ts
|
|
38571
|
-
import { defineCommand as
|
|
38381
|
+
import { defineCommand as defineCommand136 } from "citty";
|
|
38572
38382
|
registerSchema({
|
|
38573
38383
|
command: "images.get",
|
|
38574
38384
|
description: "Get a single image by ID",
|
|
@@ -38576,7 +38386,7 @@ registerSchema({
|
|
|
38576
38386
|
id: { type: "string", description: "Image ID", required: true }
|
|
38577
38387
|
}
|
|
38578
38388
|
});
|
|
38579
|
-
var getCommand3 =
|
|
38389
|
+
var getCommand3 = defineCommand136({
|
|
38580
38390
|
meta: { name: "get", description: "Get a single image by ID. Example: baker images get j571abc123" },
|
|
38581
38391
|
args: {
|
|
38582
38392
|
id: { type: "positional", description: "Image ID", required: false },
|
|
@@ -38612,7 +38422,7 @@ var getCommand3 = defineCommand137({
|
|
|
38612
38422
|
});
|
|
38613
38423
|
|
|
38614
38424
|
// src/commands/images/gif.ts
|
|
38615
|
-
import { defineCommand as
|
|
38425
|
+
import { defineCommand as defineCommand137 } from "citty";
|
|
38616
38426
|
registerSchema({
|
|
38617
38427
|
command: "images.gif",
|
|
38618
38428
|
description: "Search Giphy for GIFs / reaction memes (paid social creative).",
|
|
@@ -38644,7 +38454,7 @@ registerSchema({
|
|
|
38644
38454
|
}
|
|
38645
38455
|
}
|
|
38646
38456
|
});
|
|
38647
|
-
var gifCommand =
|
|
38457
|
+
var gifCommand = defineCommand137({
|
|
38648
38458
|
meta: {
|
|
38649
38459
|
name: "gif",
|
|
38650
38460
|
description: "Search Giphy for GIFs / reaction memes \u2014 built for paid-social creative (Meta, TikTok, LinkedIn, X). Free API. Each hit carries WebP + GIF + MP4 URLs in providerMeta so you can pick the right format per platform.\n\nExample: baker images gif 'this is fine' --limit 10\nExample: baker images gif 'office reaction' --rating pg --auto-ingest 2\nExample: baker images gif --trending --limit 25"
|
|
@@ -38691,7 +38501,7 @@ var gifCommand = defineCommand138({
|
|
|
38691
38501
|
});
|
|
38692
38502
|
|
|
38693
38503
|
// src/commands/images/google.ts
|
|
38694
|
-
import { defineCommand as
|
|
38504
|
+
import { defineCommand as defineCommand138 } from "citty";
|
|
38695
38505
|
var GOOGLE_ERROR_FIX = {
|
|
38696
38506
|
action: "use_different_resource",
|
|
38697
38507
|
explanation: "Generate the asset instead of retrying Google. Google is the last-resort image provider. Run `baker studio generate` to make the asset. Never sleep-and-retry this command \u2014 the CLI already backs off on rate limits. If no image can be sourced, continue the rest of the task with a placeholder rather than aborting it."
|
|
@@ -38731,7 +38541,7 @@ registerSchema({
|
|
|
38731
38541
|
}
|
|
38732
38542
|
}
|
|
38733
38543
|
});
|
|
38734
|
-
var googleCommand2 =
|
|
38544
|
+
var googleCommand2 = defineCommand138({
|
|
38735
38545
|
meta: {
|
|
38736
38546
|
name: "google",
|
|
38737
38547
|
description: "Google Images via the official Custom Search JSON API ($0.005/query, free 100/day). \u26A0 Source unverified \u2014 watermarks, low-res, mislabeled results are common. Use as last resort. With --auto-ingest, ingested hits return Baker-owned URLs.\n\nExample: baker images google 'industrial workshop' --type photo --size large --limit 20"
|
|
@@ -38804,7 +38614,7 @@ var googleCommand2 = defineCommand139({
|
|
|
38804
38614
|
});
|
|
38805
38615
|
|
|
38806
38616
|
// src/commands/images/group.ts
|
|
38807
|
-
import { defineCommand as
|
|
38617
|
+
import { defineCommand as defineCommand139 } from "citty";
|
|
38808
38618
|
|
|
38809
38619
|
// src/commands/mediaGroup.ts
|
|
38810
38620
|
async function runMediaGroupLookup(input) {
|
|
@@ -38857,7 +38667,7 @@ registerSchema({
|
|
|
38857
38667
|
"group-key": { type: "string", description: "The set key directly, when you already have it", required: false }
|
|
38858
38668
|
}
|
|
38859
38669
|
});
|
|
38860
|
-
var groupCommand =
|
|
38670
|
+
var groupCommand = defineCommand139({
|
|
38861
38671
|
meta: {
|
|
38862
38672
|
name: "group",
|
|
38863
38673
|
description: "List every asset that arrived in the same set \u2014 the slides of one Instagram carousel, the images off one scraped page. Start here whenever a hit looks like part of a sequence: carousel slides are authored to be read in order and usually only make sense together. Takes an image or a video id, since one carousel can contain both. Example: baker images group <imageId>"
|
|
@@ -38877,7 +38687,7 @@ var groupCommand = defineCommand140({
|
|
|
38877
38687
|
});
|
|
38878
38688
|
|
|
38879
38689
|
// src/commands/images/icon.ts
|
|
38880
|
-
import { defineCommand as
|
|
38690
|
+
import { defineCommand as defineCommand140 } from "citty";
|
|
38881
38691
|
|
|
38882
38692
|
// src/commands/images/brandVerification.ts
|
|
38883
38693
|
function brandToken(domain) {
|
|
@@ -38974,7 +38784,7 @@ registerSchema({
|
|
|
38974
38784
|
full: { type: "boolean", description: "Include full metadata", required: false, default: false }
|
|
38975
38785
|
}
|
|
38976
38786
|
});
|
|
38977
|
-
var iconCommand =
|
|
38787
|
+
var iconCommand = defineCommand140({
|
|
38978
38788
|
meta: {
|
|
38979
38789
|
name: "icon",
|
|
38980
38790
|
description: "Icon via Iconify (simple-icons, logos, lucide, devicon, heroicons, tabler, phosphor, material-symbols, \u2026). Free CDN, no API key.\n\nExample: baker images icon react --set devicon\nExample: baker images icon lucide:check --color '#0a0a0a'"
|
|
@@ -39044,7 +38854,7 @@ var iconCommand = defineCommand141({
|
|
|
39044
38854
|
});
|
|
39045
38855
|
|
|
39046
38856
|
// src/commands/images/ingest.ts
|
|
39047
|
-
import { defineCommand as
|
|
38857
|
+
import { defineCommand as defineCommand141 } from "citty";
|
|
39048
38858
|
var SOURCE_VALUES = imageSourceSchema.options.join(" | ");
|
|
39049
38859
|
registerSchema({
|
|
39050
38860
|
command: "images.ingest",
|
|
@@ -39059,7 +38869,7 @@ registerSchema({
|
|
|
39059
38869
|
fields: { type: "string", description: "Comma-separated field names to include", required: false }
|
|
39060
38870
|
}
|
|
39061
38871
|
});
|
|
39062
|
-
var ingestCommand =
|
|
38872
|
+
var ingestCommand = defineCommand141({
|
|
39063
38873
|
meta: {
|
|
39064
38874
|
name: "ingest",
|
|
39065
38875
|
description: "Download a remote URL and store it in the library. Hash-deduped on bytes + externalId.\n\nExample: baker images ingest https://img.freepik.com/free-photo/xyz.jpg --source magnific --external-id 12345"
|
|
@@ -39128,7 +38938,7 @@ var ingestCommand = defineCommand142({
|
|
|
39128
38938
|
});
|
|
39129
38939
|
|
|
39130
38940
|
// src/commands/images/layerize.ts
|
|
39131
|
-
import { defineCommand as
|
|
38941
|
+
import { defineCommand as defineCommand142 } from "citty";
|
|
39132
38942
|
registerSchema({
|
|
39133
38943
|
command: "images.layerize",
|
|
39134
38944
|
description: "Split a library image into editable layers: transparent PNG cutouts for each element, plus any headline recovered as EDITABLE TEXT with its font, size, colour and position. Waits for completion by default. Costs credits.",
|
|
@@ -39192,7 +39002,7 @@ async function pollUntilSettled(imageId, maxWait) {
|
|
|
39192
39002
|
}
|
|
39193
39003
|
return null;
|
|
39194
39004
|
}
|
|
39195
|
-
var layerizeCommand =
|
|
39005
|
+
var layerizeCommand = defineCommand142({
|
|
39196
39006
|
meta: {
|
|
39197
39007
|
name: "layerize",
|
|
39198
39008
|
description: "Split a library image into editable layers \u2014 transparent cutouts per element, plus any baked-in headline recovered as editable text with its typography.\n\nStart here: baker images layerize j571abc123def\nExample: baker images layerize j571abc123def --full\nExample: baker images layerize j571abc123def --instructions 'keep the product and its shadow together'"
|
|
@@ -39261,7 +39071,7 @@ registerSchema({
|
|
|
39261
39071
|
full: { type: "boolean", description: "Include geometry and typography for every layer", required: false }
|
|
39262
39072
|
}
|
|
39263
39073
|
});
|
|
39264
|
-
var layersCommand =
|
|
39074
|
+
var layersCommand = defineCommand142({
|
|
39265
39075
|
meta: {
|
|
39266
39076
|
name: "layers",
|
|
39267
39077
|
description: "Read the layers of an image that has already been split. Free \u2014 no provider call.\n\nStart here: baker images layers j571abc123def\nExample: baker images layers j571abc123def --full"
|
|
@@ -39301,7 +39111,7 @@ var layersCommand = defineCommand143({
|
|
|
39301
39111
|
});
|
|
39302
39112
|
|
|
39303
39113
|
// src/commands/images/library.ts
|
|
39304
|
-
import { defineCommand as
|
|
39114
|
+
import { defineCommand as defineCommand143 } from "citty";
|
|
39305
39115
|
registerSchema({
|
|
39306
39116
|
command: "images.library",
|
|
39307
39117
|
description: "Search the company image library. Returns only ready images.",
|
|
@@ -39327,7 +39137,7 @@ registerSchema({
|
|
|
39327
39137
|
}
|
|
39328
39138
|
}
|
|
39329
39139
|
});
|
|
39330
|
-
var libraryCommand =
|
|
39140
|
+
var libraryCommand = defineCommand143({
|
|
39331
39141
|
meta: {
|
|
39332
39142
|
name: "library",
|
|
39333
39143
|
description: "Search the company image library (hybrid BM25 + vector + Cohere rerank). Use this BEFORE any external provider.\n\nExample: baker images library 'hero banner' --aspect-ratio 16:9 --source magnific"
|
|
@@ -39390,7 +39200,7 @@ var libraryCommand = defineCommand144({
|
|
|
39390
39200
|
});
|
|
39391
39201
|
|
|
39392
39202
|
// src/commands/images/logo.ts
|
|
39393
|
-
import { defineCommand as
|
|
39203
|
+
import { defineCommand as defineCommand144 } from "citty";
|
|
39394
39204
|
registerSchema({
|
|
39395
39205
|
command: "images.logo",
|
|
39396
39206
|
description: "Brand logo lookup via Brandfetch. Auto-ingests by default. Returns `brandMatch` \u2014 Brandfetch's own verdict on whose brand the domain is (confirmed | mismatch | unverified). Branch on it: `mismatch` means the mark is another company's, so do not place it. `confirmed` verifies the record, not the artwork \u2014 read the ingested row back to check the mark itself.",
|
|
@@ -39418,7 +39228,7 @@ registerSchema({
|
|
|
39418
39228
|
full: { type: "boolean", description: "Include full metadata", required: false, default: false }
|
|
39419
39229
|
}
|
|
39420
39230
|
});
|
|
39421
|
-
var logoCommand =
|
|
39231
|
+
var logoCommand = defineCommand144({
|
|
39422
39232
|
meta: {
|
|
39423
39233
|
name: "logo",
|
|
39424
39234
|
description: "Brand logo via Brandfetch. Returns up to 5 variants (icon, light/dark logo, light/dark symbol) plus `brandMatch`. Auto-ingests the first variant.\n\nStart here: check `brandMatch.verdict`.\n mismatch \u2192 the mark belongs to `brandMatch.name`, a different company. Do not place it.\n unverified \u2192 nothing confirmed whose logo this is. Treat as unchecked.\n confirmed \u2192 Brandfetch has this brand's record. That verifies the record, NOT the artwork \u2014 a confirmed domain has served another company's logo before.\n\n\u26A0 Whatever the verdict, read the ingested row back with `baker images get <imageId>` and check `textInImage`/`subject` before placing it. That is the only check that looks at the mark.\n\nExample: baker images logo stripe.com --variant logo"
|
|
@@ -39491,7 +39301,7 @@ var logoCommand = defineCommand145({
|
|
|
39491
39301
|
});
|
|
39492
39302
|
|
|
39493
39303
|
// src/commands/images/normalize.ts
|
|
39494
|
-
import { defineCommand as
|
|
39304
|
+
import { defineCommand as defineCommand145 } from "citty";
|
|
39495
39305
|
|
|
39496
39306
|
// src/lib/image/color-changer.ts
|
|
39497
39307
|
import quantize from "quantize";
|
|
@@ -40223,7 +40033,7 @@ function coerceRawArgs(args) {
|
|
|
40223
40033
|
"dry-run": bool(args["dry-run"])
|
|
40224
40034
|
};
|
|
40225
40035
|
}
|
|
40226
|
-
var normalizeCommand2 =
|
|
40036
|
+
var normalizeCommand2 = defineCommand145({
|
|
40227
40037
|
meta: {
|
|
40228
40038
|
name: "normalize",
|
|
40229
40039
|
description: `Normalize logos / images: declarative recolor + bg removal + trim + resize. Operates on local files; writes in-place by default.
|
|
@@ -40278,7 +40088,7 @@ Examples:
|
|
|
40278
40088
|
});
|
|
40279
40089
|
|
|
40280
40090
|
// src/commands/images/pinterest.ts
|
|
40281
|
-
import { defineCommand as
|
|
40091
|
+
import { defineCommand as defineCommand146 } from "citty";
|
|
40282
40092
|
registerSchema({
|
|
40283
40093
|
command: "images.pinterest",
|
|
40284
40094
|
description: "Pinterest image search via ScrapeCreators. Reference-grade real-world photography, product styling, interiors, fashion, food, and aesthetic mood boards. Inspect before placing \u2014 Pinterest is unverified, trademark-bearing web content.",
|
|
@@ -40298,7 +40108,7 @@ registerSchema({
|
|
|
40298
40108
|
}
|
|
40299
40109
|
}
|
|
40300
40110
|
});
|
|
40301
|
-
var pinterestCommand =
|
|
40111
|
+
var pinterestCommand = defineCommand146({
|
|
40302
40112
|
meta: {
|
|
40303
40113
|
name: "pinterest",
|
|
40304
40114
|
description: "Pinterest image search via ScrapeCreators ($0.00188/request). Best for photo-realistic reference imagery \u2014 lifestyle, interiors, fashion, food, product styling, and mood boards to brief AI generation against. \u26A0 Unverified, trademark-bearing web content \u2014 inspect and respect rights before placing on a customer page. Browse first; auto-ingest only the pins you commit to.\n\nExamples:\n baker images pinterest 'scandinavian living room'\n baker images pinterest 'minimalist skincare product photography' --limit 20\n baker images pinterest 'cozy coffee shop interior' --auto-ingest 2 --context 'Mood reference for hero photography'"
|
|
@@ -40355,7 +40165,7 @@ var pinterestCommand = defineCommand147({
|
|
|
40355
40165
|
});
|
|
40356
40166
|
|
|
40357
40167
|
// src/commands/images/screenshot.ts
|
|
40358
|
-
import { defineCommand as
|
|
40168
|
+
import { defineCommand as defineCommand147 } from "citty";
|
|
40359
40169
|
registerSchema({
|
|
40360
40170
|
command: "images.screenshot",
|
|
40361
40171
|
description: "Capture a website screenshot via ScreenshotOne. Auto-ingests on success.",
|
|
@@ -40374,7 +40184,7 @@ registerSchema({
|
|
|
40374
40184
|
full: { type: "boolean", description: "Include full metadata", required: false, default: false }
|
|
40375
40185
|
}
|
|
40376
40186
|
});
|
|
40377
|
-
var screenshotCommand =
|
|
40187
|
+
var screenshotCommand = defineCommand147({
|
|
40378
40188
|
meta: {
|
|
40379
40189
|
name: "screenshot",
|
|
40380
40190
|
description: "Screenshot a URL via ScreenshotOne. $0.009/capture. Auto-ingests to library.\n\nExample: baker images screenshot https://stripe.com --full-page"
|
|
@@ -40438,7 +40248,7 @@ var screenshotCommand = defineCommand148({
|
|
|
40438
40248
|
});
|
|
40439
40249
|
|
|
40440
40250
|
// src/commands/images/search.ts
|
|
40441
|
-
import { defineCommand as
|
|
40251
|
+
import { defineCommand as defineCommand148 } from "citty";
|
|
40442
40252
|
registerSchema({
|
|
40443
40253
|
command: "images.search",
|
|
40444
40254
|
description: "Search images by text query. Only returns ready images.",
|
|
@@ -40454,7 +40264,7 @@ registerSchema({
|
|
|
40454
40264
|
tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
|
|
40455
40265
|
}
|
|
40456
40266
|
});
|
|
40457
|
-
var searchCommand =
|
|
40267
|
+
var searchCommand = defineCommand148({
|
|
40458
40268
|
meta: {
|
|
40459
40269
|
name: "search",
|
|
40460
40270
|
description: "Semantic search images by text query. Uses hybrid BM25 + vector + reranking. Example: baker images search 'hero banner' --aspect-ratio 16:9 --tags logo"
|
|
@@ -40514,7 +40324,7 @@ var searchCommand = defineCommand149({
|
|
|
40514
40324
|
});
|
|
40515
40325
|
|
|
40516
40326
|
// src/commands/images/sticker.ts
|
|
40517
|
-
import { defineCommand as
|
|
40327
|
+
import { defineCommand as defineCommand149 } from "citty";
|
|
40518
40328
|
registerSchema({
|
|
40519
40329
|
command: "images.sticker",
|
|
40520
40330
|
description: "Search Giphy stickers \u2014 transparent-background overlays for ad creative.",
|
|
@@ -40546,7 +40356,7 @@ registerSchema({
|
|
|
40546
40356
|
}
|
|
40547
40357
|
}
|
|
40548
40358
|
});
|
|
40549
|
-
var stickerCommand =
|
|
40359
|
+
var stickerCommand = defineCommand149({
|
|
40550
40360
|
meta: {
|
|
40551
40361
|
name: "sticker",
|
|
40552
40362
|
description: "Search Giphy's sticker corpus \u2014 transparent-background WebPs / GIFs ideal for overlaying on ad creative (Meta, TikTok, Stories). Same Giphy free API as `baker images gif`; results carry WebP + GIF + MP4 URLs in providerMeta.\n\nExample: baker images sticker 'thumbs up' --limit 10\nExample: baker images sticker celebration --rating g --auto-ingest 3\nExample: baker images sticker --trending --limit 25"
|
|
@@ -40593,7 +40403,7 @@ var stickerCommand = defineCommand150({
|
|
|
40593
40403
|
});
|
|
40594
40404
|
|
|
40595
40405
|
// src/commands/images/stock.ts
|
|
40596
|
-
import { defineCommand as
|
|
40406
|
+
import { defineCommand as defineCommand150 } from "citty";
|
|
40597
40407
|
var STOCK_ERROR_FIX = {
|
|
40598
40408
|
action: "use_different_resource",
|
|
40599
40409
|
explanation: "Switch provider instead of retrying stock search. Stock search is one of several image sources. Run `baker images find <query> --sources library,pinterest,google` (`--sources` is required \u2014 `find` alone searches the library only) or `baker studio generate` to make the asset. Never sleep-and-retry this command \u2014 the CLI already backs off on rate limits. If no image can be sourced, continue the rest of the task with a placeholder rather than aborting it."
|
|
@@ -40670,7 +40480,7 @@ function buildStockRequest(query, args) {
|
|
|
40670
40480
|
if (args.context) body.descriptionContext = args.context;
|
|
40671
40481
|
return body;
|
|
40672
40482
|
}
|
|
40673
|
-
var stockCommand =
|
|
40483
|
+
var stockCommand = defineCommand150({
|
|
40674
40484
|
meta: {
|
|
40675
40485
|
name: "stock",
|
|
40676
40486
|
description: "Stock search via Magnific \u2014 Freepik's developer API (~250M assets: photos, vectors, illustrations, icons, PSDs). $0.002/req. With --auto-ingest, ingested hits return Baker-owned URLs.\n\nExamples:\n baker images stock 'minimalist office'\n baker images stock 'flat office workers' --type vector\n baker images stock 'hero photo of a kitchen' --type photo --orientation landscape --ai exclude\n baker images stock 'brand pattern' --color '#0a0a0a' --license freemium --auto-ingest 2"
|
|
@@ -40743,7 +40553,7 @@ var stockCommand = defineCommand151({
|
|
|
40743
40553
|
});
|
|
40744
40554
|
|
|
40745
40555
|
// src/lib/tags-command.ts
|
|
40746
|
-
import { defineCommand as
|
|
40556
|
+
import { defineCommand as defineCommand151 } from "citty";
|
|
40747
40557
|
function makeTagsCommand(command, label, endpoint) {
|
|
40748
40558
|
registerSchema({
|
|
40749
40559
|
command: `${command}.tags`,
|
|
@@ -40752,7 +40562,7 @@ function makeTagsCommand(command, label, endpoint) {
|
|
|
40752
40562
|
output: { type: "string", description: "Output format: md|json", required: false, default: "md" }
|
|
40753
40563
|
}
|
|
40754
40564
|
});
|
|
40755
|
-
return
|
|
40565
|
+
return defineCommand151({
|
|
40756
40566
|
meta: {
|
|
40757
40567
|
name: "tags",
|
|
40758
40568
|
description: `List the available ${label} tag names (defaults + company custom tags). Use before filtering with --tags. Example: baker ${command} tags`
|
|
@@ -40788,7 +40598,7 @@ function makeTagsCommand(command, label, endpoint) {
|
|
|
40788
40598
|
var tagsCommand3 = makeTagsCommand("images", "image", "/api/images/tags");
|
|
40789
40599
|
|
|
40790
40600
|
// src/commands/images/upload.ts
|
|
40791
|
-
import { defineCommand as
|
|
40601
|
+
import { defineCommand as defineCommand152 } from "citty";
|
|
40792
40602
|
registerSchema({
|
|
40793
40603
|
command: "images.upload",
|
|
40794
40604
|
description: "Upload an image to the library \u2014 local file path or remote http(s) URL.",
|
|
@@ -40826,7 +40636,7 @@ registerSchema({
|
|
|
40826
40636
|
function isRemoteUrl2(value) {
|
|
40827
40637
|
return /^https?:\/\//i.test(value);
|
|
40828
40638
|
}
|
|
40829
|
-
var uploadCommand =
|
|
40639
|
+
var uploadCommand = defineCommand152({
|
|
40830
40640
|
meta: {
|
|
40831
40641
|
name: "upload",
|
|
40832
40642
|
description: "Upload an image to the library \u2014 accepts a local file path OR a remote http(s) URL.\n\nLocal: reads bytes, sends to /api/images/upload, content-type auto-detected from extension.\nRemote: dispatches to /api/images/ingest with hash-dedup on bytes + externalId.\n\nExamples:\n baker images upload ./logo.png --source uploaded\n baker images upload ./cert.png --context 'ISO 27001 badge \u2014 enterprise tier'\n baker images upload https://acme.com/hero.png --source firecrawl --context 'Acme competitor pricing hero'"
|
|
@@ -40919,7 +40729,7 @@ async function uploadLocal(target, args) {
|
|
|
40919
40729
|
}
|
|
40920
40730
|
|
|
40921
40731
|
// src/commands/images/upscale.ts
|
|
40922
|
-
import { defineCommand as
|
|
40732
|
+
import { defineCommand as defineCommand153 } from "citty";
|
|
40923
40733
|
registerSchema({
|
|
40924
40734
|
command: "images.upscale",
|
|
40925
40735
|
description: "Upscale a library image via the backend (Replicate, cost-tracked). Waits for completion by default. The image must be status 'ready' and raster (not SVG/AVIF).",
|
|
@@ -40934,7 +40744,7 @@ registerSchema({
|
|
|
40934
40744
|
}
|
|
40935
40745
|
});
|
|
40936
40746
|
var POLL_INTERVAL_MS4 = 1500;
|
|
40937
|
-
var upscaleCommand =
|
|
40747
|
+
var upscaleCommand = defineCommand153({
|
|
40938
40748
|
meta: {
|
|
40939
40749
|
name: "upscale",
|
|
40940
40750
|
description: "Upscale a library image via the Convex backend (Replicate, cost-tracked at $0.05/image). Waits for completion by default.\n\nExample: baker images upscale j571abc123def\nExample: baker images upscale j571abc123def --max-wait 0 # fire-and-forget"
|
|
@@ -40989,7 +40799,7 @@ var upscaleCommand = defineCommand154({
|
|
|
40989
40799
|
});
|
|
40990
40800
|
|
|
40991
40801
|
// src/commands/images/use.ts
|
|
40992
|
-
import { defineCommand as
|
|
40802
|
+
import { defineCommand as defineCommand154 } from "citty";
|
|
40993
40803
|
registerSchema({
|
|
40994
40804
|
command: "images.use",
|
|
40995
40805
|
description: "Ingest a URL and wait for the library record to be ready.",
|
|
@@ -41018,7 +40828,7 @@ function emitReady(ingestResult, doc, args) {
|
|
|
41018
40828
|
args.full === true
|
|
41019
40829
|
);
|
|
41020
40830
|
}
|
|
41021
|
-
var useCommand =
|
|
40831
|
+
var useCommand = defineCommand154({
|
|
41022
40832
|
meta: {
|
|
41023
40833
|
name: "use",
|
|
41024
40834
|
description: "Sugar over `ingest`: download \u2192 store \u2192 wait until describe + embed complete \u2192 return ready library record.\n\nExample: baker images use https://cdn.example.com/hero.png --source uploaded"
|
|
@@ -41067,7 +40877,7 @@ var useCommand = defineCommand155({
|
|
|
41067
40877
|
});
|
|
41068
40878
|
|
|
41069
40879
|
// src/commands/images/index.ts
|
|
41070
|
-
var imagesCommand =
|
|
40880
|
+
var imagesCommand = defineCommand155({
|
|
41071
40881
|
meta: {
|
|
41072
40882
|
name: "images",
|
|
41073
40883
|
description: `Find, source, and normalize images. Subcommands route by provider so cost + license are explicit.
|
|
@@ -41145,12 +40955,12 @@ Full guide: __tooling__/docs/tools/baker/images.md`
|
|
|
41145
40955
|
});
|
|
41146
40956
|
|
|
41147
40957
|
// src/commands/landing/index.ts
|
|
41148
|
-
import { defineCommand as
|
|
40958
|
+
import { defineCommand as defineCommand166 } from "citty";
|
|
41149
40959
|
|
|
41150
40960
|
// src/commands/landing/critique.ts
|
|
41151
40961
|
import { readdir as readdir9, stat as stat6 } from "fs/promises";
|
|
41152
40962
|
import path29 from "path";
|
|
41153
|
-
import { defineCommand as
|
|
40963
|
+
import { defineCommand as defineCommand156 } from "citty";
|
|
41154
40964
|
|
|
41155
40965
|
// src/engine/landing/lib/constants.ts
|
|
41156
40966
|
var OVERUSED_FONTS = /* @__PURE__ */ new Set([
|
|
@@ -42326,14 +42136,14 @@ function parseCritiqueSlugs(args) {
|
|
|
42326
42136
|
const all = [args.slug, ...rest].filter((s) => typeof s === "string" && s.length > 0);
|
|
42327
42137
|
return [...new Set(all.map(String))];
|
|
42328
42138
|
}
|
|
42329
|
-
function
|
|
42139
|
+
function fail5(code, message, fix) {
|
|
42330
42140
|
process.stderr.write(
|
|
42331
42141
|
`${JSON.stringify({ ok: false, error: { code, message, ...fix ? { fix } : {} } }, null, 2)}
|
|
42332
42142
|
`
|
|
42333
42143
|
);
|
|
42334
42144
|
process.exit(2);
|
|
42335
42145
|
}
|
|
42336
|
-
var critiqueCommand2 =
|
|
42146
|
+
var critiqueCommand2 = defineCommand156({
|
|
42337
42147
|
meta: {
|
|
42338
42148
|
name: "critique",
|
|
42339
42149
|
description: "Start here: `baker landing critique <slug>` after building or editing a landing. Deterministic design-quality critic (ADVISORY \u2014 findings never fail it). Flags the known AI design tells (gradient text, overused fonts, side-tab borders, cream palettes, buzzword copy, broken images) tiered block/warn/advisory, respecting the client's BRAND.md as the allowlist. Also records the critique that publishing requires \u2014 run it before finishing a landing."
|
|
@@ -42351,14 +42161,14 @@ var critiqueCommand2 = defineCommand157({
|
|
|
42351
42161
|
const projectRoot = process.cwd();
|
|
42352
42162
|
for (const slug of slugs) {
|
|
42353
42163
|
if (!SLUG_RE.test(slug) || slug.includes("..")) {
|
|
42354
|
-
|
|
42164
|
+
fail5(
|
|
42355
42165
|
"INVALID_SLUG",
|
|
42356
42166
|
`"${slug}" is not a landing slug \u2014 use the folder name directly under src/pages/ (letters, digits, dashes; not a path, not a _-private folder).`,
|
|
42357
42167
|
{ availableSlugs: await listLandingSlugs(projectRoot) }
|
|
42358
42168
|
);
|
|
42359
42169
|
}
|
|
42360
42170
|
if (!await isDir(path29.resolve(projectRoot, "src", "pages", slug))) {
|
|
42361
|
-
|
|
42171
|
+
fail5("NOT_FOUND", `No landing at src/pages/${slug}/`, {
|
|
42362
42172
|
availableSlugs: await listLandingSlugs(projectRoot)
|
|
42363
42173
|
});
|
|
42364
42174
|
}
|
|
@@ -42442,10 +42252,10 @@ async function isDir(p) {
|
|
|
42442
42252
|
}
|
|
42443
42253
|
|
|
42444
42254
|
// src/commands/landing/inspiration/index.ts
|
|
42445
|
-
import { defineCommand as
|
|
42255
|
+
import { defineCommand as defineCommand165 } from "citty";
|
|
42446
42256
|
|
|
42447
42257
|
// src/commands/landing/inspiration/add.ts
|
|
42448
|
-
import { defineCommand as
|
|
42258
|
+
import { defineCommand as defineCommand157 } from "citty";
|
|
42449
42259
|
|
|
42450
42260
|
// src/commands/landing/inspiration/shared.ts
|
|
42451
42261
|
var INSPIRATION_HINTS = {
|
|
@@ -42527,7 +42337,7 @@ registerSchema({
|
|
|
42527
42337
|
note: { type: "string", description: "Why this page is worth keeping", required: false }
|
|
42528
42338
|
}
|
|
42529
42339
|
});
|
|
42530
|
-
var addCommand =
|
|
42340
|
+
var addCommand = defineCommand157({
|
|
42531
42341
|
meta: {
|
|
42532
42342
|
name: "add",
|
|
42533
42343
|
description: "Add someone else's landing page to the reference library. Example: baker landing inspiration add https://linear.app --note 'the client likes this density'"
|
|
@@ -42569,7 +42379,7 @@ var addCommand = defineCommand158({
|
|
|
42569
42379
|
// src/commands/landing/inspiration/code.ts
|
|
42570
42380
|
import { mkdir as mkdir10, writeFile as writeFile14 } from "fs/promises";
|
|
42571
42381
|
import path30 from "path";
|
|
42572
|
-
import { defineCommand as
|
|
42382
|
+
import { defineCommand as defineCommand158 } from "citty";
|
|
42573
42383
|
registerSchema({
|
|
42574
42384
|
command: "landing.inspiration.code",
|
|
42575
42385
|
description: "Write a reference section's standalone HTML+CSS to .baker/inspiration/<id>/ so you can read how it is built. Reference only \u2014 the structure is the lesson, the words are not yours to reuse. Consulting a section records it, and `baker landing critique` blocks a publish that ships its copy verbatim.",
|
|
@@ -42578,7 +42388,7 @@ registerSchema({
|
|
|
42578
42388
|
full: { type: "boolean", description: "Print the markup inline as well as writing it", required: false }
|
|
42579
42389
|
}
|
|
42580
42390
|
});
|
|
42581
|
-
var codeCommand =
|
|
42391
|
+
var codeCommand = defineCommand158({
|
|
42582
42392
|
meta: {
|
|
42583
42393
|
name: "code",
|
|
42584
42394
|
description: "Write one reference section's standalone markup to disk. Example: baker landing inspiration code k57abc\u2026 \u2014 read it for structure, then build your own."
|
|
@@ -42635,7 +42445,7 @@ var codeCommand = defineCommand159({
|
|
|
42635
42445
|
});
|
|
42636
42446
|
|
|
42637
42447
|
// src/commands/landing/inspiration/favorites.ts
|
|
42638
|
-
import { defineCommand as
|
|
42448
|
+
import { defineCommand as defineCommand159 } from "citty";
|
|
42639
42449
|
registerSchema({
|
|
42640
42450
|
command: "landing.inspiration.favorites",
|
|
42641
42451
|
description: "List the reference sections this company has saved. This is what `search` looks at by default, so it is the client's own taste profile \u2014 read it before proposing a direction.",
|
|
@@ -42649,7 +42459,7 @@ registerSchema({
|
|
|
42649
42459
|
}
|
|
42650
42460
|
}
|
|
42651
42461
|
});
|
|
42652
|
-
var favoritesCommand =
|
|
42462
|
+
var favoritesCommand = defineCommand159({
|
|
42653
42463
|
meta: {
|
|
42654
42464
|
name: "favorites",
|
|
42655
42465
|
description: "List this company's saved reference sections. Example: baker landing inspiration favorites --type hero,pricing"
|
|
@@ -42729,7 +42539,7 @@ registerSchema({
|
|
|
42729
42539
|
note: { type: "string", description: "Why this is worth keeping", required: false }
|
|
42730
42540
|
}
|
|
42731
42541
|
});
|
|
42732
|
-
var favoriteCommand =
|
|
42542
|
+
var favoriteCommand = defineCommand159({
|
|
42733
42543
|
meta: {
|
|
42734
42544
|
name: "favorite",
|
|
42735
42545
|
description: "Save a reference section to this company. Example: baker landing inspiration favorite k57abc\u2026"
|
|
@@ -42767,7 +42577,7 @@ registerSchema({
|
|
|
42767
42577
|
page: { type: "boolean", description: "Treat the id as a page rather than a section", required: false }
|
|
42768
42578
|
}
|
|
42769
42579
|
});
|
|
42770
|
-
var unfavoriteCommand =
|
|
42580
|
+
var unfavoriteCommand = defineCommand159({
|
|
42771
42581
|
meta: {
|
|
42772
42582
|
name: "unfavorite",
|
|
42773
42583
|
description: "Remove a reference section from this company's saved set. Example: baker landing inspiration unfavorite k57abc\u2026"
|
|
@@ -42789,7 +42599,7 @@ var unfavoriteCommand = defineCommand160({
|
|
|
42789
42599
|
});
|
|
42790
42600
|
|
|
42791
42601
|
// src/commands/landing/inspiration/page.ts
|
|
42792
|
-
import { defineCommand as
|
|
42602
|
+
import { defineCommand as defineCommand160 } from "citty";
|
|
42793
42603
|
registerSchema({
|
|
42794
42604
|
command: "landing.inspiration.page",
|
|
42795
42605
|
description: "Show a whole reference page as a sequence: every section top to bottom with its type and the idea behind it. This is the view to use when the question is how a good page is ORDERED rather than what one section looks like.",
|
|
@@ -42806,7 +42616,7 @@ registerSchema({
|
|
|
42806
42616
|
}
|
|
42807
42617
|
}
|
|
42808
42618
|
});
|
|
42809
|
-
var pageCommand2 =
|
|
42619
|
+
var pageCommand2 = defineCommand160({
|
|
42810
42620
|
meta: {
|
|
42811
42621
|
name: "page",
|
|
42812
42622
|
description: "Show how a reference page sequences its sections. Example: baker landing inspiration page j91xyz\u2026 \u2014 the blueprint, not the pixels."
|
|
@@ -42871,7 +42681,7 @@ var pageCommand2 = defineCommand161({
|
|
|
42871
42681
|
// src/commands/landing/inspiration/scrape.ts
|
|
42872
42682
|
import { readFile as readFile23 } from "fs/promises";
|
|
42873
42683
|
import path33 from "path";
|
|
42874
|
-
import { defineCommand as
|
|
42684
|
+
import { defineCommand as defineCommand161 } from "citty";
|
|
42875
42685
|
|
|
42876
42686
|
// src/engine/landing/lib/capturedReferences.ts
|
|
42877
42687
|
var MAX_STRINGS_PER_SECTION = 40;
|
|
@@ -45012,7 +44822,7 @@ registerSchema({
|
|
|
45012
44822
|
report: { type: "boolean", description: "Write report.html. `--no-report` to skip", required: false }
|
|
45013
44823
|
}
|
|
45014
44824
|
});
|
|
45015
|
-
var scrapeCommand =
|
|
44825
|
+
var scrapeCommand = defineCommand161({
|
|
45016
44826
|
meta: {
|
|
45017
44827
|
name: "scrape",
|
|
45018
44828
|
description: "Capture a landing page to a directory, now. Example: baker landing inspiration scrape https://linear.app --out .baker/inspiration/linear.app"
|
|
@@ -45114,7 +44924,7 @@ var scrapeCommand = defineCommand162({
|
|
|
45114
44924
|
|
|
45115
44925
|
// src/commands/landing/inspiration/search.ts
|
|
45116
44926
|
import path35 from "path";
|
|
45117
|
-
import { defineCommand as
|
|
44927
|
+
import { defineCommand as defineCommand162 } from "citty";
|
|
45118
44928
|
|
|
45119
44929
|
// src/commands/landing/inspiration/shot.ts
|
|
45120
44930
|
import { mkdir as mkdir12, writeFile as writeFile17 } from "fs/promises";
|
|
@@ -45251,7 +45061,7 @@ async function downloadShots(results) {
|
|
|
45251
45061
|
);
|
|
45252
45062
|
return saved;
|
|
45253
45063
|
}
|
|
45254
|
-
var searchCommand2 =
|
|
45064
|
+
var searchCommand2 = defineCommand162({
|
|
45255
45065
|
meta: {
|
|
45256
45066
|
name: "search",
|
|
45257
45067
|
description: "Search real landing-page sections for reference. Example: baker landing inspiration search 'dark developer hero with a terminal' --register dev-tool-minimal --scope all"
|
|
@@ -45349,7 +45159,7 @@ var searchCommand2 = defineCommand163({
|
|
|
45349
45159
|
});
|
|
45350
45160
|
|
|
45351
45161
|
// src/commands/landing/inspiration/sequences.ts
|
|
45352
|
-
import { defineCommand as
|
|
45162
|
+
import { defineCommand as defineCommand163 } from "citty";
|
|
45353
45163
|
var COMPACT_TRANSITIONS = 12;
|
|
45354
45164
|
var COMPACT_ENDS = 5;
|
|
45355
45165
|
var MAX_PAGES = 50;
|
|
@@ -45423,7 +45233,7 @@ function sequencesHints(data, { scope, full }) {
|
|
|
45423
45233
|
if (scope === "favorites") hints.push(...favoritesScopeHints(data.favoritesHealth, data.pagesReturned));
|
|
45424
45234
|
return hints;
|
|
45425
45235
|
}
|
|
45426
|
-
var sequencesCommand =
|
|
45236
|
+
var sequencesCommand = defineCommand163({
|
|
45427
45237
|
meta: {
|
|
45428
45238
|
name: "sequences",
|
|
45429
45239
|
description: "What section follows what, across many real pages at once. Example: baker landing inspiration sequences 'developer tool pricing page' --scope all \u2014 the evidence for how to order a page you are about to build."
|
|
@@ -45473,7 +45283,7 @@ var sequencesCommand = defineCommand164({
|
|
|
45473
45283
|
|
|
45474
45284
|
// src/commands/landing/inspiration/view.ts
|
|
45475
45285
|
import path36 from "path";
|
|
45476
|
-
import { defineCommand as
|
|
45286
|
+
import { defineCommand as defineCommand164 } from "citty";
|
|
45477
45287
|
registerSchema({
|
|
45478
45288
|
command: "landing.inspiration.view",
|
|
45479
45289
|
description: "Everything known about one section: composition, motion, design tokens, the copy it uses, why it works, and what must change to make it yours. Downloads the desktop and mobile screenshots plus the motion filmstrip so you can look at them.",
|
|
@@ -45486,7 +45296,7 @@ registerSchema({
|
|
|
45486
45296
|
}
|
|
45487
45297
|
}
|
|
45488
45298
|
});
|
|
45489
|
-
var viewCommand2 =
|
|
45299
|
+
var viewCommand2 = defineCommand164({
|
|
45490
45300
|
meta: {
|
|
45491
45301
|
name: "view",
|
|
45492
45302
|
description: "Full detail for one reference section. Example: baker landing inspiration view k57abc\u2026 \u2014 read the screenshots it saves before you build."
|
|
@@ -45570,7 +45380,7 @@ var viewCommand2 = defineCommand165({
|
|
|
45570
45380
|
});
|
|
45571
45381
|
|
|
45572
45382
|
// src/commands/landing/inspiration/index.ts
|
|
45573
|
-
var inspirationCommand =
|
|
45383
|
+
var inspirationCommand = defineCommand165({
|
|
45574
45384
|
meta: {
|
|
45575
45385
|
name: "inspiration",
|
|
45576
45386
|
description: `Reference library of real landing-page sections \u2014 look at how good pages actually solve a problem before you design one.
|
|
@@ -45615,7 +45425,7 @@ Full guide: __tooling__/docs/tools/baker/landing.md`
|
|
|
45615
45425
|
});
|
|
45616
45426
|
|
|
45617
45427
|
// src/commands/landing/index.ts
|
|
45618
|
-
var landingCommand =
|
|
45428
|
+
var landingCommand = defineCommand166({
|
|
45619
45429
|
meta: {
|
|
45620
45430
|
name: "landing",
|
|
45621
45431
|
description: `Design-quality tools for landing pages (src/pages/<slug>/).
|
|
@@ -45633,7 +45443,7 @@ Subcommands:
|
|
|
45633
45443
|
});
|
|
45634
45444
|
|
|
45635
45445
|
// src/commands/mcp/index.ts
|
|
45636
|
-
import { defineCommand as
|
|
45446
|
+
import { defineCommand as defineCommand167 } from "citty";
|
|
45637
45447
|
|
|
45638
45448
|
// src/commands/mcp/platforms.ts
|
|
45639
45449
|
function readsKey(label) {
|
|
@@ -45688,7 +45498,7 @@ function parseHeaders(raw) {
|
|
|
45688
45498
|
}
|
|
45689
45499
|
return Object.keys(headers).length > 0 ? headers : void 0;
|
|
45690
45500
|
}
|
|
45691
|
-
function
|
|
45501
|
+
function fail6(err) {
|
|
45692
45502
|
if (err instanceof ApiError) {
|
|
45693
45503
|
writeJson({ ok: false, error: { code: err.code, message: err.message } });
|
|
45694
45504
|
process.exit(1);
|
|
@@ -45702,7 +45512,7 @@ registerSchema({
|
|
|
45702
45512
|
description: "List everything this chat can reach: managed integrations (Attio, Slack, Gmail, Google Sheets, \u2026), custom MCP servers, and the platforms the company signed in to (HubSpot, Google Ads, GA4, Search Console, Tag Manager) which you read through their own `baker` commands. Start here when the user mentions an external tool or platform.",
|
|
45703
45513
|
args: {}
|
|
45704
45514
|
});
|
|
45705
|
-
var connectedCommand =
|
|
45515
|
+
var connectedCommand = defineCommand167({
|
|
45706
45516
|
meta: {
|
|
45707
45517
|
name: "connected",
|
|
45708
45518
|
description: `Everything this chat can reach \u2014 managed integrations, custom MCP servers, and connected platforms.
|
|
@@ -45752,7 +45562,7 @@ A tool or platform the user names that is NOT listed anywhere here is simply not
|
|
|
45752
45562
|
hints
|
|
45753
45563
|
});
|
|
45754
45564
|
} catch (err) {
|
|
45755
|
-
|
|
45565
|
+
fail6(err);
|
|
45756
45566
|
}
|
|
45757
45567
|
}
|
|
45758
45568
|
});
|
|
@@ -45761,7 +45571,7 @@ registerSchema({
|
|
|
45761
45571
|
description: "List the custom MCP servers this company's chats see (org + company + your own user scope).",
|
|
45762
45572
|
args: {}
|
|
45763
45573
|
});
|
|
45764
|
-
var listCommand14 =
|
|
45574
|
+
var listCommand14 = defineCommand167({
|
|
45765
45575
|
meta: { name: "list", description: "List custom MCP servers visible to this company's chats." },
|
|
45766
45576
|
run: async () => {
|
|
45767
45577
|
try {
|
|
@@ -45780,7 +45590,7 @@ var listCommand14 = defineCommand168({
|
|
|
45780
45590
|
} : {}
|
|
45781
45591
|
});
|
|
45782
45592
|
} catch (err) {
|
|
45783
|
-
|
|
45593
|
+
fail6(err);
|
|
45784
45594
|
}
|
|
45785
45595
|
}
|
|
45786
45596
|
});
|
|
@@ -45798,7 +45608,7 @@ registerSchema({
|
|
|
45798
45608
|
header: { type: "string", description: 'Auth header "Key: Value" (repeatable)', required: false }
|
|
45799
45609
|
}
|
|
45800
45610
|
});
|
|
45801
|
-
var addCommand2 =
|
|
45611
|
+
var addCommand2 = defineCommand167({
|
|
45802
45612
|
meta: {
|
|
45803
45613
|
name: "add",
|
|
45804
45614
|
description: `Register a custom MCP server. Tools appear as mcp__<name>__* on the NEXT message.
|
|
@@ -45841,7 +45651,7 @@ Examples:
|
|
|
45841
45651
|
]
|
|
45842
45652
|
});
|
|
45843
45653
|
} catch (err) {
|
|
45844
|
-
|
|
45654
|
+
fail6(err);
|
|
45845
45655
|
}
|
|
45846
45656
|
}
|
|
45847
45657
|
});
|
|
@@ -45850,7 +45660,7 @@ registerSchema({
|
|
|
45850
45660
|
description: "Remove a company custom MCP server by name.",
|
|
45851
45661
|
args: { name: { type: "string", description: "Server name to remove", required: true } }
|
|
45852
45662
|
});
|
|
45853
|
-
var removeCommand4 =
|
|
45663
|
+
var removeCommand4 = defineCommand167({
|
|
45854
45664
|
meta: {
|
|
45855
45665
|
name: "remove",
|
|
45856
45666
|
description: `Remove a company custom MCP server by name.
|
|
@@ -45868,11 +45678,11 @@ Example:
|
|
|
45868
45678
|
});
|
|
45869
45679
|
writeJson({ ok: true, data });
|
|
45870
45680
|
} catch (err) {
|
|
45871
|
-
|
|
45681
|
+
fail6(err);
|
|
45872
45682
|
}
|
|
45873
45683
|
}
|
|
45874
45684
|
});
|
|
45875
|
-
var mcpCommand =
|
|
45685
|
+
var mcpCommand = defineCommand167({
|
|
45876
45686
|
meta: {
|
|
45877
45687
|
name: "mcp",
|
|
45878
45688
|
description: `Third-party tools for this company \u2014 see what's connected, register custom HTTPS MCP endpoints.
|
|
@@ -45898,10 +45708,10 @@ Full guide: __tooling__/docs/tools/baker/mcp.md`
|
|
|
45898
45708
|
});
|
|
45899
45709
|
|
|
45900
45710
|
// src/commands/research/index.ts
|
|
45901
|
-
import { defineCommand as
|
|
45711
|
+
import { defineCommand as defineCommand179 } from "citty";
|
|
45902
45712
|
|
|
45903
45713
|
// src/commands/research/advertisers.ts
|
|
45904
|
-
import { defineCommand as
|
|
45714
|
+
import { defineCommand as defineCommand168 } from "citty";
|
|
45905
45715
|
|
|
45906
45716
|
// src/commands/research/hints.ts
|
|
45907
45717
|
var AD_COPY_ROUTE = 'This returns competing DOMAINS and their SERP economics \u2014 no ad copy, no headlines, no creative. For the actual copy of a competitor\'s ads: `baker winning-ads advertisers "<brand>"` \u2192 `baker winning-ads search "<brief>" --advertiser-id <id>` \u2192 `baker winning-ads content <adId>` (`primary_text` / `headline` / `cta`, plus the spoken transcript and on-screen text for video). That corpus is Meta and LinkedIn only \u2014 Google SERP ad copy is not available through any Baker command, so do not keep querying for it here.';
|
|
@@ -46084,7 +45894,7 @@ var FIELDS3 = {
|
|
|
46084
45894
|
etv: "Estimated traffic value (USD)",
|
|
46085
45895
|
visibility: "SERP visibility score (0-1)"
|
|
46086
45896
|
};
|
|
46087
|
-
var advertisersCommand =
|
|
45897
|
+
var advertisersCommand = defineCommand168({
|
|
46088
45898
|
meta: {
|
|
46089
45899
|
name: "advertisers",
|
|
46090
45900
|
description: `Domains competing for a keyword in Google SERPs, with position, relevance, traffic value and visibility. Returns NO ad copy \u2014 for a competitor's headlines and body copy use \`baker winning-ads content <adId>\` (Meta/LinkedIn only).
|
|
@@ -46140,7 +45950,7 @@ Examples:
|
|
|
46140
45950
|
});
|
|
46141
45951
|
|
|
46142
45952
|
// src/commands/research/autocomplete.ts
|
|
46143
|
-
import { defineCommand as
|
|
45953
|
+
import { defineCommand as defineCommand169 } from "citty";
|
|
46144
45954
|
registerSchema({
|
|
46145
45955
|
command: "research.autocomplete",
|
|
46146
45956
|
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).",
|
|
@@ -46163,7 +45973,7 @@ registerSchema({
|
|
|
46163
45973
|
var FIELDS4 = {
|
|
46164
45974
|
suggestion: "Autocomplete suggestion from Google"
|
|
46165
45975
|
};
|
|
46166
|
-
var autocompleteCommand =
|
|
45976
|
+
var autocompleteCommand = defineCommand169({
|
|
46167
45977
|
meta: {
|
|
46168
45978
|
name: "autocomplete",
|
|
46169
45979
|
description: `Get Google Autocomplete suggestions for keyword expansion.
|
|
@@ -46218,7 +46028,7 @@ Examples:
|
|
|
46218
46028
|
});
|
|
46219
46029
|
|
|
46220
46030
|
// src/commands/research/countries.ts
|
|
46221
|
-
import { defineCommand as
|
|
46031
|
+
import { defineCommand as defineCommand170 } from "citty";
|
|
46222
46032
|
registerSchema({
|
|
46223
46033
|
command: "research.countries",
|
|
46224
46034
|
description: "List all supported country codes for --location flag in research commands.",
|
|
@@ -46275,7 +46085,7 @@ var FIELDS5 = {
|
|
|
46275
46085
|
code: "Country code to pass as --location",
|
|
46276
46086
|
name: "Country name"
|
|
46277
46087
|
};
|
|
46278
|
-
var countriesCommand =
|
|
46088
|
+
var countriesCommand = defineCommand170({
|
|
46279
46089
|
meta: {
|
|
46280
46090
|
name: "countries",
|
|
46281
46091
|
description: "List all supported country codes for --location flag."
|
|
@@ -46286,7 +46096,7 @@ var countriesCommand = defineCommand171({
|
|
|
46286
46096
|
});
|
|
46287
46097
|
|
|
46288
46098
|
// src/commands/research/fetch.ts
|
|
46289
|
-
import { defineCommand as
|
|
46099
|
+
import { defineCommand as defineCommand171 } from "citty";
|
|
46290
46100
|
var CONTENT_PREVIEW_CHARS = 2e4;
|
|
46291
46101
|
var TIMEOUT_MS = 18e4;
|
|
46292
46102
|
registerSchema({
|
|
@@ -46359,7 +46169,7 @@ function fetchFix(code) {
|
|
|
46359
46169
|
explanation: "This read failed. Don't build a retry ladder around it \u2014 finish the rest of the job with what you can reach and name this page as a gap."
|
|
46360
46170
|
};
|
|
46361
46171
|
}
|
|
46362
|
-
var fetchCommand =
|
|
46172
|
+
var fetchCommand = defineCommand171({
|
|
46363
46173
|
meta: {
|
|
46364
46174
|
name: "fetch",
|
|
46365
46175
|
description: `Read a page an ordinary web fetch could not. Bot walls and JavaScript-rendered pages are resolved for you \u2014 you never have to retry, wait, or drive a browser yourself.
|
|
@@ -46436,7 +46246,7 @@ Examples:
|
|
|
46436
46246
|
});
|
|
46437
46247
|
|
|
46438
46248
|
// src/commands/research/intent.ts
|
|
46439
|
-
import { defineCommand as
|
|
46249
|
+
import { defineCommand as defineCommand172 } from "citty";
|
|
46440
46250
|
registerSchema({
|
|
46441
46251
|
command: "research.intent",
|
|
46442
46252
|
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.",
|
|
@@ -46459,7 +46269,7 @@ var FIELDS7 = {
|
|
|
46459
46269
|
intent: "Primary Google Search intent: informational, navigational, commercial, transactional",
|
|
46460
46270
|
probability: "Confidence score 0.0-1.0"
|
|
46461
46271
|
};
|
|
46462
|
-
var intentCommand =
|
|
46272
|
+
var intentCommand = defineCommand172({
|
|
46463
46273
|
meta: {
|
|
46464
46274
|
name: "intent",
|
|
46465
46275
|
description: `Classify Google Search intent for keywords. Returns intent type and confidence.
|
|
@@ -46507,7 +46317,7 @@ Examples:
|
|
|
46507
46317
|
});
|
|
46508
46318
|
|
|
46509
46319
|
// src/commands/research/keyword-gap.ts
|
|
46510
|
-
import { defineCommand as
|
|
46320
|
+
import { defineCommand as defineCommand173 } from "citty";
|
|
46511
46321
|
registerSchema({
|
|
46512
46322
|
command: "research.keyword-gap",
|
|
46513
46323
|
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.",
|
|
@@ -46536,7 +46346,7 @@ var FIELDS8 = {
|
|
|
46536
46346
|
cpc: "Cost per click USD",
|
|
46537
46347
|
their_position: "Competitor's ranking position"
|
|
46538
46348
|
};
|
|
46539
|
-
var keywordGapCommand =
|
|
46349
|
+
var keywordGapCommand = defineCommand173({
|
|
46540
46350
|
meta: {
|
|
46541
46351
|
name: "keyword-gap",
|
|
46542
46352
|
description: `Find keywords a competitor has that you don't. Supports pagination via --offset.
|
|
@@ -46611,7 +46421,7 @@ Examples:
|
|
|
46611
46421
|
});
|
|
46612
46422
|
|
|
46613
46423
|
// src/commands/research/keywords-for-site.ts
|
|
46614
|
-
import { defineCommand as
|
|
46424
|
+
import { defineCommand as defineCommand174 } from "citty";
|
|
46615
46425
|
registerSchema({
|
|
46616
46426
|
command: "research.keywords-for-site",
|
|
46617
46427
|
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.",
|
|
@@ -46644,7 +46454,7 @@ var FIELDS9 = {
|
|
|
46644
46454
|
competition: "LOW, MEDIUM, or HIGH",
|
|
46645
46455
|
competition_index: "Competition score 0-100"
|
|
46646
46456
|
};
|
|
46647
|
-
var keywordsForSiteCommand =
|
|
46457
|
+
var keywordsForSiteCommand = defineCommand174({
|
|
46648
46458
|
meta: {
|
|
46649
46459
|
name: "keywords-for-site",
|
|
46650
46460
|
description: `Get keywords a competitor targets in Google. Use --type to filter paid/organic.
|
|
@@ -46706,7 +46516,7 @@ Examples:
|
|
|
46706
46516
|
});
|
|
46707
46517
|
|
|
46708
46518
|
// src/commands/research/languages.ts
|
|
46709
|
-
import { defineCommand as
|
|
46519
|
+
import { defineCommand as defineCommand175 } from "citty";
|
|
46710
46520
|
registerSchema({
|
|
46711
46521
|
command: "research.languages",
|
|
46712
46522
|
description: "List all supported language codes for --language flag in research commands.",
|
|
@@ -46736,7 +46546,7 @@ var FIELDS10 = {
|
|
|
46736
46546
|
code: "Language code to pass as --language",
|
|
46737
46547
|
name: "Language name (also accepted by --language)"
|
|
46738
46548
|
};
|
|
46739
|
-
var languagesCommand2 =
|
|
46549
|
+
var languagesCommand2 = defineCommand175({
|
|
46740
46550
|
meta: {
|
|
46741
46551
|
name: "languages",
|
|
46742
46552
|
description: "List all supported language codes for --language flag."
|
|
@@ -46747,7 +46557,7 @@ var languagesCommand2 = defineCommand176({
|
|
|
46747
46557
|
});
|
|
46748
46558
|
|
|
46749
46559
|
// src/commands/research/lighthouse.ts
|
|
46750
|
-
import { defineCommand as
|
|
46560
|
+
import { defineCommand as defineCommand176 } from "citty";
|
|
46751
46561
|
registerSchema({
|
|
46752
46562
|
command: "research.lighthouse",
|
|
46753
46563
|
description: "Landing page performance audit. Returns metrics that affect Google Ads Quality Score and CPC.",
|
|
@@ -46766,7 +46576,7 @@ var FIELDS11 = {
|
|
|
46766
46576
|
speed_index_ms: "Speed Index in ms (good: < 3400)",
|
|
46767
46577
|
interactive_ms: "Time to Interactive in ms (good: < 3800)"
|
|
46768
46578
|
};
|
|
46769
|
-
var lighthouseCommand =
|
|
46579
|
+
var lighthouseCommand = defineCommand176({
|
|
46770
46580
|
meta: {
|
|
46771
46581
|
name: "lighthouse",
|
|
46772
46582
|
description: `Landing page performance audit. Metrics affecting Google Ads Quality Score.
|
|
@@ -46804,7 +46614,7 @@ Examples:
|
|
|
46804
46614
|
});
|
|
46805
46615
|
|
|
46806
46616
|
// src/commands/research/relevant-pages.ts
|
|
46807
|
-
import { defineCommand as
|
|
46617
|
+
import { defineCommand as defineCommand177 } from "citty";
|
|
46808
46618
|
registerSchema({
|
|
46809
46619
|
command: "research.relevant-pages",
|
|
46810
46620
|
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).",
|
|
@@ -46830,7 +46640,7 @@ var FIELDS12 = {
|
|
|
46830
46640
|
keywords: "Total organic keywords the page ranks for",
|
|
46831
46641
|
top_10: "Keywords in positions 1-10"
|
|
46832
46642
|
};
|
|
46833
|
-
var relevantPagesCommand =
|
|
46643
|
+
var relevantPagesCommand = defineCommand177({
|
|
46834
46644
|
meta: {
|
|
46835
46645
|
name: "relevant-pages",
|
|
46836
46646
|
description: `Get the top pages of a competitor domain with traffic data.
|
|
@@ -46877,7 +46687,7 @@ Examples:
|
|
|
46877
46687
|
});
|
|
46878
46688
|
|
|
46879
46689
|
// src/commands/research/web.ts
|
|
46880
|
-
import { defineCommand as
|
|
46690
|
+
import { defineCommand as defineCommand178 } from "citty";
|
|
46881
46691
|
registerSchema({
|
|
46882
46692
|
command: "research.web",
|
|
46883
46693
|
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).",
|
|
@@ -46928,7 +46738,7 @@ async function runDeepResearch(question) {
|
|
|
46928
46738
|
}
|
|
46929
46739
|
throw new Error("Deep research timed out");
|
|
46930
46740
|
}
|
|
46931
|
-
var webCommand =
|
|
46741
|
+
var webCommand = defineCommand178({
|
|
46932
46742
|
meta: {
|
|
46933
46743
|
name: "web",
|
|
46934
46744
|
description: `Search the web with AI to answer any open-ended marketing question. Uses live internet data via Google Search.
|
|
@@ -46990,7 +46800,7 @@ Examples:
|
|
|
46990
46800
|
});
|
|
46991
46801
|
|
|
46992
46802
|
// src/commands/research/index.ts
|
|
46993
|
-
var researchCommand =
|
|
46803
|
+
var researchCommand = defineCommand179({
|
|
46994
46804
|
meta: {
|
|
46995
46805
|
name: "research",
|
|
46996
46806
|
description: `Competitive intelligence and AI-powered research commands.
|
|
@@ -47034,10 +46844,10 @@ Full guide: __tooling__/docs/tools/baker/research.md`
|
|
|
47034
46844
|
});
|
|
47035
46845
|
|
|
47036
46846
|
// src/commands/scheduled-actions/index.ts
|
|
47037
|
-
import { defineCommand as
|
|
46847
|
+
import { defineCommand as defineCommand187 } from "citty";
|
|
47038
46848
|
|
|
47039
46849
|
// src/commands/scheduled-actions/create.ts
|
|
47040
|
-
import { defineCommand as
|
|
46850
|
+
import { defineCommand as defineCommand180 } from "citty";
|
|
47041
46851
|
|
|
47042
46852
|
// src/commands/scheduled-actions/shared.ts
|
|
47043
46853
|
var TEMP_SCHEDULED_ACTION_PREFIX = "temp_sched_";
|
|
@@ -47184,7 +46994,7 @@ registerSchema({
|
|
|
47184
46994
|
}
|
|
47185
46995
|
}
|
|
47186
46996
|
});
|
|
47187
|
-
var createCommand3 =
|
|
46997
|
+
var createCommand3 = defineCommand180({
|
|
47188
46998
|
meta: {
|
|
47189
46999
|
name: "create",
|
|
47190
47000
|
description: 'Stage a scheduled action. Example: baker scheduled-actions create --name "Weekly report" --description "..." --cron "0 9 * * MON"'
|
|
@@ -47243,7 +47053,7 @@ var createCommand3 = defineCommand181({
|
|
|
47243
47053
|
});
|
|
47244
47054
|
|
|
47245
47055
|
// src/commands/scheduled-actions/delete.ts
|
|
47246
|
-
import { defineCommand as
|
|
47056
|
+
import { defineCommand as defineCommand181 } from "citty";
|
|
47247
47057
|
registerSchema({
|
|
47248
47058
|
command: "scheduled-actions.delete",
|
|
47249
47059
|
description: "Stage deletion of a published scheduled action or cancellation of a temp_sched_* draft creation.",
|
|
@@ -47251,7 +47061,7 @@ registerSchema({
|
|
|
47251
47061
|
id: { type: "string", description: "Published scheduled action ID or temp_sched_* draft ID", required: true }
|
|
47252
47062
|
}
|
|
47253
47063
|
});
|
|
47254
|
-
var deleteCommand3 =
|
|
47064
|
+
var deleteCommand3 = defineCommand181({
|
|
47255
47065
|
meta: {
|
|
47256
47066
|
name: "delete",
|
|
47257
47067
|
description: "Stage scheduled action deletion. Example: baker scheduled-actions delete <id-or-temp_sched_id>"
|
|
@@ -47280,7 +47090,7 @@ var deleteCommand3 = defineCommand182({
|
|
|
47280
47090
|
});
|
|
47281
47091
|
|
|
47282
47092
|
// src/commands/scheduled-actions/get.ts
|
|
47283
|
-
import { defineCommand as
|
|
47093
|
+
import { defineCommand as defineCommand182 } from "citty";
|
|
47284
47094
|
registerSchema({
|
|
47285
47095
|
command: "scheduled-actions.get",
|
|
47286
47096
|
description: "Get a published scheduled action or a temp_sched_* draft-created scheduled action.",
|
|
@@ -47289,7 +47099,7 @@ registerSchema({
|
|
|
47289
47099
|
chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
|
|
47290
47100
|
}
|
|
47291
47101
|
});
|
|
47292
|
-
var getCommand4 =
|
|
47102
|
+
var getCommand4 = defineCommand182({
|
|
47293
47103
|
meta: {
|
|
47294
47104
|
name: "get",
|
|
47295
47105
|
description: "Get a scheduled action. Example: baker scheduled-actions get <id-or-temp_sched_id>"
|
|
@@ -47328,7 +47138,7 @@ var getCommand4 = defineCommand183({
|
|
|
47328
47138
|
});
|
|
47329
47139
|
|
|
47330
47140
|
// src/commands/scheduled-actions/list.ts
|
|
47331
|
-
import { defineCommand as
|
|
47141
|
+
import { defineCommand as defineCommand183 } from "citty";
|
|
47332
47142
|
registerSchema({
|
|
47333
47143
|
command: "scheduled-actions.list",
|
|
47334
47144
|
description: "List published scheduled actions. Includes draft state when BAKER_CHAT_ID is set, or --chat <id> to read an earlier chat's staged schedules instead.",
|
|
@@ -47336,7 +47146,7 @@ registerSchema({
|
|
|
47336
47146
|
chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
|
|
47337
47147
|
}
|
|
47338
47148
|
});
|
|
47339
|
-
var listCommand15 =
|
|
47149
|
+
var listCommand15 = defineCommand183({
|
|
47340
47150
|
meta: {
|
|
47341
47151
|
name: "list",
|
|
47342
47152
|
description: "List scheduled actions. Includes staged draft ops when BAKER_CHAT_ID is set, or --chat <id> to read an earlier chat's staged schedules instead."
|
|
@@ -47361,7 +47171,7 @@ var listCommand15 = defineCommand184({
|
|
|
47361
47171
|
// src/commands/scheduled-actions/templates.ts
|
|
47362
47172
|
import { readFile as readFile24 } from "fs/promises";
|
|
47363
47173
|
import path37 from "path";
|
|
47364
|
-
import { defineCommand as
|
|
47174
|
+
import { defineCommand as defineCommand184 } from "citty";
|
|
47365
47175
|
registerSchema({
|
|
47366
47176
|
command: "scheduled-actions.templates",
|
|
47367
47177
|
description: "The recipes available to this company: the ones Baker ships plus the ones they wrote themselves, each with its id, what it produces and how often it is meant to run. Read this before proposing a company's automation, so every recipe you name is one that exists. Also how a company gets a recipe of its own \u2014 save a brief, prove it runs, then publish it.",
|
|
@@ -47416,7 +47226,7 @@ registerSchema({
|
|
|
47416
47226
|
}
|
|
47417
47227
|
}
|
|
47418
47228
|
});
|
|
47419
|
-
var templatesCommand =
|
|
47229
|
+
var templatesCommand = defineCommand184({
|
|
47420
47230
|
meta: {
|
|
47421
47231
|
name: "templates",
|
|
47422
47232
|
description: `The recipes this company can run \u2014 Baker's own plus theirs, with what each one produces.
|
|
@@ -47508,7 +47318,7 @@ Full guide: __tooling__/docs/tools/baker/scheduled-actions.md`
|
|
|
47508
47318
|
});
|
|
47509
47319
|
|
|
47510
47320
|
// src/commands/scheduled-actions/trigger.ts
|
|
47511
|
-
import { defineCommand as
|
|
47321
|
+
import { defineCommand as defineCommand185 } from "citty";
|
|
47512
47322
|
registerSchema({
|
|
47513
47323
|
command: "scheduled-actions.trigger",
|
|
47514
47324
|
description: "Immediately trigger a published scheduled action. Does not require BAKER_CHAT_ID and rejects temp_sched_* IDs.",
|
|
@@ -47516,7 +47326,7 @@ registerSchema({
|
|
|
47516
47326
|
id: { type: "string", description: "Published scheduled action ID", required: true }
|
|
47517
47327
|
}
|
|
47518
47328
|
});
|
|
47519
|
-
var triggerCommand =
|
|
47329
|
+
var triggerCommand = defineCommand185({
|
|
47520
47330
|
meta: {
|
|
47521
47331
|
name: "trigger",
|
|
47522
47332
|
description: "Immediately trigger a published scheduled action. Example: baker scheduled-actions trigger <id>"
|
|
@@ -47553,7 +47363,7 @@ var triggerCommand = defineCommand186({
|
|
|
47553
47363
|
});
|
|
47554
47364
|
|
|
47555
47365
|
// src/commands/scheduled-actions/update.ts
|
|
47556
|
-
import { defineCommand as
|
|
47366
|
+
import { defineCommand as defineCommand186 } from "citty";
|
|
47557
47367
|
registerSchema({
|
|
47558
47368
|
command: "scheduled-actions.update",
|
|
47559
47369
|
description: "Stage an update to a published scheduled action or temp_sched_* draft-created scheduled action.",
|
|
@@ -47584,7 +47394,7 @@ registerSchema({
|
|
|
47584
47394
|
prompt: { type: "string", description: "Replacement additional spawned-agent instructions", required: false }
|
|
47585
47395
|
}
|
|
47586
47396
|
});
|
|
47587
|
-
var updateCommand3 =
|
|
47397
|
+
var updateCommand3 = defineCommand186({
|
|
47588
47398
|
meta: {
|
|
47589
47399
|
name: "update",
|
|
47590
47400
|
description: "Stage a scheduled action update. Examples: baker scheduled-actions update <id> --enabled false | baker scheduled-actions update <id> --mode publish"
|
|
@@ -47662,7 +47472,7 @@ var updateCommand3 = defineCommand187({
|
|
|
47662
47472
|
});
|
|
47663
47473
|
|
|
47664
47474
|
// src/commands/scheduled-actions/index.ts
|
|
47665
|
-
var scheduledActionsCommand =
|
|
47475
|
+
var scheduledActionsCommand = defineCommand187({
|
|
47666
47476
|
meta: {
|
|
47667
47477
|
name: "scheduled-actions",
|
|
47668
47478
|
description: `Manage Scheduled Actions. Subcommands: list, get, create, update, delete, trigger, templates.
|
|
@@ -47691,14 +47501,14 @@ Full guide: __tooling__/docs/tools/baker/scheduled-actions.md`
|
|
|
47691
47501
|
});
|
|
47692
47502
|
|
|
47693
47503
|
// src/commands/schema.ts
|
|
47694
|
-
import { defineCommand as
|
|
47504
|
+
import { defineCommand as defineCommand188 } from "citty";
|
|
47695
47505
|
function narrowToFamily(commandName, available) {
|
|
47696
47506
|
const segments = commandName.split(".");
|
|
47697
47507
|
const prefix = segments[0] === "ads" && segments[1] ? `ads.${segments[1]}.` : `${segments[0]}.`;
|
|
47698
47508
|
const siblings = available.filter((name) => name.startsWith(prefix));
|
|
47699
47509
|
return siblings.length > 0 ? siblings : available;
|
|
47700
47510
|
}
|
|
47701
|
-
var schemaCommand2 =
|
|
47511
|
+
var schemaCommand2 = defineCommand188({
|
|
47702
47512
|
meta: {
|
|
47703
47513
|
name: "schema",
|
|
47704
47514
|
description: "Inspect command argument schemas (for AI agent introspection). Lists all commands if no argument given. Example: baker schema images.search"
|
|
@@ -47742,10 +47552,10 @@ var schemaCommand2 = defineCommand189({
|
|
|
47742
47552
|
});
|
|
47743
47553
|
|
|
47744
47554
|
// src/commands/studio/index.ts
|
|
47745
|
-
import { defineCommand as
|
|
47555
|
+
import { defineCommand as defineCommand197 } from "citty";
|
|
47746
47556
|
|
|
47747
47557
|
// src/commands/studio/animate.ts
|
|
47748
|
-
import { defineCommand as
|
|
47558
|
+
import { defineCommand as defineCommand189 } from "citty";
|
|
47749
47559
|
|
|
47750
47560
|
// src/commands/studio/batch.ts
|
|
47751
47561
|
function projectBatch(generation, full) {
|
|
@@ -48196,7 +48006,7 @@ function costHintsFor(body) {
|
|
|
48196
48006
|
}
|
|
48197
48007
|
return hints;
|
|
48198
48008
|
}
|
|
48199
|
-
var animateCommand =
|
|
48009
|
+
var animateCommand = defineCommand189({
|
|
48200
48010
|
meta: {
|
|
48201
48011
|
name: "animate",
|
|
48202
48012
|
description: "Render a clip. With an image the look is already fixed, so the prompt describes MOVEMENT \u2014 what the camera does, what the subject does, in what order. With --from text there is no image and the prompt is the whole shot.\n\nA rendered clip is NOT usable anywhere until you keep it: `baker studio keep <id> --slot N` is what puts it in the video library. Takes nobody keeps are never ingested, which is what makes a rejected batch cheap.\n\nFor anything longer than 15 seconds, or to build on footage that already exists, use --model bytedance/seedance-2.5: it renders 4-30s and is the only model that reads an existing clip or an existing soundtrack.\n\nExamples:\n baker studio animate 'slow push in, model turns to camera and smiles' --image j57abc123def456ghi789\n baker studio animate 'handheld drift right, steam rising from the cup' --image './out/hero.png' --duration 6 --quality 1080p\n baker studio animate 'product rotates once on a turntable' --image j57abc\u2026,j57def\u2026 --from references\n baker studio animate 'she keeps walking, camera stays with her, then she stops and looks up' --image j57abc\u2026 --from references --from-clip j57batch\u2026:0 --model bytedance/seedance-2.5 --duration 20\n baker studio animate 'hold on the product, then a slow push-in' --from references --from-video j57vid\u2026 --model bytedance/seedance-2.5\n baker studio animate 'slow drone pull-back over a solar farm at golden hour, no people' --from text --model bytedance/seedance-2.5 --duration 12"
|
|
@@ -48315,7 +48125,7 @@ var animateCommand = defineCommand190({
|
|
|
48315
48125
|
});
|
|
48316
48126
|
|
|
48317
48127
|
// src/commands/studio/generate.ts
|
|
48318
|
-
import { defineCommand as
|
|
48128
|
+
import { defineCommand as defineCommand190 } from "citty";
|
|
48319
48129
|
var MODEL_LIST2 = IMAGE_MODEL_IDS;
|
|
48320
48130
|
var DEFAULT_MAX_WAIT_MS2 = 24e4;
|
|
48321
48131
|
registerSchema({
|
|
@@ -48451,7 +48261,7 @@ function buildGenerateBody(args, prompt) {
|
|
|
48451
48261
|
}
|
|
48452
48262
|
return body;
|
|
48453
48263
|
}
|
|
48454
|
-
var generateCommand =
|
|
48264
|
+
var generateCommand = defineCommand190({
|
|
48455
48265
|
meta: {
|
|
48456
48266
|
name: "generate",
|
|
48457
48267
|
description: "Start here to make an image. Renders 1-8 takes of one brief, ingests each into the media library as it lands, and shows the batch in the dashboard Studio next to the ones the client ran.\n\nModel choice: google/gemini-3.1-flash-image-preview (default \u2014 fast, best at editing a reference and at extreme ratios), google/gemini-3-pro-image-preview (highest fidelity, slower), openai/gpt-image-2 (photoreal and the cleanest in-image text \u2014 no --image-size, no 4:5 / 5:4), recraft/recraft-v4.1-pro-vector (vector/flat marks with palette control).\n\n--reference is the biggest quality lever there is: a real logo, product shot, Pinterest pin or sandbox screenshot beats any amount of adjectives.\n\nExamples:\n baker studio generate 'matte black bottle on wet marble, hard studio light, 35mm' --aspect-ratio 3:2 --count 3\n baker studio generate 'this bottle on a sunlit kitchen counter' --reference './src/brand/product.png,https://\u2026/kitchen.jpg'\n baker studio generate 'founder-style selfie, kitchen background, natural light' --skill ugc-selfie-hook\n baker studio generate 'flat geometric mascot, brand palette' --model recraft/recraft-v4.1-pro-vector --rgb-colors '[[10,10,10],[255,80,0]]'"
|
|
@@ -48529,7 +48339,7 @@ var generateCommand = defineCommand191({
|
|
|
48529
48339
|
});
|
|
48530
48340
|
|
|
48531
48341
|
// src/commands/studio/get.ts
|
|
48532
|
-
import { defineCommand as
|
|
48342
|
+
import { defineCommand as defineCommand191 } from "citty";
|
|
48533
48343
|
registerSchema({
|
|
48534
48344
|
command: "studio.get",
|
|
48535
48345
|
description: "Read one Studio batch: every take, where it lives, and why a take is missing. This is how you pick up a batch that was still rendering when the start command returned.",
|
|
@@ -48538,7 +48348,7 @@ registerSchema({
|
|
|
48538
48348
|
full: { type: "boolean", description: "Include settings, references and attribution", required: false }
|
|
48539
48349
|
}
|
|
48540
48350
|
});
|
|
48541
|
-
var getCommand5 =
|
|
48351
|
+
var getCommand5 = defineCommand191({
|
|
48542
48352
|
meta: {
|
|
48543
48353
|
name: "get",
|
|
48544
48354
|
description: "Read one Studio batch \u2014 the takes, their urls, whether each is in the library, and the reason for any that failed.\n\nExample: baker studio get j57abc123def456ghi789\nExample: baker studio get j57abc123def456ghi789 --full"
|
|
@@ -48567,7 +48377,7 @@ var getCommand5 = defineCommand192({
|
|
|
48567
48377
|
});
|
|
48568
48378
|
|
|
48569
48379
|
// src/commands/studio/improve.ts
|
|
48570
|
-
import { defineCommand as
|
|
48380
|
+
import { defineCommand as defineCommand192 } from "citty";
|
|
48571
48381
|
var DESCRIPTION = "Sharpen a rough brief into directed art direction \u2014 the same rewrite the client gets from the wand in the Studio prompt bar. Reach for it when you are relaying the CLIENT's own words and want them shaped without substituting your voice; when you are writing the art direction yourself, just write it, because you will do a better job than this does.";
|
|
48572
48382
|
registerSchema({
|
|
48573
48383
|
command: "studio.improve",
|
|
@@ -48592,7 +48402,7 @@ registerSchema({
|
|
|
48592
48402
|
}
|
|
48593
48403
|
}
|
|
48594
48404
|
});
|
|
48595
|
-
var improveCommand =
|
|
48405
|
+
var improveCommand = defineCommand192({
|
|
48596
48406
|
meta: {
|
|
48597
48407
|
name: "improve",
|
|
48598
48408
|
description: `${DESCRIPTION}
|
|
@@ -48636,7 +48446,7 @@ Examples:
|
|
|
48636
48446
|
});
|
|
48637
48447
|
|
|
48638
48448
|
// src/commands/studio/keep.ts
|
|
48639
|
-
import { defineCommand as
|
|
48449
|
+
import { defineCommand as defineCommand193 } from "citty";
|
|
48640
48450
|
registerSchema({
|
|
48641
48451
|
command: "studio.keep",
|
|
48642
48452
|
description: "Mark one take as the keeper. For an image this stars it, so the client reviewing the batch sees which one you used. For a CLIP it is the step that puts it in the video library \u2014 until then the clip cannot be used in a canvas, a landing, or an ad.",
|
|
@@ -48646,7 +48456,7 @@ registerSchema({
|
|
|
48646
48456
|
undo: { type: "boolean", description: "Un-star an image, or take a kept clip back out", required: false }
|
|
48647
48457
|
}
|
|
48648
48458
|
});
|
|
48649
|
-
var keepCommand =
|
|
48459
|
+
var keepCommand = defineCommand193({
|
|
48650
48460
|
meta: {
|
|
48651
48461
|
name: "keep",
|
|
48652
48462
|
description: "Mark one take as the keeper. An image gets starred (it was already in the library); a clip gets INGESTED into the video library, which is what makes it usable anywhere else.\n\nExample: baker studio keep j57abc123def456ghi789 --slot 2\nExample: baker studio keep j57abc123def456ghi789 --slot 2 --undo"
|
|
@@ -48697,7 +48507,7 @@ var keepCommand = defineCommand194({
|
|
|
48697
48507
|
});
|
|
48698
48508
|
|
|
48699
48509
|
// src/commands/studio/list.ts
|
|
48700
|
-
import { defineCommand as
|
|
48510
|
+
import { defineCommand as defineCommand194 } from "citty";
|
|
48701
48511
|
registerSchema({
|
|
48702
48512
|
command: "studio.list",
|
|
48703
48513
|
description: "Recent Studio batches for THIS conversation, newest first \u2014 what you have already generated, so you re-use a take instead of paying for it twice. `--all` widens it to everything the company generated, including what people ran themselves in the dashboard.",
|
|
@@ -48708,7 +48518,7 @@ registerSchema({
|
|
|
48708
48518
|
full: { type: "boolean", description: "Include settings, references and attribution", required: false }
|
|
48709
48519
|
}
|
|
48710
48520
|
});
|
|
48711
|
-
var listCommand16 =
|
|
48521
|
+
var listCommand16 = defineCommand194({
|
|
48712
48522
|
meta: {
|
|
48713
48523
|
name: "list",
|
|
48714
48524
|
description: "Recent Studio batches, newest first. Scoped to this conversation unless you pass --all.\n\nExample: baker studio list\nExample: baker studio list --kind video --limit 5\nExample: baker studio list --all # includes batches the client ran in the dashboard"
|
|
@@ -48742,7 +48552,7 @@ var listCommand16 = defineCommand195({
|
|
|
48742
48552
|
});
|
|
48743
48553
|
|
|
48744
48554
|
// src/commands/studio/models.ts
|
|
48745
|
-
import { defineCommand as
|
|
48555
|
+
import { defineCommand as defineCommand195 } from "citty";
|
|
48746
48556
|
var DESCRIPTION2 = "What each Studio model actually accepts: its shapes, resolutions, clip lengths, prompt character cap, how many reference images it takes, and which knobs it has. Read this before a batch you care about \u2014 the models disagree far more than they look like they do, and a setting the chosen model does not have is REFUSED, not ignored.";
|
|
48747
48557
|
registerSchema({
|
|
48748
48558
|
command: "studio.models",
|
|
@@ -48829,7 +48639,7 @@ function buildModelCards(kind, model) {
|
|
|
48829
48639
|
const selected = model ? ids.filter((id) => id === model) : ids;
|
|
48830
48640
|
return selected.map((id) => build(id));
|
|
48831
48641
|
}
|
|
48832
|
-
var modelsCommand =
|
|
48642
|
+
var modelsCommand = defineCommand195({
|
|
48833
48643
|
meta: {
|
|
48834
48644
|
name: "models",
|
|
48835
48645
|
description: `${DESCRIPTION2}
|
|
@@ -48876,13 +48686,13 @@ Examples:
|
|
|
48876
48686
|
});
|
|
48877
48687
|
|
|
48878
48688
|
// src/commands/studio/skills.ts
|
|
48879
|
-
import { defineCommand as
|
|
48689
|
+
import { defineCommand as defineCommand196 } from "citty";
|
|
48880
48690
|
registerSchema({
|
|
48881
48691
|
command: "studio.skills",
|
|
48882
48692
|
description: "The craft directions `studio generate --skill <id>` accepts. Each one carries directed art direction plus the model, shape and take count it wants, so you pick a look by name instead of writing the boilerplate yourself.",
|
|
48883
48693
|
args: {}
|
|
48884
48694
|
});
|
|
48885
|
-
var skillsCommand =
|
|
48695
|
+
var skillsCommand = defineCommand196({
|
|
48886
48696
|
meta: {
|
|
48887
48697
|
name: "skills",
|
|
48888
48698
|
description: "List the craft directions available to `baker studio generate --skill <id>` \u2014 what each one is for, whether it wants a reference image, and the model/shape/count it defaults to.\n\nExample: baker studio skills"
|
|
@@ -48906,7 +48716,7 @@ var skillsCommand = defineCommand197({
|
|
|
48906
48716
|
});
|
|
48907
48717
|
|
|
48908
48718
|
// src/commands/studio/index.ts
|
|
48909
|
-
var studioCommand =
|
|
48719
|
+
var studioCommand = defineCommand197({
|
|
48910
48720
|
meta: {
|
|
48911
48721
|
name: "studio",
|
|
48912
48722
|
description: `Make new imagery and clips. Every batch is recorded and shows up in the dashboard Studio for the client to review, labelled with this conversation.
|
|
@@ -48949,10 +48759,10 @@ Full guide: __tooling__/docs/tools/baker/studio.md`
|
|
|
48949
48759
|
});
|
|
48950
48760
|
|
|
48951
48761
|
// src/commands/tag-manager/index.ts
|
|
48952
|
-
import { defineCommand as
|
|
48762
|
+
import { defineCommand as defineCommand201 } from "citty";
|
|
48953
48763
|
|
|
48954
48764
|
// src/commands/tag-manager/draft.ts
|
|
48955
|
-
import { defineCommand as
|
|
48765
|
+
import { defineCommand as defineCommand198 } from "citty";
|
|
48956
48766
|
|
|
48957
48767
|
// src/commands/tag-manager/shared.ts
|
|
48958
48768
|
import { readFileSync as readFileSync15 } from "fs";
|
|
@@ -49075,13 +48885,13 @@ registerSchema({
|
|
|
49075
48885
|
chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
|
|
49076
48886
|
}
|
|
49077
48887
|
});
|
|
49078
|
-
var draftCommand4 =
|
|
48888
|
+
var draftCommand4 = defineCommand198({
|
|
49079
48889
|
meta: {
|
|
49080
48890
|
name: "draft",
|
|
49081
48891
|
description: "List, show, amend, remove, or clear staged Tag Manager changes for this chat. `list` and `show` take --chat <id> to read an earlier chat's changes instead."
|
|
49082
48892
|
},
|
|
49083
48893
|
subCommands: {
|
|
49084
|
-
list:
|
|
48894
|
+
list: defineCommand198({
|
|
49085
48895
|
meta: {
|
|
49086
48896
|
name: "list",
|
|
49087
48897
|
description: "Review everything staged on this chat (--json for the raw envelope)"
|
|
@@ -49094,7 +48904,7 @@ var draftCommand4 = defineCommand199({
|
|
|
49094
48904
|
await draftList2(args.json === true, args.chat);
|
|
49095
48905
|
}
|
|
49096
48906
|
}),
|
|
49097
|
-
show:
|
|
48907
|
+
show: defineCommand198({
|
|
49098
48908
|
meta: {
|
|
49099
48909
|
name: "show",
|
|
49100
48910
|
description: "Print the full staged payload for one change \u2014 the receipt to verify it looks right before publish (never truncated)."
|
|
@@ -49111,7 +48921,7 @@ var draftCommand4 = defineCommand199({
|
|
|
49111
48921
|
);
|
|
49112
48922
|
}
|
|
49113
48923
|
}),
|
|
49114
|
-
amend:
|
|
48924
|
+
amend: defineCommand198({
|
|
49115
48925
|
meta: {
|
|
49116
48926
|
name: "amend",
|
|
49117
48927
|
description: "Update a staged change in place \u2014 merges a JSON patch into its payload (objects deep-merge, null deletes a key, arrays/scalars replace) and re-validates. Use this instead of remove + re-create."
|
|
@@ -49128,7 +48938,7 @@ var draftCommand4 = defineCommand199({
|
|
|
49128
48938
|
});
|
|
49129
48939
|
}
|
|
49130
48940
|
}),
|
|
49131
|
-
remove:
|
|
48941
|
+
remove: defineCommand198({
|
|
49132
48942
|
meta: { name: "remove", description: "Remove one staged change (cascades to anything depending on it)" },
|
|
49133
48943
|
args: { ref: { type: "positional", description: "Staged ref (gtm_temp_*) or target", required: false } },
|
|
49134
48944
|
run: async ({ args }) => {
|
|
@@ -49137,7 +48947,7 @@ var draftCommand4 = defineCommand199({
|
|
|
49137
48947
|
});
|
|
49138
48948
|
}
|
|
49139
48949
|
}),
|
|
49140
|
-
clear:
|
|
48950
|
+
clear: defineCommand198({
|
|
49141
48951
|
meta: { name: "clear", description: "Discard all Tag Manager changes staged on this chat" },
|
|
49142
48952
|
run: async () => {
|
|
49143
48953
|
await draftAction3("/api/tag-manager/draft/clear", {});
|
|
@@ -49147,7 +48957,7 @@ var draftCommand4 = defineCommand199({
|
|
|
49147
48957
|
});
|
|
49148
48958
|
|
|
49149
48959
|
// src/commands/tag-manager/read.ts
|
|
49150
|
-
import { defineCommand as
|
|
48960
|
+
import { defineCommand as defineCommand199 } from "citty";
|
|
49151
48961
|
registerSchema({
|
|
49152
48962
|
command: "tagManager.containers",
|
|
49153
48963
|
description: "List the Google Tag Manager containers this company's connection can reach. Every container the company connected is flagged `connected: true` \u2014 there can be several, and Baker may read and change all of them. Start here to confirm which containers you are managing.",
|
|
@@ -49188,7 +48998,7 @@ function containersHints(containers) {
|
|
|
49188
48998
|
}))
|
|
49189
48999
|
});
|
|
49190
49000
|
}
|
|
49191
|
-
var containersCommand =
|
|
49001
|
+
var containersCommand = defineCommand199({
|
|
49192
49002
|
meta: {
|
|
49193
49003
|
name: "containers",
|
|
49194
49004
|
description: `List Tag Manager containers reachable by this company's connection.
|
|
@@ -49205,7 +49015,7 @@ Start here:
|
|
|
49205
49015
|
}
|
|
49206
49016
|
}
|
|
49207
49017
|
});
|
|
49208
|
-
var readCommand =
|
|
49018
|
+
var readCommand = defineCommand199({
|
|
49209
49019
|
meta: {
|
|
49210
49020
|
name: "read",
|
|
49211
49021
|
description: `Read the current contents of the Tag Manager container \u2014 always do this before staging changes.
|
|
@@ -49247,7 +49057,7 @@ Examples:
|
|
|
49247
49057
|
});
|
|
49248
49058
|
|
|
49249
49059
|
// src/commands/tag-manager/write-commands.ts
|
|
49250
|
-
import { defineCommand as
|
|
49060
|
+
import { defineCommand as defineCommand200 } from "citty";
|
|
49251
49061
|
var CONTAINER_ARG_DESCRIPTION = "Numeric container id (optional only when one container is connected \u2014 run `baker tag-manager containers`)";
|
|
49252
49062
|
var ENTITIES = [
|
|
49253
49063
|
{
|
|
@@ -49303,10 +49113,10 @@ for (const { entity, noun, createHint } of ENTITIES) {
|
|
|
49303
49113
|
});
|
|
49304
49114
|
}
|
|
49305
49115
|
function entityCommand(entity, noun, example) {
|
|
49306
|
-
return
|
|
49116
|
+
return defineCommand200({
|
|
49307
49117
|
meta: { name: entity, description: `Stage ${noun} changes on this chat's Tag Manager draft` },
|
|
49308
49118
|
subCommands: {
|
|
49309
|
-
create:
|
|
49119
|
+
create: defineCommand200({
|
|
49310
49120
|
meta: {
|
|
49311
49121
|
name: "create",
|
|
49312
49122
|
description: `Stage a new ${noun}
|
|
@@ -49328,7 +49138,7 @@ Examples:
|
|
|
49328
49138
|
});
|
|
49329
49139
|
}
|
|
49330
49140
|
}),
|
|
49331
|
-
update:
|
|
49141
|
+
update: defineCommand200({
|
|
49332
49142
|
meta: {
|
|
49333
49143
|
name: "update",
|
|
49334
49144
|
description: `Stage an update to an existing ${noun} (pass its id or path)`
|
|
@@ -49348,7 +49158,7 @@ Examples:
|
|
|
49348
49158
|
});
|
|
49349
49159
|
}
|
|
49350
49160
|
}),
|
|
49351
|
-
delete:
|
|
49161
|
+
delete: defineCommand200({
|
|
49352
49162
|
meta: { name: "delete", description: `Stage the deletion of a ${noun} (pass its id or path)` },
|
|
49353
49163
|
args: {
|
|
49354
49164
|
id: { type: "positional", description: `${noun} id or path`, required: false },
|
|
@@ -49389,7 +49199,7 @@ function builtinTypes(args) {
|
|
|
49389
49199
|
}
|
|
49390
49200
|
return raw.split(",").map((entry) => entry.trim());
|
|
49391
49201
|
}
|
|
49392
|
-
var builtinCommand =
|
|
49202
|
+
var builtinCommand = defineCommand200({
|
|
49393
49203
|
meta: {
|
|
49394
49204
|
name: "builtin",
|
|
49395
49205
|
description: `Enable or disable built-in variables
|
|
@@ -49399,7 +49209,7 @@ Examples:
|
|
|
49399
49209
|
baker tag-manager builtin disable --types formId`
|
|
49400
49210
|
},
|
|
49401
49211
|
subCommands: {
|
|
49402
|
-
enable:
|
|
49212
|
+
enable: defineCommand200({
|
|
49403
49213
|
meta: { name: "enable", description: "Stage enabling built-in variables" },
|
|
49404
49214
|
args: {
|
|
49405
49215
|
types: { type: "string", description: "Comma-separated types", required: false },
|
|
@@ -49413,7 +49223,7 @@ Examples:
|
|
|
49413
49223
|
});
|
|
49414
49224
|
}
|
|
49415
49225
|
}),
|
|
49416
|
-
disable:
|
|
49226
|
+
disable: defineCommand200({
|
|
49417
49227
|
meta: { name: "disable", description: "Stage disabling built-in variables" },
|
|
49418
49228
|
args: {
|
|
49419
49229
|
types: { type: "string", description: "Comma-separated types", required: false },
|
|
@@ -49431,7 +49241,7 @@ Examples:
|
|
|
49431
49241
|
});
|
|
49432
49242
|
|
|
49433
49243
|
// src/commands/tag-manager/index.ts
|
|
49434
|
-
var tagManagerCommand =
|
|
49244
|
+
var tagManagerCommand = defineCommand201({
|
|
49435
49245
|
meta: {
|
|
49436
49246
|
name: "tag-manager",
|
|
49437
49247
|
description: `Read and change what lives inside the client's Google Tag Manager container \u2014 tags, triggers, variables, folders and built-in variables.
|
|
@@ -49468,7 +49278,7 @@ Full guide: __tooling__/docs/tools/baker/tag-manager.md`
|
|
|
49468
49278
|
});
|
|
49469
49279
|
|
|
49470
49280
|
// src/commands/tags/index.ts
|
|
49471
|
-
import { defineCommand as
|
|
49281
|
+
import { defineCommand as defineCommand202 } from "citty";
|
|
49472
49282
|
|
|
49473
49283
|
// src/commands/tags/shared.ts
|
|
49474
49284
|
function failApi3(err) {
|
|
@@ -49537,7 +49347,7 @@ async function listTags(json) {
|
|
|
49537
49347
|
var listArgs9 = {
|
|
49538
49348
|
json: { type: "boolean", description: "Print the raw JSON envelope instead of the readable list" }
|
|
49539
49349
|
};
|
|
49540
|
-
var listCommand17 =
|
|
49350
|
+
var listCommand17 = defineCommand202({
|
|
49541
49351
|
meta: {
|
|
49542
49352
|
name: "list",
|
|
49543
49353
|
description: "Effective tags for this chat (production + staged), with each tag's full readable config (secrets excluded) \u2014 reuse a stored value to pre-fill a change rather than asking the user. Refs printed here are what flow side-effect tagIds should use. Example: baker tags list"
|
|
@@ -49556,7 +49366,7 @@ async function listDraft3(chat) {
|
|
|
49556
49366
|
failApi3(err);
|
|
49557
49367
|
}
|
|
49558
49368
|
}
|
|
49559
|
-
var draftCommand5 =
|
|
49369
|
+
var draftCommand5 = defineCommand202({
|
|
49560
49370
|
meta: {
|
|
49561
49371
|
name: "draft",
|
|
49562
49372
|
description: "Review the tag changes staged in this chat (read-only). Staged changes were approved via request_tag_input and apply when the chat is published; to amend or drop one, propose a follow-up change through the same tool (a delete on a tag_temp_* ref drops the staged create). Takes --chat <id> to read an earlier chat's staged changes instead."
|
|
@@ -49566,7 +49376,7 @@ var draftCommand5 = defineCommand203({
|
|
|
49566
49376
|
await listDraft3(args.chat);
|
|
49567
49377
|
}
|
|
49568
49378
|
});
|
|
49569
|
-
var tagsCommand4 =
|
|
49379
|
+
var tagsCommand4 = defineCommand202({
|
|
49570
49380
|
meta: {
|
|
49571
49381
|
name: "tags",
|
|
49572
49382
|
description: `Read the client's marketing/analytics tags (Meta pixel, GA4, Google Ads, GTM, Clarity, Hotjar, \u2026) \u2014 production tags plus the changes staged in this chat.
|
|
@@ -49595,10 +49405,10 @@ Full guide: __tooling__/docs/tools/baker/tags.md`
|
|
|
49595
49405
|
});
|
|
49596
49406
|
|
|
49597
49407
|
// src/commands/testimonials/index.ts
|
|
49598
|
-
import { defineCommand as
|
|
49408
|
+
import { defineCommand as defineCommand206 } from "citty";
|
|
49599
49409
|
|
|
49600
49410
|
// src/commands/testimonials/get.ts
|
|
49601
|
-
import { defineCommand as
|
|
49411
|
+
import { defineCommand as defineCommand203 } from "citty";
|
|
49602
49412
|
registerSchema({
|
|
49603
49413
|
command: "testimonials.get",
|
|
49604
49414
|
description: "Get a single testimonial by ID",
|
|
@@ -49606,7 +49416,7 @@ registerSchema({
|
|
|
49606
49416
|
id: { type: "string", description: "Testimonial ID", required: true }
|
|
49607
49417
|
}
|
|
49608
49418
|
});
|
|
49609
|
-
var getCommand6 =
|
|
49419
|
+
var getCommand6 = defineCommand203({
|
|
49610
49420
|
meta: { name: "get", description: "Get a single testimonial by ID. Example: baker testimonials get j571abc123" },
|
|
49611
49421
|
args: {
|
|
49612
49422
|
id: { type: "positional", description: "Testimonial ID", required: false },
|
|
@@ -49643,7 +49453,7 @@ var getCommand6 = defineCommand204({
|
|
|
49643
49453
|
});
|
|
49644
49454
|
|
|
49645
49455
|
// src/commands/testimonials/list.ts
|
|
49646
|
-
import { defineCommand as
|
|
49456
|
+
import { defineCommand as defineCommand204 } from "citty";
|
|
49647
49457
|
|
|
49648
49458
|
// src/commands/testimonials/emptyCorpusHints.ts
|
|
49649
49459
|
function resolveEmptyReason({
|
|
@@ -49778,7 +49588,7 @@ function buildListParams(args) {
|
|
|
49778
49588
|
}
|
|
49779
49589
|
return params;
|
|
49780
49590
|
}
|
|
49781
|
-
var listCommand18 =
|
|
49591
|
+
var listCommand18 = defineCommand204({
|
|
49782
49592
|
meta: {
|
|
49783
49593
|
name: "list",
|
|
49784
49594
|
description: "List testimonials with optional filters. Example: baker testimonials list --source google --sentiment positive"
|
|
@@ -49830,7 +49640,7 @@ var listCommand18 = defineCommand205({
|
|
|
49830
49640
|
});
|
|
49831
49641
|
|
|
49832
49642
|
// src/commands/testimonials/search.ts
|
|
49833
|
-
import { defineCommand as
|
|
49643
|
+
import { defineCommand as defineCommand205 } from "citty";
|
|
49834
49644
|
var FILTER_FLAGS2 = ["source", "rating-min", "rating-max", "status", "sentiment", "language", "tags"];
|
|
49835
49645
|
function languageBiasHint(results, requestedLanguage) {
|
|
49836
49646
|
if (requestedLanguage) {
|
|
@@ -49909,7 +49719,7 @@ function buildSearchRequest(query, args) {
|
|
|
49909
49719
|
}
|
|
49910
49720
|
return body;
|
|
49911
49721
|
}
|
|
49912
|
-
var searchCommand3 =
|
|
49722
|
+
var searchCommand3 = defineCommand205({
|
|
49913
49723
|
meta: {
|
|
49914
49724
|
name: "search",
|
|
49915
49725
|
description: "Semantic search testimonials by text query. Uses hybrid BM25 + vector + reranking. Example: baker testimonials search 'great service' --rating-min 4"
|
|
@@ -49973,7 +49783,7 @@ var searchCommand3 = defineCommand206({
|
|
|
49973
49783
|
var tagsCommand5 = makeTagsCommand("testimonials", "testimonial", "/api/testimonials/tags");
|
|
49974
49784
|
|
|
49975
49785
|
// src/commands/testimonials/index.ts
|
|
49976
|
-
var testimonialsCommand =
|
|
49786
|
+
var testimonialsCommand = defineCommand206({
|
|
49977
49787
|
meta: {
|
|
49978
49788
|
name: "testimonials",
|
|
49979
49789
|
description: `Find and browse testimonials in Baker. Subcommands: search, get, list, tags.
|
|
@@ -49995,10 +49805,10 @@ Full guide: __tooling__/docs/tools/baker/testimonials.md`
|
|
|
49995
49805
|
});
|
|
49996
49806
|
|
|
49997
49807
|
// src/commands/videos/index.ts
|
|
49998
|
-
import { defineCommand as
|
|
49808
|
+
import { defineCommand as defineCommand213 } from "citty";
|
|
49999
49809
|
|
|
50000
49810
|
// src/commands/videos/delete.ts
|
|
50001
|
-
import { defineCommand as
|
|
49811
|
+
import { defineCommand as defineCommand207 } from "citty";
|
|
50002
49812
|
registerSchema({
|
|
50003
49813
|
command: "videos.delete",
|
|
50004
49814
|
description: "Delete a video by ID",
|
|
@@ -50012,7 +49822,7 @@ registerSchema({
|
|
|
50012
49822
|
}
|
|
50013
49823
|
}
|
|
50014
49824
|
});
|
|
50015
|
-
var deleteCommand4 =
|
|
49825
|
+
var deleteCommand4 = defineCommand207({
|
|
50016
49826
|
meta: {
|
|
50017
49827
|
name: "delete",
|
|
50018
49828
|
description: "Delete a video by ID. Use --dry-run to preview. Example: baker videos delete j571abc123 --dry-run"
|
|
@@ -50053,7 +49863,7 @@ var deleteCommand4 = defineCommand208({
|
|
|
50053
49863
|
});
|
|
50054
49864
|
|
|
50055
49865
|
// src/commands/videos/get.ts
|
|
50056
|
-
import { defineCommand as
|
|
49866
|
+
import { defineCommand as defineCommand208 } from "citty";
|
|
50057
49867
|
registerSchema({
|
|
50058
49868
|
command: "videos.get",
|
|
50059
49869
|
description: "Get a single video by ID",
|
|
@@ -50061,7 +49871,7 @@ registerSchema({
|
|
|
50061
49871
|
id: { type: "string", description: "Video ID", required: true }
|
|
50062
49872
|
}
|
|
50063
49873
|
});
|
|
50064
|
-
var getCommand7 =
|
|
49874
|
+
var getCommand7 = defineCommand208({
|
|
50065
49875
|
meta: { name: "get", description: "Get a single video by ID. Example: baker videos get j571abc123" },
|
|
50066
49876
|
args: {
|
|
50067
49877
|
id: { type: "positional", description: "Video ID", required: false },
|
|
@@ -50098,7 +49908,7 @@ var getCommand7 = defineCommand209({
|
|
|
50098
49908
|
});
|
|
50099
49909
|
|
|
50100
49910
|
// src/commands/videos/group.ts
|
|
50101
|
-
import { defineCommand as
|
|
49911
|
+
import { defineCommand as defineCommand209 } from "citty";
|
|
50102
49912
|
registerSchema({
|
|
50103
49913
|
command: "videos.group",
|
|
50104
49914
|
description: "List every clip and image that arrived in the same set as this video (carousel slides, one page)",
|
|
@@ -50107,7 +49917,7 @@ registerSchema({
|
|
|
50107
49917
|
"group-key": { type: "string", description: "The set key directly, when you already have it", required: false }
|
|
50108
49918
|
}
|
|
50109
49919
|
});
|
|
50110
|
-
var groupCommand2 =
|
|
49920
|
+
var groupCommand2 = defineCommand209({
|
|
50111
49921
|
meta: {
|
|
50112
49922
|
name: "group",
|
|
50113
49923
|
description: "List every asset that arrived in the same set as this clip \u2014 the other slides of the Instagram post it came from, stills included. A carousel is authored to be read in order, so a clip pulled out of one is usually missing half its meaning. Example: baker videos group <videoId>"
|
|
@@ -50130,7 +49940,7 @@ var groupCommand2 = defineCommand210({
|
|
|
50130
49940
|
import { mkdtemp as mkdtemp2, rm as rm7, stat as stat7 } from "fs/promises";
|
|
50131
49941
|
import { tmpdir as tmpdir3 } from "os";
|
|
50132
49942
|
import path38 from "path";
|
|
50133
|
-
import { defineCommand as
|
|
49943
|
+
import { defineCommand as defineCommand210 } from "citty";
|
|
50134
49944
|
|
|
50135
49945
|
// src/lib/streamUpload.ts
|
|
50136
49946
|
import { createHash as createHash2 } from "crypto";
|
|
@@ -50294,7 +50104,7 @@ registerSchema({
|
|
|
50294
50104
|
"dry-run": { type: "boolean", description: "Preview the operation without executing", required: false }
|
|
50295
50105
|
}
|
|
50296
50106
|
});
|
|
50297
|
-
var ingestCommand2 =
|
|
50107
|
+
var ingestCommand2 = defineCommand210({
|
|
50298
50108
|
meta: {
|
|
50299
50109
|
name: "ingest",
|
|
50300
50110
|
description: "Add a video to the library from a URL. A direct file URL is handed straight to Baker, which fetches it. A page URL (YouTube, TikTok, Vimeo, Instagram) is downloaded here first, then uploaded \u2014 and a direct URL that Baker cannot fetch falls back to that same path automatically.\n\nExample: baker videos ingest https://www.youtube.com/watch?v=abc123"
|
|
@@ -50410,35 +50220,35 @@ async function ingestByRoute(args, direct, country) {
|
|
|
50410
50220
|
function reportYtDlpFailure(err) {
|
|
50411
50221
|
const detail = `${err.stderrTail} ${err.message}`;
|
|
50412
50222
|
if (isProxyFailure(ytDlpBlockSignal(detail))) {
|
|
50413
|
-
|
|
50223
|
+
fail7(
|
|
50414
50224
|
"Couldn't download that video: our connection to the internet was refused.",
|
|
50415
50225
|
"This is Baker's egress proxy, not the link \u2014 its credentials look wrong or expired. The link is probably fine. Report it; retrying won't help until the proxy is fixed."
|
|
50416
50226
|
);
|
|
50417
50227
|
}
|
|
50418
50228
|
if (isDrmProtected(detail)) {
|
|
50419
|
-
|
|
50229
|
+
fail7(
|
|
50420
50230
|
"That video is copy-protected, so it can't be added to the library.",
|
|
50421
50231
|
"The publisher encrypted this one against downloading. Nothing will change that \u2014 not retrying, not a different region. Ask whoever owns the video for the original file and add it with `baker videos upload <file>`."
|
|
50422
50232
|
);
|
|
50423
50233
|
}
|
|
50424
50234
|
if (isVimeoAuthFailure(detail)) {
|
|
50425
|
-
|
|
50235
|
+
fail7(
|
|
50426
50236
|
"Vimeo wouldn't hand over that video \u2014 Baker isn't signed in to Vimeo.",
|
|
50427
50237
|
"Vimeo now refuses anonymous downloads entirely, so this needs a signed-in session and the one Baker holds has either expired or was never set. Nothing is wrong with the link. Report it so the Vimeo cookie can be refreshed; meanwhile download the file and use `baker videos upload <file>`."
|
|
50428
50238
|
);
|
|
50429
50239
|
}
|
|
50430
50240
|
if (isRegionBlocked(detail)) {
|
|
50431
|
-
|
|
50241
|
+
fail7(
|
|
50432
50242
|
`That video isn't available in the region we're fetching from. ${err.stderrTail || err.message}`,
|
|
50433
50243
|
"Re-run with `--country <two-letter code>` for a country where the video plays \u2014 e.g. `--country US`. Pick the one the video belongs to (the uploader's country is the usual answer); each attempt costs a paid connection, so choose rather than work through the list."
|
|
50434
50244
|
);
|
|
50435
50245
|
}
|
|
50436
|
-
|
|
50246
|
+
fail7(
|
|
50437
50247
|
`Couldn't download that video. ${err.stderrTail || err.message}`,
|
|
50438
50248
|
isToolingOrBlockFailure(detail) ? "The site wouldn't hand over the video \u2014 usually the downloader being out of date against a site that changed, or the request being blocked. Retrying won't help, and the link is probably fine. Report it so the tool can be updated; meanwhile download the file and use `baker videos upload <file>`." : "Check the link is public and playable. Private or age-restricted videos can't be downloaded \u2014 download the file yourself and use `baker videos upload <file>`."
|
|
50439
50249
|
);
|
|
50440
50250
|
}
|
|
50441
|
-
function
|
|
50251
|
+
function fail7(message, fix, code = "INGEST_FAILED") {
|
|
50442
50252
|
writeJson({ ok: false, error: { code, message, fix } });
|
|
50443
50253
|
process.exit(1);
|
|
50444
50254
|
}
|
|
@@ -50450,13 +50260,13 @@ function reportIngestFailure(err) {
|
|
|
50450
50260
|
if (err instanceof YtDlpError) reportYtDlpFailure(err);
|
|
50451
50261
|
const detail = err instanceof Error ? err.message : String(err);
|
|
50452
50262
|
if (detail.includes("timed out after")) {
|
|
50453
|
-
|
|
50263
|
+
fail7(
|
|
50454
50264
|
"That video took too long to download and was stopped part-way.",
|
|
50455
50265
|
"Long or slow-serving videos can outrun the download window. Try a shorter clip, or download this one yourself and use `baker videos upload <file>`.",
|
|
50456
50266
|
"INTERNAL_ERROR"
|
|
50457
50267
|
);
|
|
50458
50268
|
}
|
|
50459
|
-
|
|
50269
|
+
fail7(
|
|
50460
50270
|
`Couldn't add that video. ${detail}`,
|
|
50461
50271
|
"This is a fault on Baker's side, not a problem with the link. Report it.",
|
|
50462
50272
|
"INTERNAL_ERROR"
|
|
@@ -50556,7 +50366,7 @@ async function uploadToAssetStore(filePath, sizeBytes) {
|
|
|
50556
50366
|
}
|
|
50557
50367
|
|
|
50558
50368
|
// src/commands/videos/search.ts
|
|
50559
|
-
import { defineCommand as
|
|
50369
|
+
import { defineCommand as defineCommand211 } from "citty";
|
|
50560
50370
|
registerSchema({
|
|
50561
50371
|
command: "videos.search",
|
|
50562
50372
|
description: "Search videos by text query. Only returns ready videos.",
|
|
@@ -50566,7 +50376,7 @@ registerSchema({
|
|
|
50566
50376
|
tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
|
|
50567
50377
|
}
|
|
50568
50378
|
});
|
|
50569
|
-
var searchCommand4 =
|
|
50379
|
+
var searchCommand4 = defineCommand211({
|
|
50570
50380
|
meta: {
|
|
50571
50381
|
name: "search",
|
|
50572
50382
|
description: "Semantic search videos by text query. Uses hybrid BM25 + vector + reranking. Example: baker videos search 'product demo' --tags tutorial"
|
|
@@ -50618,7 +50428,7 @@ var tagsCommand6 = makeTagsCommand("videos", "video", "/api/videos/tags");
|
|
|
50618
50428
|
// src/commands/videos/upload.ts
|
|
50619
50429
|
import { readFile as readFile25, stat as stat8 } from "fs/promises";
|
|
50620
50430
|
import { basename as basename3, extname as extname4 } from "path";
|
|
50621
|
-
import { defineCommand as
|
|
50431
|
+
import { defineCommand as defineCommand212 } from "citty";
|
|
50622
50432
|
var MIME_MAP = {
|
|
50623
50433
|
".mp4": "video/mp4",
|
|
50624
50434
|
".mov": "video/quicktime",
|
|
@@ -50660,7 +50470,7 @@ function detectContentType(filePath) {
|
|
|
50660
50470
|
function isRemoteUrl3(value) {
|
|
50661
50471
|
return /^https?:\/\//i.test(value);
|
|
50662
50472
|
}
|
|
50663
|
-
var uploadCommand2 =
|
|
50473
|
+
var uploadCommand2 = defineCommand212({
|
|
50664
50474
|
meta: {
|
|
50665
50475
|
name: "upload",
|
|
50666
50476
|
description: "Upload a video to Baker \u2014 accepts a local file path OR a remote http(s) URL.\n\nLocal: auto-detects content type and uploads via Mux direct upload.\nRemote: hands off to `videos ingest` (direct fetch, or download-then-upload for a YouTube/TikTok/Vimeo page).\n\nExamples:\n baker videos upload ./demo.mp4\n baker videos upload https://www.youtube.com/watch?v=abc123"
|
|
@@ -50744,7 +50554,7 @@ var uploadCommand2 = defineCommand213({
|
|
|
50744
50554
|
});
|
|
50745
50555
|
|
|
50746
50556
|
// src/commands/videos/index.ts
|
|
50747
|
-
var videosCommand =
|
|
50557
|
+
var videosCommand = defineCommand213({
|
|
50748
50558
|
meta: {
|
|
50749
50559
|
name: "videos",
|
|
50750
50560
|
description: `Find and manage videos in Baker. Subcommands: search, get, upload, ingest, delete, tags.
|
|
@@ -50771,10 +50581,10 @@ Full guide: __tooling__/docs/tools/baker/videos.md`
|
|
|
50771
50581
|
});
|
|
50772
50582
|
|
|
50773
50583
|
// src/commands/winning-ads/index.ts
|
|
50774
|
-
import { defineCommand as
|
|
50584
|
+
import { defineCommand as defineCommand226 } from "citty";
|
|
50775
50585
|
|
|
50776
50586
|
// src/commands/winning-ads/advertisers.ts
|
|
50777
|
-
import { defineCommand as
|
|
50587
|
+
import { defineCommand as defineCommand214 } from "citty";
|
|
50778
50588
|
|
|
50779
50589
|
// src/commands/winning-ads/shared.ts
|
|
50780
50590
|
function splitList2(value) {
|
|
@@ -50827,7 +50637,7 @@ function advertiserNormalizer(record, full) {
|
|
|
50827
50637
|
last_synced_at: record.last_synced_at ?? null
|
|
50828
50638
|
};
|
|
50829
50639
|
}
|
|
50830
|
-
var advertisersCommand2 =
|
|
50640
|
+
var advertisersCommand2 = defineCommand214({
|
|
50831
50641
|
meta: {
|
|
50832
50642
|
name: "advertisers",
|
|
50833
50643
|
description: 'List corpus advertisers by name or domain. Find your own advertiser for --exclude-advertiser, or a competitor for --advertiser-id / winners. Example: baker winning-ads advertisers "Deel" --output md'
|
|
@@ -50885,7 +50695,7 @@ var advertisersCommand2 = defineCommand215({
|
|
|
50885
50695
|
});
|
|
50886
50696
|
|
|
50887
50697
|
// src/commands/winning-ads/brief.ts
|
|
50888
|
-
import { defineCommand as
|
|
50698
|
+
import { defineCommand as defineCommand215 } from "citty";
|
|
50889
50699
|
registerSchema({
|
|
50890
50700
|
command: "winning-ads.brief",
|
|
50891
50701
|
description: "Generate a creative brief grounded in strategically-similar winning ads. Optionally describe the target creative with --dna (JSON) and steer with --notes.",
|
|
@@ -50931,7 +50741,7 @@ function parseDna(raw) {
|
|
|
50931
50741
|
}
|
|
50932
50742
|
return parsed;
|
|
50933
50743
|
}
|
|
50934
|
-
var briefCommand =
|
|
50744
|
+
var briefCommand = defineCommand215({
|
|
50935
50745
|
meta: {
|
|
50936
50746
|
name: "brief",
|
|
50937
50747
|
description: `Generate a creative brief from winning references. Example: baker winning-ads brief --dna '{"angle":"cost savings"}' --notes "B2B, LinkedIn video" --k 8`
|
|
@@ -50967,7 +50777,7 @@ var briefCommand = defineCommand216({
|
|
|
50967
50777
|
});
|
|
50968
50778
|
|
|
50969
50779
|
// src/commands/winning-ads/content.ts
|
|
50970
|
-
import { defineCommand as
|
|
50780
|
+
import { defineCommand as defineCommand216 } from "citty";
|
|
50971
50781
|
registerSchema({
|
|
50972
50782
|
command: "winning-ads.content",
|
|
50973
50783
|
description: "Read what's INSIDE one winning ad: the spoken transcript, the on-screen text, and the ad copy. Use this after `search`/`winners`/`feed` return a shortlist \u2014 pass an ad_id to understand a reference before reproducing it. Add --full for speech, pacing, and soundtrack detail. Video ads carry the transcript/on-screen text; static ads carry only the copy.",
|
|
@@ -50980,7 +50790,7 @@ registerSchema({
|
|
|
50980
50790
|
}
|
|
50981
50791
|
}
|
|
50982
50792
|
});
|
|
50983
|
-
var contentCommand =
|
|
50793
|
+
var contentCommand = defineCommand216({
|
|
50984
50794
|
meta: {
|
|
50985
50795
|
name: "content",
|
|
50986
50796
|
description: "Read the transcript + on-screen text + copy of one winning ad. Example: baker winning-ads content adg_123 --platform meta --full --output md"
|
|
@@ -51029,7 +50839,7 @@ var contentCommand = defineCommand217({
|
|
|
51029
50839
|
});
|
|
51030
50840
|
|
|
51031
50841
|
// src/commands/winning-ads/feed.ts
|
|
51032
|
-
import { defineCommand as
|
|
50842
|
+
import { defineCommand as defineCommand217 } from "citty";
|
|
51033
50843
|
function buildFeedParams(input) {
|
|
51034
50844
|
const params = {};
|
|
51035
50845
|
const advertiser = splitList2(input.advertiser);
|
|
@@ -51081,7 +50891,7 @@ registerSchema({
|
|
|
51081
50891
|
format: { type: "string", description: "Comma-separated formats to include (e.g. static,video)", required: false }
|
|
51082
50892
|
}
|
|
51083
50893
|
});
|
|
51084
|
-
var feedCommand =
|
|
50894
|
+
var feedCommand = defineCommand217({
|
|
51085
50895
|
meta: {
|
|
51086
50896
|
name: "feed",
|
|
51087
50897
|
description: "Winners across every brand you follow (browse, then trim per advertiser). Example: baker winning-ads feed --per-advertiser 5 --output md"
|
|
@@ -51166,7 +50976,7 @@ var feedCommand = defineCommand218({
|
|
|
51166
50976
|
});
|
|
51167
50977
|
|
|
51168
50978
|
// src/commands/winning-ads/follow.ts
|
|
51169
|
-
import { defineCommand as
|
|
50979
|
+
import { defineCommand as defineCommand218 } from "citty";
|
|
51170
50980
|
var PLATFORMS = ["meta", "linkedin"];
|
|
51171
50981
|
registerSchema({
|
|
51172
50982
|
command: "winning-ads.follow",
|
|
@@ -51181,7 +50991,7 @@ registerSchema({
|
|
|
51181
50991
|
label: { type: "string", description: "Optional display label (defaults to the resolved name)", required: false }
|
|
51182
50992
|
}
|
|
51183
50993
|
});
|
|
51184
|
-
var followCommand =
|
|
50994
|
+
var followCommand = defineCommand218({
|
|
51185
50995
|
meta: {
|
|
51186
50996
|
name: "follow",
|
|
51187
50997
|
description: 'Follow a brand to track ALL its ads \u2014 every platform and country. --platform is how we read your input, not a limit. A domain tracks both Meta + LinkedIn. Example: baker winning-ads follow "deel.com" --platform meta'
|
|
@@ -51228,7 +51038,7 @@ var followCommand = defineCommand219({
|
|
|
51228
51038
|
});
|
|
51229
51039
|
|
|
51230
51040
|
// src/commands/winning-ads/follow-competitors.ts
|
|
51231
|
-
import { defineCommand as
|
|
51041
|
+
import { defineCommand as defineCommand219 } from "citty";
|
|
51232
51042
|
var PLATFORMS2 = ["meta", "linkedin"];
|
|
51233
51043
|
var BATCH_TIMEOUT_MS = 3e5;
|
|
51234
51044
|
function buildFollowBatchBody(input) {
|
|
@@ -51261,7 +51071,7 @@ registerSchema({
|
|
|
51261
51071
|
}
|
|
51262
51072
|
}
|
|
51263
51073
|
});
|
|
51264
|
-
var followCompetitorsCommand =
|
|
51074
|
+
var followCompetitorsCommand = defineCommand219({
|
|
51265
51075
|
meta: {
|
|
51266
51076
|
name: "follow-competitors",
|
|
51267
51077
|
description: 'Follow many brands at once by domain \u2014 add every competitor in one call. Example: baker winning-ads follow-competitors "deel.com,notion.so,hubspot.com"'
|
|
@@ -51336,7 +51146,7 @@ var followCompetitorsCommand = defineCommand220({
|
|
|
51336
51146
|
});
|
|
51337
51147
|
|
|
51338
51148
|
// src/commands/winning-ads/following.ts
|
|
51339
|
-
import { defineCommand as
|
|
51149
|
+
import { defineCommand as defineCommand220 } from "citty";
|
|
51340
51150
|
registerSchema({
|
|
51341
51151
|
command: "winning-ads.following",
|
|
51342
51152
|
description: "List the brands you follow in your ad-dna library, with each one's status (ready vs still adding) and cached ad counts. A brand still adding has counts that are a lie in progress; one with `discovery_failed` has counts that are short because we couldn't finish looking, which is not the same as it running no ads.",
|
|
@@ -51390,7 +51200,7 @@ function followingNormalizer(record, full) {
|
|
|
51390
51200
|
platforms: Array.isArray(record.platforms) ? record.platforms : []
|
|
51391
51201
|
};
|
|
51392
51202
|
}
|
|
51393
|
-
var followingCommand =
|
|
51203
|
+
var followingCommand = defineCommand220({
|
|
51394
51204
|
meta: {
|
|
51395
51205
|
name: "following",
|
|
51396
51206
|
description: "List brands you follow, with status (ready / adding\u2026) and cached counts. A brand's counts are only final once it is ready. Example: baker winning-ads following --output md"
|
|
@@ -51426,7 +51236,7 @@ var followingCommand = defineCommand221({
|
|
|
51426
51236
|
});
|
|
51427
51237
|
|
|
51428
51238
|
// src/commands/winning-ads/patterns.ts
|
|
51429
|
-
import { defineCommand as
|
|
51239
|
+
import { defineCommand as defineCommand221 } from "citty";
|
|
51430
51240
|
registerSchema({
|
|
51431
51241
|
command: "winning-ads.patterns",
|
|
51432
51242
|
description: "Mine what separates two cohorts of ads: pass a comma-list of winning ad ids (--winners) and a comma-list of weaker ad ids (--duds). Returns the discriminating DNA fields.",
|
|
@@ -51465,7 +51275,7 @@ function discriminatorRow(record) {
|
|
|
51465
51275
|
top_values_duds: Array.isArray(record.top_values_b) ? record.top_values_b.join(", ") : ""
|
|
51466
51276
|
};
|
|
51467
51277
|
}
|
|
51468
|
-
var patternsCommand =
|
|
51278
|
+
var patternsCommand = defineCommand221({
|
|
51469
51279
|
meta: {
|
|
51470
51280
|
name: "patterns",
|
|
51471
51281
|
description: "Discover what separates winning ads from weak ones. Example: baker winning-ads patterns --winners a_1,a_2,a_3 --duds a_9,a_8 --output md"
|
|
@@ -51521,7 +51331,7 @@ var patternsCommand = defineCommand222({
|
|
|
51521
51331
|
});
|
|
51522
51332
|
|
|
51523
51333
|
// src/commands/winning-ads/search.ts
|
|
51524
|
-
import { defineCommand as
|
|
51334
|
+
import { defineCommand as defineCommand222 } from "citty";
|
|
51525
51335
|
registerSchema({
|
|
51526
51336
|
command: "winning-ads.search",
|
|
51527
51337
|
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.",
|
|
@@ -51629,7 +51439,7 @@ function buildSearchBody2(args) {
|
|
|
51629
51439
|
}
|
|
51630
51440
|
return body;
|
|
51631
51441
|
}
|
|
51632
|
-
var searchCommand5 =
|
|
51442
|
+
var searchCommand5 = defineCommand222({
|
|
51633
51443
|
meta: {
|
|
51634
51444
|
name: "search",
|
|
51635
51445
|
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"
|
|
@@ -51744,7 +51554,7 @@ var searchCommand5 = defineCommand223({
|
|
|
51744
51554
|
});
|
|
51745
51555
|
|
|
51746
51556
|
// src/commands/winning-ads/seeds.ts
|
|
51747
|
-
import { defineCommand as
|
|
51557
|
+
import { defineCommand as defineCommand223 } from "citty";
|
|
51748
51558
|
function leanRow(r) {
|
|
51749
51559
|
return {
|
|
51750
51560
|
key: r.key,
|
|
@@ -51772,7 +51582,7 @@ function makeSeedCommand(opts) {
|
|
|
51772
51582
|
limit: { type: "number", description: "Max keys 1-100 (default 20)", required: false, default: 20 }
|
|
51773
51583
|
}
|
|
51774
51584
|
});
|
|
51775
|
-
return
|
|
51585
|
+
return defineCommand223({
|
|
51776
51586
|
meta: { name: opts.name, description: opts.description },
|
|
51777
51587
|
args: {
|
|
51778
51588
|
platform: { type: "string", description: "Single platform to segment on", required: false },
|
|
@@ -51821,7 +51631,7 @@ var formatsCommand = makeSeedCommand({
|
|
|
51821
51631
|
});
|
|
51822
51632
|
|
|
51823
51633
|
// src/commands/winning-ads/unfollow.ts
|
|
51824
|
-
import { defineCommand as
|
|
51634
|
+
import { defineCommand as defineCommand224 } from "citty";
|
|
51825
51635
|
registerSchema({
|
|
51826
51636
|
command: "winning-ads.unfollow",
|
|
51827
51637
|
description: "Stop following a brand \u2014 removes it from your ad-dna library by advertiser id.",
|
|
@@ -51829,7 +51639,7 @@ registerSchema({
|
|
|
51829
51639
|
advertiser: { type: "string", description: "Advertiser id to unfollow", required: true }
|
|
51830
51640
|
}
|
|
51831
51641
|
});
|
|
51832
|
-
var unfollowCommand =
|
|
51642
|
+
var unfollowCommand = defineCommand224({
|
|
51833
51643
|
meta: {
|
|
51834
51644
|
name: "unfollow",
|
|
51835
51645
|
description: "Stop following a brand by advertiser id. Example: baker winning-ads unfollow adv_123"
|
|
@@ -51850,7 +51660,7 @@ var unfollowCommand = defineCommand225({
|
|
|
51850
51660
|
});
|
|
51851
51661
|
|
|
51852
51662
|
// src/commands/winning-ads/winners.ts
|
|
51853
|
-
import { defineCommand as
|
|
51663
|
+
import { defineCommand as defineCommand225 } from "citty";
|
|
51854
51664
|
registerSchema({
|
|
51855
51665
|
command: "winning-ads.winners",
|
|
51856
51666
|
description: "Top winning ads for one advertiser id (from `advertisers` or `following`). Returns lean winner cards; add --full for DNA + longevity.",
|
|
@@ -51860,7 +51670,7 @@ registerSchema({
|
|
|
51860
51670
|
platform: { type: "string", description: "Filter to a single platform: meta|linkedin", required: false }
|
|
51861
51671
|
}
|
|
51862
51672
|
});
|
|
51863
|
-
var winnersCommand =
|
|
51673
|
+
var winnersCommand = defineCommand225({
|
|
51864
51674
|
meta: {
|
|
51865
51675
|
name: "winners",
|
|
51866
51676
|
description: "Top winning ads for a specific advertiser id. Example: baker winning-ads winners adv_123 --top 15 --output md"
|
|
@@ -51910,7 +51720,7 @@ var winnersCommand = defineCommand226({
|
|
|
51910
51720
|
});
|
|
51911
51721
|
|
|
51912
51722
|
// src/commands/winning-ads/index.ts
|
|
51913
|
-
var winningAdsCommand =
|
|
51723
|
+
var winningAdsCommand = defineCommand226({
|
|
51914
51724
|
meta: {
|
|
51915
51725
|
name: "winning-ads",
|
|
51916
51726
|
description: `Search the ad-dna corpus of scored "winning" ads for reference creatives to reproduce, and manage the brands your library tracks. Proxied through the Baker backend (BAKER_API_KEY) \u2014 no separate token needed.
|
|
@@ -52148,7 +51958,7 @@ function getCliVersion() {
|
|
|
52148
51958
|
}
|
|
52149
51959
|
|
|
52150
51960
|
// src/cli.ts
|
|
52151
|
-
var main =
|
|
51961
|
+
var main = defineCommand227({
|
|
52152
51962
|
meta: {
|
|
52153
51963
|
name: "baker",
|
|
52154
51964
|
version: getCliVersion(),
|
|
@@ -52167,7 +51977,6 @@ Introspection: Run 'baker schema <command>' to inspect argument schemas.`
|
|
|
52167
51977
|
ads: adsCommand2,
|
|
52168
51978
|
brand: brandCommand,
|
|
52169
51979
|
analytics: analyticsCommand2,
|
|
52170
|
-
experiment: experimentCommand,
|
|
52171
51980
|
ga4: ga4Command,
|
|
52172
51981
|
gsc: gscCommand,
|
|
52173
51982
|
research: researchCommand,
|