@koda-sl/baker-cli 0.193.0 → 0.194.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 +13 -2
- package/dist/cli.js +717 -372
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -90,7 +90,7 @@ import {
|
|
|
90
90
|
} from "./chunk-YL3HDEIJ.js";
|
|
91
91
|
|
|
92
92
|
// src/cli.ts
|
|
93
|
-
import { defineCommand as
|
|
93
|
+
import { defineCommand as defineCommand213, runMain } from "citty";
|
|
94
94
|
|
|
95
95
|
// src/commands/actions/index.ts
|
|
96
96
|
import { defineCommand as defineCommand18 } from "citty";
|
|
@@ -15733,6 +15733,77 @@ var IMAGE_HASH_REGEX = /^[A-Fa-f0-9]{16,}$/;
|
|
|
15733
15733
|
|
|
15734
15734
|
// ../api/src/ads-meta/ops.ts
|
|
15735
15735
|
import { z as z20 } from "zod";
|
|
15736
|
+
|
|
15737
|
+
// ../api/src/ads-meta/placements.ts
|
|
15738
|
+
var FACEBOOK_POSITIONS_REQUIRING_FEED = ["marketplace", "search", "profile_feed", "notification"];
|
|
15739
|
+
var PLACEMENT_TARGETING_DOC = "https://developers.facebook.com/docs/marketing-api/audiences/reference/placement-targeting/";
|
|
15740
|
+
var CONSTRAINED_PLACEMENTS = [
|
|
15741
|
+
{
|
|
15742
|
+
position: "facebook_reels_overlay",
|
|
15743
|
+
reportedAs: "facebook_reels_overlay",
|
|
15744
|
+
platform: "facebook",
|
|
15745
|
+
kind: "constraint",
|
|
15746
|
+
note: "Ads on Facebook Reels take two shapes and a stock 9:16 video fits neither: overlay ads are 'a single, static image ad' (JPG/PNG, 1:1, 0% ratio tolerance, headline capped at 10 characters), and post-loop ads are 1:1 video of 4-15 seconds. Expect a long-headline 9:16 creative to look wrong here.",
|
|
15747
|
+
contested: false,
|
|
15748
|
+
source: "https://www.facebook.com/business/ads-guide/update/image/facebook-facebook-reels-overlay"
|
|
15749
|
+
},
|
|
15750
|
+
{
|
|
15751
|
+
position: "explore_home",
|
|
15752
|
+
reportedAs: "instagram_explore_grid_home",
|
|
15753
|
+
platform: "instagram",
|
|
15754
|
+
kind: "constraint",
|
|
15755
|
+
note: "Marketing API placement asset customization states 'The explore_home placement only supports the SINGLE_IMAGE format', but Meta's own Ads Guide lists Instagram Explore home under video specs. Check the account's play rate for this position before treating it as image-only.",
|
|
15756
|
+
contested: true,
|
|
15757
|
+
source: "https://developers.facebook.com/docs/marketing-api/dynamic-creative/placement-asset-customization/"
|
|
15758
|
+
},
|
|
15759
|
+
{
|
|
15760
|
+
position: "right_hand_column",
|
|
15761
|
+
reportedAs: "right_hand_column",
|
|
15762
|
+
platform: "facebook",
|
|
15763
|
+
kind: "correction",
|
|
15764
|
+
note: "Facebook right column publishes full video specs (MP4/MOV/GIF, 1:1 at 1440x1440 or mobile-only 4:5 at 1440x1800, 1 second to 241 minutes) \u2014 it is NOT image-only. Its real constraint is that it cannot be the only placement for a video, collection, or canvas ad.",
|
|
15765
|
+
contested: false,
|
|
15766
|
+
source: "https://www.facebook.com/business/ads-guide/update/video/facebook-right-hand-column"
|
|
15767
|
+
}
|
|
15768
|
+
];
|
|
15769
|
+
var FACEBOOK_PREVIEW_FORMATS = {
|
|
15770
|
+
feed: "MOBILE_FEED_STANDARD",
|
|
15771
|
+
right_hand_column: "RIGHT_COLUMN_STANDARD",
|
|
15772
|
+
marketplace: "MARKETPLACE_MOBILE",
|
|
15773
|
+
facebook_stories: "FACEBOOK_STORY_MOBILE",
|
|
15774
|
+
facebook_reels: "FACEBOOK_REELS_MOBILE",
|
|
15775
|
+
facebook_reels_overlay: "FACEBOOK_REELS_BANNER",
|
|
15776
|
+
instream_video: "INSTREAM_VIDEO_MOBILE",
|
|
15777
|
+
video_feeds: "INSTREAM_VIDEO_MOBILE"
|
|
15778
|
+
};
|
|
15779
|
+
var INSTAGRAM_PREVIEW_FORMATS = {
|
|
15780
|
+
feed: "INSTAGRAM_STANDARD",
|
|
15781
|
+
instagram_stories: "INSTAGRAM_STORY",
|
|
15782
|
+
instagram_reels: "INSTAGRAM_REELS",
|
|
15783
|
+
instagram_explore: "INSTAGRAM_EXPLORE_CONTEXTUAL",
|
|
15784
|
+
instagram_explore_grid_home: "INSTAGRAM_EXPLORE_GRID_HOME",
|
|
15785
|
+
instagram_search: "INSTAGRAM_SEARCH_CHAIN",
|
|
15786
|
+
instagram_profile_feed: "INSTAGRAM_PROFILE_FEED"
|
|
15787
|
+
};
|
|
15788
|
+
var PLATFORM_SCOPED_POSITIONS = /* @__PURE__ */ new Set(["feed"]);
|
|
15789
|
+
function previewFormatForPosition(position, platform) {
|
|
15790
|
+
if (platform === "facebook") return FACEBOOK_PREVIEW_FORMATS[position];
|
|
15791
|
+
if (platform === "instagram") return INSTAGRAM_PREVIEW_FORMATS[position];
|
|
15792
|
+
if (PLATFORM_SCOPED_POSITIONS.has(position)) return void 0;
|
|
15793
|
+
return FACEBOOK_PREVIEW_FORMATS[position] ?? INSTAGRAM_PREVIEW_FORMATS[position];
|
|
15794
|
+
}
|
|
15795
|
+
function placementFormatNote(reportedPosition) {
|
|
15796
|
+
return CONSTRAINED_PLACEMENTS.find((p) => p.reportedAs === reportedPosition);
|
|
15797
|
+
}
|
|
15798
|
+
function positionsMissingRequiredFeed(targeting) {
|
|
15799
|
+
const positions = targeting?.facebook_positions;
|
|
15800
|
+
if (!positions?.length || positions.includes("feed")) {
|
|
15801
|
+
return [];
|
|
15802
|
+
}
|
|
15803
|
+
return FACEBOOK_POSITIONS_REQUIRING_FEED.filter((required) => positions.includes(required));
|
|
15804
|
+
}
|
|
15805
|
+
|
|
15806
|
+
// ../api/src/ads-meta/ops.ts
|
|
15736
15807
|
var tempRefSchema3 = z20.string().regex(TEMP_REF_REGEX3, "expected a meta_temp_* reference");
|
|
15737
15808
|
var parentRefSchema2 = z20.union([z20.string().regex(NUMERIC_ID_REGEX3, "expected a numeric id"), tempRefSchema3]);
|
|
15738
15809
|
var moneySchema2 = z20.object({
|
|
@@ -16003,10 +16074,21 @@ function validateAdvantageAudience(p, ctx) {
|
|
|
16003
16074
|
});
|
|
16004
16075
|
}
|
|
16005
16076
|
}
|
|
16077
|
+
function validateAdSetPlacements(p, ctx) {
|
|
16078
|
+
const missingFeed = positionsMissingRequiredFeed(p.targeting);
|
|
16079
|
+
if (missingFeed.length > 0) {
|
|
16080
|
+
ctx.addIssue({
|
|
16081
|
+
code: "custom",
|
|
16082
|
+
path: ["targeting", "facebook_positions"],
|
|
16083
|
+
message: `Meta requires "feed" alongside ${missingFeed.join(", ")} \u2014 add "feed" to facebook_positions or drop those positions (${PLACEMENT_TARGETING_DOC})`
|
|
16084
|
+
});
|
|
16085
|
+
}
|
|
16086
|
+
}
|
|
16006
16087
|
var adSetCreateSchema = z20.object(adSetFields).superRefine((p, ctx) => {
|
|
16007
16088
|
validateAdSetBudgetAndBid(p, ctx);
|
|
16008
16089
|
validateAdSetPromotedObject(p, ctx);
|
|
16009
16090
|
validateAdvantageAudience(p, ctx);
|
|
16091
|
+
validateAdSetPlacements(p, ctx);
|
|
16010
16092
|
if (!targetingHasGeoOrAudience(p.targeting)) {
|
|
16011
16093
|
ctx.addIssue({
|
|
16012
16094
|
code: "custom",
|
|
@@ -16040,6 +16122,7 @@ var adSetUpdateSchema = z20.object({
|
|
|
16040
16122
|
validateAdSetPromotedObject(p, ctx);
|
|
16041
16123
|
}
|
|
16042
16124
|
validateAdvantageAudience(p, ctx);
|
|
16125
|
+
validateAdSetPlacements(p, ctx);
|
|
16043
16126
|
});
|
|
16044
16127
|
var messageSchema = z20.string().min(1).max(META_LIMITS.creative.messageHardMax);
|
|
16045
16128
|
var headlineSchema2 = z20.string().min(1).max(META_LIMITS.creative.headlineMax);
|
|
@@ -17444,6 +17527,81 @@ var metaDraftCommand = defineCommand62({
|
|
|
17444
17527
|
// src/commands/ads/meta/insights.ts
|
|
17445
17528
|
import { defineCommand as defineCommand63 } from "citty";
|
|
17446
17529
|
|
|
17530
|
+
// src/commands/ads/meta/placement-delivery.ts
|
|
17531
|
+
var MIN_IMPRESSIONS = 20;
|
|
17532
|
+
var SILENT_FRACTION_OF_REFERENCE = 0.1;
|
|
17533
|
+
var PLAYING_REFERENCE_RATE = 0.5;
|
|
17534
|
+
function toNumber(value) {
|
|
17535
|
+
const n = Number(value);
|
|
17536
|
+
return Number.isFinite(n) ? n : 0;
|
|
17537
|
+
}
|
|
17538
|
+
function sumActionValues(value) {
|
|
17539
|
+
if (!Array.isArray(value)) return 0;
|
|
17540
|
+
return value.reduce((total, entry) => {
|
|
17541
|
+
const item = entry;
|
|
17542
|
+
return total + toNumber(item?.value);
|
|
17543
|
+
}, 0);
|
|
17544
|
+
}
|
|
17545
|
+
function aggregate(rows) {
|
|
17546
|
+
const byPlacement = /* @__PURE__ */ new Map();
|
|
17547
|
+
let totalImpressions = 0;
|
|
17548
|
+
for (const row of rows) {
|
|
17549
|
+
const position = row.platform_position;
|
|
17550
|
+
if (typeof position !== "string" || position.length === 0) continue;
|
|
17551
|
+
const platform = typeof row.publisher_platform === "string" ? row.publisher_platform : "";
|
|
17552
|
+
const impressions = toNumber(row.impressions);
|
|
17553
|
+
totalImpressions += impressions;
|
|
17554
|
+
const key = `${platform}/${position}`;
|
|
17555
|
+
const current = byPlacement.get(key) ?? { platform, position, impressions: 0, plays: 0, playRate: 0, share: 0 };
|
|
17556
|
+
current.impressions += impressions;
|
|
17557
|
+
current.plays += sumActionValues(row.video_play_actions);
|
|
17558
|
+
byPlacement.set(key, current);
|
|
17559
|
+
}
|
|
17560
|
+
return [...byPlacement.values()].map((placement) => ({
|
|
17561
|
+
...placement,
|
|
17562
|
+
playRate: placement.impressions > 0 ? placement.plays / placement.impressions : 0,
|
|
17563
|
+
share: totalImpressions > 0 ? placement.impressions / totalImpressions : 0
|
|
17564
|
+
}));
|
|
17565
|
+
}
|
|
17566
|
+
function previewCommand(placement) {
|
|
17567
|
+
const format = previewFormatForPosition(placement.position, placement.platform);
|
|
17568
|
+
return format ? `\`baker ads meta preview --creative-id <id> --placement ${placement.position} --platform ${placement.platform}\`` : `no preview format is known for ${placement.position}, so Meta's renderer cannot confirm it \u2014 say the placement is unverified rather than filling the gap`;
|
|
17569
|
+
}
|
|
17570
|
+
function isSingleAdQuery(rows) {
|
|
17571
|
+
const adIds = /* @__PURE__ */ new Set();
|
|
17572
|
+
for (const row of rows) {
|
|
17573
|
+
if (typeof row.ad_id !== "string" || row.ad_id.length === 0) return false;
|
|
17574
|
+
adIds.add(row.ad_id);
|
|
17575
|
+
}
|
|
17576
|
+
return adIds.size === 1;
|
|
17577
|
+
}
|
|
17578
|
+
function placementDeliveryHints(rows) {
|
|
17579
|
+
const carriesVideoMetrics = rows.some((row) => Array.isArray(row.video_play_actions));
|
|
17580
|
+
if (!carriesVideoMetrics || !isSingleAdQuery(rows)) return [];
|
|
17581
|
+
const placements = aggregate(rows);
|
|
17582
|
+
const judgeable = placements.filter((p) => p.impressions >= MIN_IMPRESSIONS);
|
|
17583
|
+
const impressions = judgeable.reduce((total, p) => total + p.impressions, 0);
|
|
17584
|
+
const reference = impressions > 0 ? judgeable.reduce((total, p) => total + p.plays, 0) / impressions : 0;
|
|
17585
|
+
if (reference < PLAYING_REFERENCE_RATE) return [];
|
|
17586
|
+
const silent = judgeable.filter((p) => p.playRate < reference * SILENT_FRACTION_OF_REFERENCE).sort((a, b) => b.impressions - a.impressions);
|
|
17587
|
+
if (silent.length === 0) {
|
|
17588
|
+
const worst = [...judgeable].sort((a, b) => a.playRate - b.playRate)[0];
|
|
17589
|
+
return [
|
|
17590
|
+
`Checked every placement above ${MIN_IMPRESSIONS} impressions against this ad's own play rate (${(reference * 100).toFixed(0)}%): no placement is failing to play the video${worst ? `, the lowest being ${worst.platform}/${worst.position} at ${(worst.playRate * 100).toFixed(0)}%` : ""}. So placements do not explain a "it shows as a still image" report \u2014 rule out autoplay off or data saver in the viewer's own app, which renders every video as its cover frame account-wide.`
|
|
17591
|
+
];
|
|
17592
|
+
}
|
|
17593
|
+
const hints = silent.map((placement) => {
|
|
17594
|
+
const note = placementFormatNote(placement.position);
|
|
17595
|
+
const documented = note ? ` Meta documents this placement: ${note.note}` : "";
|
|
17596
|
+
return `${placement.platform}/${placement.position} delivered ${placement.impressions.toLocaleString("en-US")} impressions (${(placement.share * 100).toFixed(1)}% of the total) and ${placement.plays.toLocaleString("en-US")} video plays \u2014 it may not be rendering the video. This is account evidence, not a rule: confirm what Meta renders there with ${previewCommand(placement)} before you say anything about it.${documented}`;
|
|
17597
|
+
});
|
|
17598
|
+
const combinedShare = silent.reduce((total, placement) => total + placement.share, 0) * 100;
|
|
17599
|
+
hints.push(
|
|
17600
|
+
`Those placements are ${combinedShare.toFixed(1)}% of delivery in this query. State that share before proposing to remove them \u2014 and note that removing placements from a live ad set is a targeting change, which Meta counts as a significant edit that re-enters the learning phase.`
|
|
17601
|
+
);
|
|
17602
|
+
return hints;
|
|
17603
|
+
}
|
|
17604
|
+
|
|
17447
17605
|
// src/commands/ads/meta/presets.ts
|
|
17448
17606
|
var INSIGHTS_INTENTS = {
|
|
17449
17607
|
baseline: {
|
|
@@ -17564,6 +17722,11 @@ function shouldAutoAsync(body) {
|
|
|
17564
17722
|
}
|
|
17565
17723
|
return false;
|
|
17566
17724
|
}
|
|
17725
|
+
function wantsAsync(asyncFlag, body) {
|
|
17726
|
+
if (asyncFlag === true) return true;
|
|
17727
|
+
if (asyncFlag === false) return false;
|
|
17728
|
+
return shouldAutoAsync(body);
|
|
17729
|
+
}
|
|
17567
17730
|
function applyDateRange(body, args) {
|
|
17568
17731
|
const range = getDateRange(args);
|
|
17569
17732
|
if (range.datePreset) body.datePreset = range.datePreset;
|
|
@@ -17612,9 +17775,9 @@ function buildBody(args) {
|
|
|
17612
17775
|
async function pollAsync(reportRunId) {
|
|
17613
17776
|
const start = Date.now();
|
|
17614
17777
|
while (Date.now() - start < POLL_MAX_MS) {
|
|
17615
|
-
const status = await
|
|
17616
|
-
|
|
17617
|
-
{}
|
|
17778
|
+
const status = await apiGet(
|
|
17779
|
+
"/api/ads/meta/insights/async/status",
|
|
17780
|
+
{ "report-run-id": reportRunId }
|
|
17618
17781
|
);
|
|
17619
17782
|
if (status.async_status === "Job Completed") return;
|
|
17620
17783
|
if (status.async_status === "Job Failed" || status.async_status === "Job Skipped") {
|
|
@@ -17712,8 +17875,10 @@ Async is automatic for heavy queries; pass --async to force it, or --no-async to
|
|
|
17712
17875
|
"use-account-attribution": { type: "boolean", description: "Use account-saved attribution setting" },
|
|
17713
17876
|
"use-unified-attribution": { type: "boolean", description: "Use ad-set unified attribution setting" },
|
|
17714
17877
|
limit: { type: "string", description: "Max rows (default 1000)" },
|
|
17715
|
-
async
|
|
17716
|
-
|
|
17878
|
+
// Declaring `no-async` too would be a trap: citty resolves it to `async: false`
|
|
17879
|
+
// and never fills an arg of that name, so the declaration reads as supported
|
|
17880
|
+
// while nothing consumes it.
|
|
17881
|
+
async: { type: "boolean", description: "Force the async submit-and-poll path (--no-async refuses it)" },
|
|
17717
17882
|
"no-sort": { type: "boolean", description: "Skip default spend-desc sort" },
|
|
17718
17883
|
"skip-cache": { type: "boolean", description: "Bypass server-side cache" },
|
|
17719
17884
|
output: { type: "string", description: "Output format", default: "json" }
|
|
@@ -17732,7 +17897,7 @@ Async is automatic for heavy queries; pass --async to force it, or --no-async to
|
|
|
17732
17897
|
}
|
|
17733
17898
|
const body = buildBody(args);
|
|
17734
17899
|
const fmt = csvOrJson(args);
|
|
17735
|
-
const wantAsync =
|
|
17900
|
+
const wantAsync = wantsAsync(args.async, body);
|
|
17736
17901
|
try {
|
|
17737
17902
|
const rows = wantAsync ? await runAsync(body) : await apiPost("/api/ads/meta/insights", body);
|
|
17738
17903
|
const sorted = args["no-sort"] ? rows : sortRowsBySpendDesc(rows);
|
|
@@ -17740,6 +17905,11 @@ Async is automatic for heavy queries; pass --async to force it, or --no-async to
|
|
|
17740
17905
|
writeAdsOutput(sorted, fmt, body.fields);
|
|
17741
17906
|
return;
|
|
17742
17907
|
}
|
|
17908
|
+
const hints = placementDeliveryHints(sorted);
|
|
17909
|
+
if (hints.length > 0) {
|
|
17910
|
+
writeJsonEnvelope({ ok: true, data: sorted, hints });
|
|
17911
|
+
return;
|
|
17912
|
+
}
|
|
17743
17913
|
writeAdsJson({ ok: true, data: sorted });
|
|
17744
17914
|
} catch (err) {
|
|
17745
17915
|
handleMetaError(err);
|
|
@@ -17909,6 +18079,7 @@ var VALID_AD_FORMATS = [
|
|
|
17909
18079
|
"INSTAGRAM_STANDARD",
|
|
17910
18080
|
"INSTAGRAM_EXPLORE_CONTEXTUAL",
|
|
17911
18081
|
"INSTAGRAM_EXPLORE_GRID_HOME",
|
|
18082
|
+
"INSTAGRAM_SEARCH_CHAIN",
|
|
17912
18083
|
"INSTAGRAM_SHOP",
|
|
17913
18084
|
"INSTAGRAM_PROFILE_FEED",
|
|
17914
18085
|
"INSTREAM_VIDEO_DESKTOP",
|
|
@@ -17924,14 +18095,47 @@ var VALID_AD_FORMATS = [
|
|
|
17924
18095
|
"MARKETPLACE_MOBILE",
|
|
17925
18096
|
"BIZ_DISCO_FEED_MOBILE"
|
|
17926
18097
|
];
|
|
17927
|
-
|
|
18098
|
+
function failPreviewValidation(message) {
|
|
18099
|
+
writeAdsJson({ ok: false, error: { code: "VALIDATION_ERROR", message } });
|
|
18100
|
+
process.exit(1);
|
|
18101
|
+
}
|
|
18102
|
+
function resolvePlacement(position, platform) {
|
|
18103
|
+
const platformArg = typeof platform === "string" ? platform.toLowerCase() : void 0;
|
|
18104
|
+
if (platformArg && platformArg !== "facebook" && platformArg !== "instagram") {
|
|
18105
|
+
failPreviewValidation("--platform must be facebook or instagram");
|
|
18106
|
+
}
|
|
18107
|
+
const format = previewFormatForPosition(position, platformArg);
|
|
18108
|
+
if (format) {
|
|
18109
|
+
return format;
|
|
18110
|
+
}
|
|
18111
|
+
if (PLATFORM_SCOPED_POSITIONS.has(position) && !platformArg) {
|
|
18112
|
+
failPreviewValidation(
|
|
18113
|
+
`--placement ${position} names a different surface on Facebook and on Instagram \u2014 add --platform facebook or --platform instagram (the breakdown row's publisher_platform)`
|
|
18114
|
+
);
|
|
18115
|
+
}
|
|
18116
|
+
failPreviewValidation(
|
|
18117
|
+
`No Meta preview format is published for placement "${position}". Meta does not document one for every placement (facebook_notification and facebook_profile_feed among them), so this placement cannot be previewed \u2014 report it as unverified rather than inferring what it renders. Pass the platform_position exactly as the insights breakdown spelled it: targeting names a few surfaces differently (story, reels, explore_home) and those names never appear in a breakdown. Previewable placements: ${listPlacements()}`
|
|
18118
|
+
);
|
|
18119
|
+
}
|
|
18120
|
+
function listPlacements() {
|
|
18121
|
+
const facebook = Object.keys(FACEBOOK_PREVIEW_FORMATS).join(", ");
|
|
18122
|
+
const instagram = Object.keys(INSTAGRAM_PREVIEW_FORMATS).join(", ");
|
|
18123
|
+
return `facebook \u2014 ${facebook}; instagram \u2014 ${instagram}`;
|
|
18124
|
+
}
|
|
18125
|
+
var previewCommand2 = defineCommand67({
|
|
17928
18126
|
meta: {
|
|
17929
18127
|
name: "preview",
|
|
17930
18128
|
description: `Generate a Meta-hosted preview iframe for a creative or ad. Returns iframe HTML which you
|
|
17931
18129
|
can embed or save to a file. The iframe URL contains a short-lived access token \u2014 treat as secret.
|
|
17932
18130
|
|
|
18131
|
+
Start here when you need to know what a creative looks like in one specific placement \u2014 this is
|
|
18132
|
+
Meta's own renderer, so it settles "does my video show as a still image there?" without guessing.
|
|
18133
|
+
Pass the placement straight from an insights breakdown with --placement (a platform_position value),
|
|
18134
|
+
or a Meta ad_format with --ad-format. Run --list-formats to see both sets.
|
|
18135
|
+
|
|
17933
18136
|
Examples:
|
|
17934
18137
|
baker ads meta preview --creative-id 6123 --ad-format MOBILE_FEED_STANDARD
|
|
18138
|
+
baker ads meta preview --creative-id 6123 --placement facebook_reels_overlay --platform facebook
|
|
17935
18139
|
baker ads meta preview --ad-id 9988 --ad-format INSTAGRAM_REELS --out-file /tmp/preview.html
|
|
17936
18140
|
baker ads meta preview --account-id act_123 --creative '{"object_story_spec":{...}}' --ad-format MOBILE_FEED_STANDARD`
|
|
17937
18141
|
},
|
|
@@ -17940,14 +18144,36 @@ Examples:
|
|
|
17940
18144
|
"ad-id": { type: "string", description: "Existing ad ID" },
|
|
17941
18145
|
"account-id": { type: "string", description: "Required when previewing an unpublished --creative spec" },
|
|
17942
18146
|
creative: { type: "string", description: "JSON spec of an unpublished creative (e.g. object_story_spec)" },
|
|
17943
|
-
"ad-format": { type: "string", description: "Meta ad_format enum value
|
|
18147
|
+
"ad-format": { type: "string", description: "Meta ad_format enum value (--list-formats to see them)" },
|
|
18148
|
+
placement: {
|
|
18149
|
+
type: "string",
|
|
18150
|
+
description: "platform_position from an insights breakdown (e.g. facebook_reels_overlay) \u2014 resolved to an ad_format"
|
|
18151
|
+
},
|
|
18152
|
+
platform: { type: "string", description: "facebook|instagram \u2014 required for --placement feed, which both report" },
|
|
18153
|
+
"list-formats": { type: "boolean", description: "Print the ad_format values and placement mappings, then exit" },
|
|
17944
18154
|
"out-file": { type: "string", description: "Save iframe HTML to this path" },
|
|
17945
18155
|
"skip-cache": { type: "boolean", description: "Bypass server-side cache" }
|
|
17946
18156
|
},
|
|
17947
18157
|
run: async ({ args }) => {
|
|
17948
|
-
|
|
18158
|
+
if (args["list-formats"]) {
|
|
18159
|
+
writeAdsJson({
|
|
18160
|
+
ok: true,
|
|
18161
|
+
data: {
|
|
18162
|
+
adFormats: VALID_AD_FORMATS,
|
|
18163
|
+
placements: { facebook: FACEBOOK_PREVIEW_FORMATS, instagram: INSTAGRAM_PREVIEW_FORMATS }
|
|
18164
|
+
}
|
|
18165
|
+
});
|
|
18166
|
+
return;
|
|
18167
|
+
}
|
|
18168
|
+
const placement = args.placement;
|
|
18169
|
+
const adFormat = placement ? resolvePlacement(placement, args.platform) : args["ad-format"];
|
|
18170
|
+
if (!adFormat) {
|
|
18171
|
+
failPreviewValidation("pass --ad-format or --placement (see --list-formats)");
|
|
18172
|
+
}
|
|
17949
18173
|
if (!VALID_AD_FORMATS.includes(adFormat)) {
|
|
17950
|
-
|
|
18174
|
+
failPreviewValidation(
|
|
18175
|
+
`Invalid --ad-format "${adFormat}". Meta publishes no complete ad_format enum, so this is the set we know: ${VALID_AD_FORMATS.join(", ")}. To preview a placement you saw in an insights breakdown, pass --placement <platform_position> instead of guessing a format name.`
|
|
18176
|
+
);
|
|
17951
18177
|
}
|
|
17952
18178
|
const body = { adFormat };
|
|
17953
18179
|
if (args["creative-id"]) body.creativeId = args["creative-id"];
|
|
@@ -17958,12 +18184,16 @@ Examples:
|
|
|
17958
18184
|
try {
|
|
17959
18185
|
const data = await apiPost("/api/ads/meta/preview", body);
|
|
17960
18186
|
const html = data.map((d) => d.body).join("\n");
|
|
18187
|
+
const hints = placement ? [
|
|
18188
|
+
`Rendered ${placement} as ad_format ${adFormat}. Open the iframe to SEE it \u2014 Meta does not document what it renders for a creative a placement cannot take, so a preview you looked at is the evidence, and anything you did not look at stays unverified.`
|
|
18189
|
+
] : [];
|
|
17961
18190
|
if (args["out-file"]) {
|
|
18191
|
+
const summary = { ok: true, data: { file: args["out-file"], rows: data.length, adFormat } };
|
|
17962
18192
|
writeFileSync2(args["out-file"], html, "utf-8");
|
|
17963
|
-
|
|
18193
|
+
writeJsonEnvelope(hints.length > 0 ? { ...summary, hints } : summary);
|
|
17964
18194
|
return;
|
|
17965
18195
|
}
|
|
17966
|
-
|
|
18196
|
+
writeJsonEnvelope(hints.length > 0 ? { ok: true, data, hints } : { ok: true, data });
|
|
17967
18197
|
} catch (err) {
|
|
17968
18198
|
handleMetaError(err);
|
|
17969
18199
|
}
|
|
@@ -18021,7 +18251,7 @@ Full guide: __tooling__/docs/tools/baker/ads-meta.md`
|
|
|
18021
18251
|
pixels: pixelsCommand,
|
|
18022
18252
|
activities: activitiesCommand,
|
|
18023
18253
|
insights: insightsCommand,
|
|
18024
|
-
preview:
|
|
18254
|
+
preview: previewCommand2,
|
|
18025
18255
|
media: metaMediaCommand,
|
|
18026
18256
|
draft: metaDraftCommand
|
|
18027
18257
|
}
|
|
@@ -19535,13 +19765,127 @@ Full guides: __tooling__/docs/tools/baker/ads-<platform>.md (google|meta|linkedi
|
|
|
19535
19765
|
}
|
|
19536
19766
|
});
|
|
19537
19767
|
|
|
19538
|
-
// src/commands/
|
|
19768
|
+
// src/commands/agents/index.ts
|
|
19769
|
+
import { defineCommand as defineCommand89 } from "citty";
|
|
19770
|
+
|
|
19771
|
+
// src/commands/agents/list.ts
|
|
19772
|
+
import { defineCommand as defineCommand87 } from "citty";
|
|
19773
|
+
|
|
19774
|
+
// src/commands/agents/shared.ts
|
|
19775
|
+
function failValidation2(message) {
|
|
19776
|
+
writeJson({ ok: false, error: { code: "VALIDATION_ERROR", message } });
|
|
19777
|
+
process.exit(1);
|
|
19778
|
+
}
|
|
19779
|
+
function failApi2(err) {
|
|
19780
|
+
if (err instanceof ApiError) {
|
|
19781
|
+
writeJson({ ok: false, error: { code: err.code, message: err.message } });
|
|
19782
|
+
process.exit(1);
|
|
19783
|
+
}
|
|
19784
|
+
const message = err instanceof Error ? err.message : "Unexpected error";
|
|
19785
|
+
writeJson({ ok: false, error: { code: "INTERNAL_ERROR", message } });
|
|
19786
|
+
process.exit(1);
|
|
19787
|
+
}
|
|
19788
|
+
|
|
19789
|
+
// src/commands/agents/list.ts
|
|
19790
|
+
registerSchema({
|
|
19791
|
+
command: "agents.list",
|
|
19792
|
+
description: "The Baker agents that exist, with what each one does. Start here before recommending one, so you name a real teammate rather than inventing one.",
|
|
19793
|
+
args: {}
|
|
19794
|
+
});
|
|
19795
|
+
var listCommand10 = defineCommand87({
|
|
19796
|
+
meta: {
|
|
19797
|
+
name: "list",
|
|
19798
|
+
description: "List the Baker agents and what each does. Example: baker agents list"
|
|
19799
|
+
},
|
|
19800
|
+
run: async () => {
|
|
19801
|
+
try {
|
|
19802
|
+
const response = await apiPost(
|
|
19803
|
+
"/api/official-agents/list",
|
|
19804
|
+
{}
|
|
19805
|
+
);
|
|
19806
|
+
writeJson(response);
|
|
19807
|
+
} catch (err) {
|
|
19808
|
+
failApi2(err);
|
|
19809
|
+
}
|
|
19810
|
+
}
|
|
19811
|
+
});
|
|
19812
|
+
|
|
19813
|
+
// src/commands/agents/recommend.ts
|
|
19539
19814
|
import { defineCommand as defineCommand88 } from "citty";
|
|
19815
|
+
registerSchema({
|
|
19816
|
+
command: "agents.recommend",
|
|
19817
|
+
description: "Suggest the company switch on another Baker agent, because the work you just found belongs to it. Does not block or wait \u2014 it records the suggestion on that agent's card in Tasks and your run carries on. Calling it again refreshes the same suggestion instead of stacking another, and a suggestion the company dismissed stays dismissed. Start here: baker agents list.",
|
|
19818
|
+
args: {
|
|
19819
|
+
agent: { type: "string", description: "Agent id to recommend, from `baker agents list`", required: true },
|
|
19820
|
+
from: { type: "string", description: "Your own agent id \u2014 who is making the suggestion", required: true },
|
|
19821
|
+
reason: {
|
|
19822
|
+
type: "string",
|
|
19823
|
+
description: "Why, in the company's own terms, naming what you found. Shown verbatim next to the switch, so write it for a marketer, not for us.",
|
|
19824
|
+
required: true
|
|
19825
|
+
}
|
|
19826
|
+
}
|
|
19827
|
+
});
|
|
19828
|
+
var recommendCommand = defineCommand88({
|
|
19829
|
+
meta: {
|
|
19830
|
+
name: "recommend",
|
|
19831
|
+
description: 'Suggest switching on another Baker agent. Example: baker agents recommend --agent baker-cro --from baker-analytics-reporter --reason "Your quote page gets the most traffic and converts the worst; Baker CRO is the one that fixes that."'
|
|
19832
|
+
},
|
|
19833
|
+
args: {
|
|
19834
|
+
agent: { type: "string", description: "Agent id to recommend", required: false },
|
|
19835
|
+
from: { type: "string", description: "Your own agent id", required: false },
|
|
19836
|
+
reason: { type: "string", description: "Why, in the company's terms", required: false }
|
|
19837
|
+
},
|
|
19838
|
+
run: async ({ args }) => {
|
|
19839
|
+
try {
|
|
19840
|
+
const agent = args.agent;
|
|
19841
|
+
const from = args.from;
|
|
19842
|
+
const reason = args.reason;
|
|
19843
|
+
if (!agent || !from || !reason) {
|
|
19844
|
+
failValidation2("--agent, --from and --reason are all required.");
|
|
19845
|
+
}
|
|
19846
|
+
if (agent === from) {
|
|
19847
|
+
failValidation2("An agent cannot recommend itself.");
|
|
19848
|
+
}
|
|
19849
|
+
const env = getEnv();
|
|
19850
|
+
const response = await apiPost("/api/official-agents/recommend", {
|
|
19851
|
+
agentId: agent,
|
|
19852
|
+
fromAgentId: from,
|
|
19853
|
+
reason,
|
|
19854
|
+
...env.BAKER_CHAT_ID ? { chatId: env.BAKER_CHAT_ID } : {}
|
|
19855
|
+
});
|
|
19856
|
+
writeJson(response);
|
|
19857
|
+
} catch (err) {
|
|
19858
|
+
failApi2(err);
|
|
19859
|
+
}
|
|
19860
|
+
}
|
|
19861
|
+
});
|
|
19862
|
+
|
|
19863
|
+
// src/commands/agents/index.ts
|
|
19864
|
+
var agentsCommand = defineCommand89({
|
|
19865
|
+
meta: {
|
|
19866
|
+
name: "agents",
|
|
19867
|
+
description: `The other Baker agents, and how to ask for one. Subcommands: list, recommend.
|
|
19868
|
+
|
|
19869
|
+
Use this when the work in front of you belongs to a different agent than the one you are. Recommending does not block your run \u2014 it leaves the suggestion on that agent's card in Tasks, next to the switch that turns it on.
|
|
19870
|
+
|
|
19871
|
+
Examples:
|
|
19872
|
+
baker agents list
|
|
19873
|
+
baker agents recommend --agent baker-cro --from baker-analytics-reporter --reason "Your quote page gets the most traffic and converts the worst."
|
|
19874
|
+
Full guide: __tooling__/docs/tools/baker/agents.md`
|
|
19875
|
+
},
|
|
19876
|
+
subCommands: {
|
|
19877
|
+
list: listCommand10,
|
|
19878
|
+
recommend: recommendCommand
|
|
19879
|
+
}
|
|
19880
|
+
});
|
|
19881
|
+
|
|
19882
|
+
// src/commands/brand/index.ts
|
|
19883
|
+
import { defineCommand as defineCommand91 } from "citty";
|
|
19540
19884
|
|
|
19541
19885
|
// src/commands/brand/fonts.ts
|
|
19542
19886
|
import { mkdir, readFile, writeFile } from "fs/promises";
|
|
19543
19887
|
import path from "path";
|
|
19544
|
-
import { defineCommand as
|
|
19888
|
+
import { defineCommand as defineCommand90 } from "citty";
|
|
19545
19889
|
|
|
19546
19890
|
// src/engine/brand/fonts.ts
|
|
19547
19891
|
var GOOGLE_CSS2 = "https://fonts.googleapis.com/css2";
|
|
@@ -19713,7 +20057,7 @@ async function readGlobalCss() {
|
|
|
19713
20057
|
return "";
|
|
19714
20058
|
}
|
|
19715
20059
|
}
|
|
19716
|
-
var fontsCheckCommand =
|
|
20060
|
+
var fontsCheckCommand = defineCommand90({
|
|
19717
20061
|
meta: {
|
|
19718
20062
|
name: "check",
|
|
19719
20063
|
description: "Verify the brand's fonts really exist. For every family/weight src/styles/global.css requests from Google Fonts, ask Google what it actually serves and report anything missing \u2014 a weight nobody serves renders as a synthesized fallback and looks off-brand everywhere."
|
|
@@ -19757,7 +20101,7 @@ var fontsCheckCommand = defineCommand87({
|
|
|
19757
20101
|
});
|
|
19758
20102
|
}
|
|
19759
20103
|
});
|
|
19760
|
-
var fontsFetchCommand =
|
|
20104
|
+
var fontsFetchCommand = defineCommand90({
|
|
19761
20105
|
meta: {
|
|
19762
20106
|
name: "fetch",
|
|
19763
20107
|
description: "Download a Google font into src/brand/fonts/ and print the @font-face block to paste above @theme in src/styles/global.css. Use when a brand font should be self-hosted rather than requested from Google on every page load."
|
|
@@ -19839,7 +20183,7 @@ var fontsFetchCommand = defineCommand87({
|
|
|
19839
20183
|
});
|
|
19840
20184
|
}
|
|
19841
20185
|
});
|
|
19842
|
-
var fontsCommand =
|
|
20186
|
+
var fontsCommand = defineCommand90({
|
|
19843
20187
|
meta: {
|
|
19844
20188
|
name: "fonts",
|
|
19845
20189
|
description: `Verify and self-host the brand's typefaces.
|
|
@@ -19857,7 +20201,7 @@ Subcommands:
|
|
|
19857
20201
|
});
|
|
19858
20202
|
|
|
19859
20203
|
// src/commands/brand/index.ts
|
|
19860
|
-
var brandCommand =
|
|
20204
|
+
var brandCommand = defineCommand91({
|
|
19861
20205
|
meta: {
|
|
19862
20206
|
name: "brand",
|
|
19863
20207
|
description: `Brand asset verification for src/brand/.
|
|
@@ -19873,11 +20217,11 @@ Subcommands:
|
|
|
19873
20217
|
});
|
|
19874
20218
|
|
|
19875
20219
|
// src/commands/canvas/index.ts
|
|
19876
|
-
import { defineCommand as
|
|
20220
|
+
import { defineCommand as defineCommand102 } from "citty";
|
|
19877
20221
|
|
|
19878
20222
|
// src/commands/canvas/catalog.ts
|
|
19879
|
-
import { defineCommand as
|
|
19880
|
-
var catalogCommand =
|
|
20223
|
+
import { defineCommand as defineCommand92 } from "citty";
|
|
20224
|
+
var catalogCommand = defineCommand92({
|
|
19881
20225
|
meta: {
|
|
19882
20226
|
name: "catalog",
|
|
19883
20227
|
description: "Print the agent-facing node catalog (JSON Schema). Includes every registered node grouped by category."
|
|
@@ -19892,7 +20236,7 @@ var catalogCommand = defineCommand89({
|
|
|
19892
20236
|
// src/commands/canvas/critique.ts
|
|
19893
20237
|
import { readFile as readFile2 } from "fs/promises";
|
|
19894
20238
|
import path2 from "path";
|
|
19895
|
-
import { defineCommand as
|
|
20239
|
+
import { defineCommand as defineCommand93 } from "citty";
|
|
19896
20240
|
|
|
19897
20241
|
// src/engine/scaffold/lib/critique.ts
|
|
19898
20242
|
var VIBE_CUE = /\b(light|lighting|golden|moody|warm|cool|tone|grade|contrast|shadow|glow|rim|backlit|neon|soft)\b/i;
|
|
@@ -20012,7 +20356,7 @@ function critiqueCanvas(canvas) {
|
|
|
20012
20356
|
}
|
|
20013
20357
|
|
|
20014
20358
|
// src/commands/canvas/critique.ts
|
|
20015
|
-
var critiqueCommand =
|
|
20359
|
+
var critiqueCommand = defineCommand93({
|
|
20016
20360
|
meta: {
|
|
20017
20361
|
name: "critique",
|
|
20018
20362
|
description: "Pre-spend creative critic (ADVISORY \u2014 never blocks). Scores a scaffolded creative BEFORE the billed render, so weak spots get fixed for free. A VIDEO creative is scored on hook strength, sound-off first-frame legibility, retention risk, and mechanism clarity; a STATIC ad on baked-text legibility risk, identity grounding, brand-type fidelity, and mechanism clarity. Ground a video hook against `baker winning-ads hooks` for a proven pattern."
|
|
@@ -20054,9 +20398,9 @@ import { execFile } from "child_process";
|
|
|
20054
20398
|
import { readdir, readFile as readFile3, stat } from "fs/promises";
|
|
20055
20399
|
import path3 from "path";
|
|
20056
20400
|
import { promisify } from "util";
|
|
20057
|
-
import { defineCommand as
|
|
20401
|
+
import { defineCommand as defineCommand94 } from "citty";
|
|
20058
20402
|
var execFileAsync = promisify(execFile);
|
|
20059
|
-
var inspectCommand =
|
|
20403
|
+
var inspectCommand = defineCommand94({
|
|
20060
20404
|
meta: {
|
|
20061
20405
|
name: "inspect",
|
|
20062
20406
|
description: "Dump a one-page summary of a canvas run: per-node duration + cache status, list of output files in the run dir, and optionally three thumbnail frames per video output. Pass either a run_id (resolved against --outputs-dir) or an absolute run directory."
|
|
@@ -20164,12 +20508,12 @@ async function probeDuration(filePath) {
|
|
|
20164
20508
|
|
|
20165
20509
|
// src/commands/canvas/rerun.ts
|
|
20166
20510
|
import path14 from "path";
|
|
20167
|
-
import { defineCommand as
|
|
20511
|
+
import { defineCommand as defineCommand96 } from "citty";
|
|
20168
20512
|
|
|
20169
20513
|
// src/commands/canvas/run.ts
|
|
20170
20514
|
import { readFile as readFile10 } from "fs/promises";
|
|
20171
20515
|
import path13 from "path";
|
|
20172
|
-
import { defineCommand as
|
|
20516
|
+
import { defineCommand as defineCommand95 } from "citty";
|
|
20173
20517
|
|
|
20174
20518
|
// src/commands/canvas/placeholders.ts
|
|
20175
20519
|
function unsuppliedPlaceholderAssets(canvas) {
|
|
@@ -24335,7 +24679,7 @@ async function restoreRunSnapshot(manifest, targetDir, opts = {}) {
|
|
|
24335
24679
|
}
|
|
24336
24680
|
|
|
24337
24681
|
// src/commands/canvas/run.ts
|
|
24338
|
-
var runCommand =
|
|
24682
|
+
var runCommand = defineCommand95({
|
|
24339
24683
|
meta: { name: "run", description: "Validate and execute a canvas JSON file." },
|
|
24340
24684
|
args: {
|
|
24341
24685
|
file: { type: "positional", required: true, description: "Path to canvas JSON" },
|
|
@@ -24705,7 +25049,7 @@ async function postInitialRunRecord(client, payload) {
|
|
|
24705
25049
|
|
|
24706
25050
|
// src/commands/canvas/rerun.ts
|
|
24707
25051
|
var SLUG_PATTERN = /^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/;
|
|
24708
|
-
var rerunCommand =
|
|
25052
|
+
var rerunCommand = defineCommand96({
|
|
24709
25053
|
meta: {
|
|
24710
25054
|
name: "rerun",
|
|
24711
25055
|
description: "Re-run a creative's latest recorded canvas. Restores its definition files from run history first, so it works in a fresh workspace that never had the source chat's files \u2014 an interrupted run resumes (in-flight jobs re-attach), a completed one re-renders from the cache."
|
|
@@ -24802,7 +25146,7 @@ async function fetchManifest(url) {
|
|
|
24802
25146
|
// src/commands/canvas/scaffold-static-ad.ts
|
|
24803
25147
|
import { access, mkdir as mkdir6, readFile as readFile12, writeFile as writeFile7 } from "fs/promises";
|
|
24804
25148
|
import path18 from "path";
|
|
24805
|
-
import { defineCommand as
|
|
25149
|
+
import { defineCommand as defineCommand98 } from "citty";
|
|
24806
25150
|
|
|
24807
25151
|
// src/engine/scaffold/staticAd.ts
|
|
24808
25152
|
import { z as z23 } from "zod";
|
|
@@ -25152,7 +25496,7 @@ function isValidScaffoldSlug(slug) {
|
|
|
25152
25496
|
// src/commands/canvas/sync-definition.ts
|
|
25153
25497
|
import { readdir as readdir5, readFile as readFile11, stat as stat3 } from "fs/promises";
|
|
25154
25498
|
import path17 from "path";
|
|
25155
|
-
import { defineCommand as
|
|
25499
|
+
import { defineCommand as defineCommand97 } from "citty";
|
|
25156
25500
|
|
|
25157
25501
|
// src/commands/canvas/definition-graph.ts
|
|
25158
25502
|
var MAX_NODES = 300;
|
|
@@ -25265,7 +25609,7 @@ async function resolveCanvasPath(inputPath) {
|
|
|
25265
25609
|
const chosen = (slug ? canvases.find((name) => name === `${slug}.canvas.json`) : void 0) ?? canvases[0];
|
|
25266
25610
|
return chosen ? path17.join(dir, chosen) : null;
|
|
25267
25611
|
}
|
|
25268
|
-
var syncDefinitionCommand =
|
|
25612
|
+
var syncDefinitionCommand = defineCommand97({
|
|
25269
25613
|
meta: {
|
|
25270
25614
|
name: "sync-definition",
|
|
25271
25615
|
description: "Push a creative's current node-graph + input thumbnails to the dashboard without rendering. Runs automatically when you edit a creative's canvas.json or prompt.json."
|
|
@@ -25493,7 +25837,7 @@ async function runVisionPasses(canvas) {
|
|
|
25493
25837
|
return fail3("read_outputs", e instanceof Error ? e.message : String(e));
|
|
25494
25838
|
}
|
|
25495
25839
|
}
|
|
25496
|
-
var scaffoldStaticAdCommand =
|
|
25840
|
+
var scaffoldStaticAdCommand = defineCommand98({
|
|
25497
25841
|
meta: {
|
|
25498
25842
|
name: "scaffold-static-ad",
|
|
25499
25843
|
description: "Turn a source/inspiration image into a runnable static-ad canvas. Runs billed passes \u2014 image_describe (the blueprint, baked to prompt.json as the editable 'prompt'), an AI selection of the image's MAIN identity elements, and a structured global-layout pass (the column/row grid with per-region bounds and text sizes) \u2014 then scaffolds a canvas that wires one [TODO] ingest slot per element (logo/product/subject/badge + brand font) into image_generate. By default it also fans the hero out to the platform's placement ratios (via image_aspect_adapt \u2014 the hero ratio is free, the rest are billed AI recompositions); pass --placements none for a single base ad, or a preset to pick the set. Edit prompt.json and drop the real assets, then `baker canvas run` it."
|
|
@@ -25682,7 +26026,7 @@ var scaffoldStaticAdCommand = defineCommand95({
|
|
|
25682
26026
|
import { access as access2, cp, mkdir as mkdir7, readFile as readFile15, rm as rm6, writeFile as writeFile8 } from "fs/promises";
|
|
25683
26027
|
import { tmpdir as tmpdir2 } from "os";
|
|
25684
26028
|
import path21 from "path";
|
|
25685
|
-
import { defineCommand as
|
|
26029
|
+
import { defineCommand as defineCommand99 } from "citty";
|
|
25686
26030
|
|
|
25687
26031
|
// src/engine/scaffold/lib/model-router.ts
|
|
25688
26032
|
var SEEDANCE = "bytedance/seedance-2.0";
|
|
@@ -26141,7 +26485,7 @@ async function runAnalysisPasses(deconstructCanvas, selectModel) {
|
|
|
26141
26485
|
return fail4("deconstruct", e instanceof Error ? e.message : String(e));
|
|
26142
26486
|
}
|
|
26143
26487
|
}
|
|
26144
|
-
var scaffoldVideoCommand =
|
|
26488
|
+
var scaffoldVideoCommand = defineCommand99({
|
|
26145
26489
|
meta: {
|
|
26146
26490
|
name: "scaffold-video",
|
|
26147
26491
|
description: "Turn a reference video into a runnable reproduction canvas in one command. Runs billed passes \u2014 video_deconstruct (the full scene-by-scene blueprint + transcript, baked to a split, editable blueprint: a global prompt.json plus one small scenes/sNN.json per scene) and an AI selection of the video's RECURRING identity elements (person/animal/product/logo) \u2014 then scaffolds a pipeline where every scene boundary is a static-ad-grade frame (the blueprint as target_blueprint, a reference legend, the real frame as anchor) and each recurring element gets ONE shared [TODO] ingest slot wired into every frame it appears in. The clips feed Seedance an ultra-detailed motion brief (action, camera, dialogue, transcript). Edit a scene's scenes/sNN.json (or prompt.json for global cast/palette/brand), drop the real source images, then `baker canvas run`."
|
|
@@ -26451,7 +26795,7 @@ var scaffoldVideoCommand = defineCommand96({
|
|
|
26451
26795
|
// src/commands/canvas/set-prompt.ts
|
|
26452
26796
|
import { readFile as readFile16, writeFile as writeFile9 } from "fs/promises";
|
|
26453
26797
|
import path22 from "path";
|
|
26454
|
-
import { defineCommand as
|
|
26798
|
+
import { defineCommand as defineCommand100 } from "citty";
|
|
26455
26799
|
function setNodePrompt(canvas, nodeId, text) {
|
|
26456
26800
|
const nodes = canvas?.nodes;
|
|
26457
26801
|
if (!Array.isArray(nodes)) throw new Error("canvas has no nodes array");
|
|
@@ -26466,7 +26810,7 @@ function setNodePrompt(canvas, nodeId, text) {
|
|
|
26466
26810
|
newNodes[idx] = newNode;
|
|
26467
26811
|
return { ...canvas, nodes: newNodes };
|
|
26468
26812
|
}
|
|
26469
|
-
var setPromptCommand =
|
|
26813
|
+
var setPromptCommand = defineCommand100({
|
|
26470
26814
|
meta: {
|
|
26471
26815
|
name: "set-prompt",
|
|
26472
26816
|
description: "Safely set a node's params.prompt (a frame description, motion prompt, etc.) without hand-editing the JSON. Prefer --text-file for multi-line/accented copy \u2014 it preserves UTF-8 exactly, unlike shell-quoted jq."
|
|
@@ -26526,8 +26870,8 @@ var setPromptCommand = defineCommand97({
|
|
|
26526
26870
|
// src/commands/canvas/validate.ts
|
|
26527
26871
|
import { readFile as readFile17 } from "fs/promises";
|
|
26528
26872
|
import path23 from "path";
|
|
26529
|
-
import { defineCommand as
|
|
26530
|
-
var validateCommand =
|
|
26873
|
+
import { defineCommand as defineCommand101 } from "citty";
|
|
26874
|
+
var validateCommand = defineCommand101({
|
|
26531
26875
|
meta: {
|
|
26532
26876
|
name: "validate",
|
|
26533
26877
|
description: "Validate a canvas JSON file (no execution). Includes a per-node cost preview and runs each node's deep validators (composition meta checks for hyperframe_render/_snapshot)."
|
|
@@ -26597,7 +26941,7 @@ var validateCommand = defineCommand98({
|
|
|
26597
26941
|
});
|
|
26598
26942
|
|
|
26599
26943
|
// src/commands/canvas/index.ts
|
|
26600
|
-
var canvasCommand =
|
|
26944
|
+
var canvasCommand = defineCommand102({
|
|
26601
26945
|
meta: {
|
|
26602
26946
|
name: "canvas",
|
|
26603
26947
|
description: `Run Baker creative canvas JSON files locally. Local nodes execute in-process; remote nodes POST to the Convex backend gateway.
|
|
@@ -26631,7 +26975,7 @@ Full guide: __tooling__/docs/tools/baker/canvas.md`
|
|
|
26631
26975
|
});
|
|
26632
26976
|
|
|
26633
26977
|
// src/commands/capabilities/index.ts
|
|
26634
|
-
import { defineCommand as
|
|
26978
|
+
import { defineCommand as defineCommand103 } from "citty";
|
|
26635
26979
|
registerSchema({
|
|
26636
26980
|
command: "capabilities",
|
|
26637
26981
|
description: "Start here, before promising the user anything on an ad platform, in Analytics, or in Tag Manager. Answers three questions in one call: what is connected and with what access, what a write on each surface actually does when it lands, and what CANNOT be done here and why. Run it with no arguments for every surface; name one surface to also get the exact fields every change on it accepts.",
|
|
@@ -26674,7 +27018,7 @@ function capabilityHints(surfaces) {
|
|
|
26674
27018
|
}
|
|
26675
27019
|
return hints;
|
|
26676
27020
|
}
|
|
26677
|
-
var runCapabilities =
|
|
27021
|
+
var runCapabilities = defineCommand103({
|
|
26678
27022
|
meta: {
|
|
26679
27023
|
name: "capabilities",
|
|
26680
27024
|
description: `What Baker can and cannot do for this company, before any work starts.
|
|
@@ -26730,7 +27074,7 @@ Full guide: __tooling__/docs/tools/baker/capabilities.md`
|
|
|
26730
27074
|
var capabilitiesCommand = runCapabilities;
|
|
26731
27075
|
|
|
26732
27076
|
// src/commands/chats/index.ts
|
|
26733
|
-
import { defineCommand as
|
|
27077
|
+
import { defineCommand as defineCommand104 } from "citty";
|
|
26734
27078
|
var STATUS_GROUPS = ["active", "archived", "all"];
|
|
26735
27079
|
var REPO_SURFACES = ["knowledge", "company", "brand", "landings", "flows", "creatives"];
|
|
26736
27080
|
function parseBoundedInt(raw, name, min, max) {
|
|
@@ -26752,7 +27096,7 @@ registerSchema({
|
|
|
26752
27096
|
full: { type: "boolean", description: "Include each Session's full change list", required: false, default: false }
|
|
26753
27097
|
}
|
|
26754
27098
|
});
|
|
26755
|
-
var
|
|
27099
|
+
var listCommand11 = defineCommand104({
|
|
26756
27100
|
meta: { name: "list", description: "List other Sessions on this account, newest first." },
|
|
26757
27101
|
args: {
|
|
26758
27102
|
status: { type: "string", description: "Filter: active|archived|all (default: all)", required: false },
|
|
@@ -26807,7 +27151,7 @@ registerSchema({
|
|
|
26807
27151
|
}
|
|
26808
27152
|
}
|
|
26809
27153
|
});
|
|
26810
|
-
var viewCommand =
|
|
27154
|
+
var viewCommand = defineCommand104({
|
|
26811
27155
|
meta: {
|
|
26812
27156
|
name: "view",
|
|
26813
27157
|
description: "Inspect one Session's full effects \u2014 git content + actions/tags/ads, kickoff, commits."
|
|
@@ -26851,7 +27195,7 @@ registerSchema({
|
|
|
26851
27195
|
}
|
|
26852
27196
|
}
|
|
26853
27197
|
});
|
|
26854
|
-
var transcriptCommand =
|
|
27198
|
+
var transcriptCommand = defineCommand104({
|
|
26855
27199
|
meta: { name: "transcript", description: "Read another Session's conversation." },
|
|
26856
27200
|
args: {
|
|
26857
27201
|
id: { type: "positional", description: "The Session id", required: true },
|
|
@@ -26903,7 +27247,7 @@ registerSchema({
|
|
|
26903
27247
|
}
|
|
26904
27248
|
}
|
|
26905
27249
|
});
|
|
26906
|
-
var diffCommand =
|
|
27250
|
+
var diffCommand = defineCommand104({
|
|
26907
27251
|
meta: { name: "diff", description: "See a published Session's real file-level changes." },
|
|
26908
27252
|
args: {
|
|
26909
27253
|
id: { type: "positional", description: "The Session id", required: true },
|
|
@@ -26947,14 +27291,14 @@ var diffCommand = defineCommand101({
|
|
|
26947
27291
|
}
|
|
26948
27292
|
}
|
|
26949
27293
|
});
|
|
26950
|
-
var chatsCommand =
|
|
27294
|
+
var chatsCommand = defineCommand104({
|
|
26951
27295
|
meta: {
|
|
26952
27296
|
name: "chats",
|
|
26953
27297
|
description: `Inspect other Sessions on this account (read-only): list them, view what they produced, read their conversation, and see their real file changes \u2014 so you can reuse past work for a new goal.
|
|
26954
27298
|
Full guide: __tooling__/docs/tools/baker/chats.md`
|
|
26955
27299
|
},
|
|
26956
27300
|
subCommands: {
|
|
26957
|
-
list:
|
|
27301
|
+
list: listCommand11,
|
|
26958
27302
|
view: viewCommand,
|
|
26959
27303
|
transcript: transcriptCommand,
|
|
26960
27304
|
diff: diffCommand
|
|
@@ -26962,10 +27306,10 @@ Full guide: __tooling__/docs/tools/baker/chats.md`
|
|
|
26962
27306
|
});
|
|
26963
27307
|
|
|
26964
27308
|
// src/commands/creatives/index.ts
|
|
26965
|
-
import { defineCommand as
|
|
27309
|
+
import { defineCommand as defineCommand106 } from "citty";
|
|
26966
27310
|
|
|
26967
27311
|
// src/commands/creatives/publish.ts
|
|
26968
|
-
import { defineCommand as
|
|
27312
|
+
import { defineCommand as defineCommand105 } from "citty";
|
|
26969
27313
|
|
|
26970
27314
|
// src/commands/images/api.ts
|
|
26971
27315
|
import { readFile as readFile18 } from "fs/promises";
|
|
@@ -27112,7 +27456,7 @@ async function publishCreative(args, deps = defaultImageApiDeps) {
|
|
|
27112
27456
|
chatId: chatIdFromEnv()
|
|
27113
27457
|
});
|
|
27114
27458
|
}
|
|
27115
|
-
var publishCommand =
|
|
27459
|
+
var publishCommand = defineCommand105({
|
|
27116
27460
|
meta: {
|
|
27117
27461
|
name: "publish",
|
|
27118
27462
|
description: "Publish a final static creative image to Baker Creatives and print the creative reference JSON."
|
|
@@ -27170,7 +27514,7 @@ var publishCommand = defineCommand102({
|
|
|
27170
27514
|
});
|
|
27171
27515
|
|
|
27172
27516
|
// src/commands/creatives/index.ts
|
|
27173
|
-
var creativesCommand3 =
|
|
27517
|
+
var creativesCommand3 = defineCommand106({
|
|
27174
27518
|
meta: {
|
|
27175
27519
|
name: "creatives",
|
|
27176
27520
|
description: `Publish static ad creatives as first-class Baker outputs.
|
|
@@ -27187,7 +27531,7 @@ Full guide: __tooling__/docs/tools/baker/creatives.md`
|
|
|
27187
27531
|
});
|
|
27188
27532
|
|
|
27189
27533
|
// src/commands/flows/index.ts
|
|
27190
|
-
import { defineCommand as
|
|
27534
|
+
import { defineCommand as defineCommand107 } from "citty";
|
|
27191
27535
|
|
|
27192
27536
|
// src/commands/flows/shared.ts
|
|
27193
27537
|
import { existsSync as existsSync4, readdirSync as readdirSync2, readFileSync as readFileSync9 } from "fs";
|
|
@@ -27342,7 +27686,7 @@ function displayName(slug) {
|
|
|
27342
27686
|
const name = tree.displayName;
|
|
27343
27687
|
return typeof name === "string" && name.trim() ? name.trim() : slug;
|
|
27344
27688
|
}
|
|
27345
|
-
var
|
|
27689
|
+
var listCommand12 = defineCommand107({
|
|
27346
27690
|
meta: {
|
|
27347
27691
|
name: "list",
|
|
27348
27692
|
description: "List Forms in this workspace with the count of confidential fields still needing setup. Example: baker flows list"
|
|
@@ -27356,7 +27700,7 @@ var listCommand11 = defineCommand104({
|
|
|
27356
27700
|
writeJson({ ok: true, data: { flows } });
|
|
27357
27701
|
}
|
|
27358
27702
|
});
|
|
27359
|
-
var showCommand3 =
|
|
27703
|
+
var showCommand3 = defineCommand107({
|
|
27360
27704
|
meta: {
|
|
27361
27705
|
name: "show",
|
|
27362
27706
|
description: "Show a Form's confidential fields and their configuration status (never secret values). Example: baker flows show contact"
|
|
@@ -27377,7 +27721,7 @@ var showCommand3 = defineCommand104({
|
|
|
27377
27721
|
writeJson({ ok: true, data: response });
|
|
27378
27722
|
}
|
|
27379
27723
|
});
|
|
27380
|
-
var flowsCommand =
|
|
27724
|
+
var flowsCommand = defineCommand107({
|
|
27381
27725
|
meta: {
|
|
27382
27726
|
name: "flows",
|
|
27383
27727
|
description: `Read this workspace's Forms (flows) and the configuration status of their confidential fields \u2014 connection secrets, OAuth connections, and third-party field definitions (HubSpot, Calendly, HighLevel, SavvyCal).
|
|
@@ -27391,7 +27735,7 @@ Examples:
|
|
|
27391
27735
|
Full guide: __tooling__/docs/tools/baker/flows.md`
|
|
27392
27736
|
},
|
|
27393
27737
|
subCommands: {
|
|
27394
|
-
list:
|
|
27738
|
+
list: listCommand12,
|
|
27395
27739
|
show: showCommand3
|
|
27396
27740
|
},
|
|
27397
27741
|
// Bare `baker flows` lists the Forms. This must be `default`, not `run`: citty falls
|
|
@@ -27401,10 +27745,10 @@ Full guide: __tooling__/docs/tools/baker/flows.md`
|
|
|
27401
27745
|
});
|
|
27402
27746
|
|
|
27403
27747
|
// src/commands/ga4/index.ts
|
|
27404
|
-
import { defineCommand as
|
|
27748
|
+
import { defineCommand as defineCommand114 } from "citty";
|
|
27405
27749
|
|
|
27406
27750
|
// src/commands/ga4/audit.ts
|
|
27407
|
-
import { defineCommand as
|
|
27751
|
+
import { defineCommand as defineCommand108 } from "citty";
|
|
27408
27752
|
|
|
27409
27753
|
// src/commands/ga4/resolve.ts
|
|
27410
27754
|
async function fetchProperties(useCache = true) {
|
|
@@ -27470,7 +27814,7 @@ registerSchema({
|
|
|
27470
27814
|
"no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false }
|
|
27471
27815
|
}
|
|
27472
27816
|
});
|
|
27473
|
-
var auditCommand2 =
|
|
27817
|
+
var auditCommand2 = defineCommand108({
|
|
27474
27818
|
meta: {
|
|
27475
27819
|
name: "audit",
|
|
27476
27820
|
description: `Run all GA4 admin health checks. Returns property config with playbook warnings.
|
|
@@ -27525,11 +27869,11 @@ Examples:
|
|
|
27525
27869
|
});
|
|
27526
27870
|
|
|
27527
27871
|
// src/commands/ga4/config.ts
|
|
27528
|
-
import { defineCommand as
|
|
27872
|
+
import { defineCommand as defineCommand109 } from "citty";
|
|
27529
27873
|
|
|
27530
27874
|
// src/commands/ga4/shared.ts
|
|
27531
27875
|
import { readFileSync as readFileSync10 } from "fs";
|
|
27532
|
-
function
|
|
27876
|
+
function failValidation3(message) {
|
|
27533
27877
|
writeJsonEnvelope({ ok: false, error: { code: "VALIDATION_ERROR", message } });
|
|
27534
27878
|
process.exit(1);
|
|
27535
27879
|
}
|
|
@@ -27537,7 +27881,7 @@ function requireTarget4(args, entity) {
|
|
|
27537
27881
|
const positional = Array.isArray(args._) ? args._[0] : void 0;
|
|
27538
27882
|
const target = args.id ?? args.target ?? positional;
|
|
27539
27883
|
if (typeof target !== "string" || target.length === 0) {
|
|
27540
|
-
|
|
27884
|
+
failValidation3(`pass the ${entity} id as the positional argument`);
|
|
27541
27885
|
}
|
|
27542
27886
|
return target;
|
|
27543
27887
|
}
|
|
@@ -27546,17 +27890,17 @@ function readJsonSource(args, flag) {
|
|
|
27546
27890
|
const file = args.file;
|
|
27547
27891
|
const raw = typeof file === "string" && file.length > 0 ? readFileSync10(file, "utf8") : typeof inline === "string" && inline.length > 0 ? inline : void 0;
|
|
27548
27892
|
if (raw === void 0) {
|
|
27549
|
-
|
|
27893
|
+
failValidation3(`pass --${flag} with inline JSON or --file with a path to a JSON file`);
|
|
27550
27894
|
}
|
|
27551
27895
|
try {
|
|
27552
27896
|
return JSON.parse(raw);
|
|
27553
27897
|
} catch {
|
|
27554
|
-
return
|
|
27898
|
+
return failValidation3(`--${flag} is not valid JSON`);
|
|
27555
27899
|
}
|
|
27556
27900
|
}
|
|
27557
27901
|
function asObject(value, flag, index) {
|
|
27558
27902
|
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
27559
|
-
|
|
27903
|
+
failValidation3(
|
|
27560
27904
|
index === void 0 ? `--${flag} must be a JSON object` : `--${flag}[${index}] must be a JSON object`
|
|
27561
27905
|
);
|
|
27562
27906
|
}
|
|
@@ -27571,7 +27915,7 @@ function loadJsonPayloads(args) {
|
|
|
27571
27915
|
return [asObject(parsed, "json")];
|
|
27572
27916
|
}
|
|
27573
27917
|
if (parsed.length === 0) {
|
|
27574
|
-
|
|
27918
|
+
failValidation3("--json is an empty list \u2014 pass at least one definition");
|
|
27575
27919
|
}
|
|
27576
27920
|
return parsed.map((entry, index) => asObject(entry, "json", index));
|
|
27577
27921
|
}
|
|
@@ -27717,7 +28061,7 @@ function configHints(config) {
|
|
|
27717
28061
|
}
|
|
27718
28062
|
return hints;
|
|
27719
28063
|
}
|
|
27720
|
-
var configCommand =
|
|
28064
|
+
var configCommand = defineCommand109({
|
|
27721
28065
|
meta: {
|
|
27722
28066
|
name: "config",
|
|
27723
28067
|
description: `Read how the property is configured to measure \u2014 key events, custom definitions, custom events, retention
|
|
@@ -27745,7 +28089,7 @@ Examples:
|
|
|
27745
28089
|
});
|
|
27746
28090
|
|
|
27747
28091
|
// src/commands/ga4/draft.ts
|
|
27748
|
-
import { defineCommand as
|
|
28092
|
+
import { defineCommand as defineCommand110 } from "citty";
|
|
27749
28093
|
registerSchema({
|
|
27750
28094
|
command: "ga4.draft",
|
|
27751
28095
|
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.",
|
|
@@ -27754,13 +28098,13 @@ registerSchema({
|
|
|
27754
28098
|
chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
|
|
27755
28099
|
}
|
|
27756
28100
|
});
|
|
27757
|
-
var draftCommand3 =
|
|
28101
|
+
var draftCommand3 = defineCommand110({
|
|
27758
28102
|
meta: {
|
|
27759
28103
|
name: "draft",
|
|
27760
28104
|
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."
|
|
27761
28105
|
},
|
|
27762
28106
|
subCommands: {
|
|
27763
|
-
list:
|
|
28107
|
+
list: defineCommand110({
|
|
27764
28108
|
meta: { name: "list", description: "Review everything staged on this chat (--json for the raw envelope)" },
|
|
27765
28109
|
args: {
|
|
27766
28110
|
json: { type: "boolean", description: "Print the raw JSON envelope", required: false },
|
|
@@ -27770,7 +28114,7 @@ var draftCommand3 = defineCommand107({
|
|
|
27770
28114
|
await draftList(args.json === true, args.chat);
|
|
27771
28115
|
}
|
|
27772
28116
|
}),
|
|
27773
|
-
show:
|
|
28117
|
+
show: defineCommand110({
|
|
27774
28118
|
meta: {
|
|
27775
28119
|
name: "show",
|
|
27776
28120
|
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)."
|
|
@@ -27787,7 +28131,7 @@ var draftCommand3 = defineCommand107({
|
|
|
27787
28131
|
);
|
|
27788
28132
|
}
|
|
27789
28133
|
}),
|
|
27790
|
-
amend:
|
|
28134
|
+
amend: defineCommand110({
|
|
27791
28135
|
meta: {
|
|
27792
28136
|
name: "amend",
|
|
27793
28137
|
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."
|
|
@@ -27804,7 +28148,7 @@ var draftCommand3 = defineCommand107({
|
|
|
27804
28148
|
});
|
|
27805
28149
|
}
|
|
27806
28150
|
}),
|
|
27807
|
-
remove:
|
|
28151
|
+
remove: defineCommand110({
|
|
27808
28152
|
meta: { name: "remove", description: "Remove one staged change" },
|
|
27809
28153
|
args: { ref: { type: "positional", description: "Staged ref or target id", required: false } },
|
|
27810
28154
|
run: async ({ args }) => {
|
|
@@ -27813,7 +28157,7 @@ var draftCommand3 = defineCommand107({
|
|
|
27813
28157
|
});
|
|
27814
28158
|
}
|
|
27815
28159
|
}),
|
|
27816
|
-
clear:
|
|
28160
|
+
clear: defineCommand110({
|
|
27817
28161
|
meta: { name: "clear", description: "Discard all Google Analytics changes staged on this chat" },
|
|
27818
28162
|
run: async () => {
|
|
27819
28163
|
await draftAction2("/api/ga4/draft/clear", {});
|
|
@@ -27823,7 +28167,7 @@ var draftCommand3 = defineCommand107({
|
|
|
27823
28167
|
});
|
|
27824
28168
|
|
|
27825
28169
|
// src/commands/ga4/properties.ts
|
|
27826
|
-
import { defineCommand as
|
|
28170
|
+
import { defineCommand as defineCommand111 } from "citty";
|
|
27827
28171
|
registerSchema({
|
|
27828
28172
|
command: "ga4.properties",
|
|
27829
28173
|
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.",
|
|
@@ -27839,7 +28183,7 @@ function propertyHints(properties) {
|
|
|
27839
28183
|
resources: properties.map((property) => ({ id: property.externalId, label: property.name }))
|
|
27840
28184
|
});
|
|
27841
28185
|
}
|
|
27842
|
-
var propertiesCommand =
|
|
28186
|
+
var propertiesCommand = defineCommand111({
|
|
27843
28187
|
meta: {
|
|
27844
28188
|
name: "properties",
|
|
27845
28189
|
description: `List accessible GA4 properties.
|
|
@@ -27889,7 +28233,7 @@ Examples:
|
|
|
27889
28233
|
// src/commands/ga4/query.ts
|
|
27890
28234
|
import { appendFileSync as appendFileSync2, existsSync as existsSync5, readFileSync as readFileSync11, writeFileSync as writeFileSync3 } from "fs";
|
|
27891
28235
|
import { resolve as resolve2 } from "path";
|
|
27892
|
-
import { defineCommand as
|
|
28236
|
+
import { defineCommand as defineCommand112 } from "citty";
|
|
27893
28237
|
|
|
27894
28238
|
// src/commands/ga4/presets.ts
|
|
27895
28239
|
var GA4_PRESETS = [
|
|
@@ -28024,7 +28368,7 @@ function handleError2(err) {
|
|
|
28024
28368
|
});
|
|
28025
28369
|
process.exit(1);
|
|
28026
28370
|
}
|
|
28027
|
-
var queryCommand2 =
|
|
28371
|
+
var queryCommand2 = defineCommand112({
|
|
28028
28372
|
meta: {
|
|
28029
28373
|
name: "query",
|
|
28030
28374
|
description: `Run GA4 Data API reports. Preset-first with free-form escape hatch.
|
|
@@ -28095,7 +28439,7 @@ Free-form (escape hatch):
|
|
|
28095
28439
|
});
|
|
28096
28440
|
|
|
28097
28441
|
// src/commands/ga4/write-commands.ts
|
|
28098
|
-
import { defineCommand as
|
|
28442
|
+
import { defineCommand as defineCommand113 } from "citty";
|
|
28099
28443
|
var PROPERTY_ARG_DESCRIPTION = "GA4 property id (optional only when one property is connected \u2014 run `baker ga4 properties`)";
|
|
28100
28444
|
var propertyArg = { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false };
|
|
28101
28445
|
function createJsonDescription(noun) {
|
|
@@ -28113,7 +28457,7 @@ registerSchema({
|
|
|
28113
28457
|
"property-id": { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false }
|
|
28114
28458
|
}
|
|
28115
28459
|
});
|
|
28116
|
-
var keyEventCommand =
|
|
28460
|
+
var keyEventCommand = defineCommand113({
|
|
28117
28461
|
meta: {
|
|
28118
28462
|
name: "key-event",
|
|
28119
28463
|
description: `Stage key-event (conversion) changes
|
|
@@ -28126,7 +28470,7 @@ Examples:
|
|
|
28126
28470
|
baker ga4 key-event delete 4185`
|
|
28127
28471
|
},
|
|
28128
28472
|
subCommands: {
|
|
28129
|
-
create:
|
|
28473
|
+
create: defineCommand113({
|
|
28130
28474
|
meta: {
|
|
28131
28475
|
name: "create",
|
|
28132
28476
|
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."
|
|
@@ -28147,7 +28491,7 @@ Examples:
|
|
|
28147
28491
|
);
|
|
28148
28492
|
}
|
|
28149
28493
|
}),
|
|
28150
|
-
update:
|
|
28494
|
+
update: defineCommand113({
|
|
28151
28495
|
meta: {
|
|
28152
28496
|
name: "update",
|
|
28153
28497
|
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."
|
|
@@ -28167,7 +28511,7 @@ Examples:
|
|
|
28167
28511
|
});
|
|
28168
28512
|
}
|
|
28169
28513
|
}),
|
|
28170
|
-
delete:
|
|
28514
|
+
delete: defineCommand113({
|
|
28171
28515
|
meta: {
|
|
28172
28516
|
name: "delete",
|
|
28173
28517
|
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."
|
|
@@ -28215,7 +28559,7 @@ for (const { kind, noun, createHint } of DEFINITIONS) {
|
|
|
28215
28559
|
}
|
|
28216
28560
|
function definitionCommand(definition) {
|
|
28217
28561
|
const { command, kind, noun, example } = definition;
|
|
28218
|
-
return
|
|
28562
|
+
return defineCommand113({
|
|
28219
28563
|
meta: {
|
|
28220
28564
|
name: command,
|
|
28221
28565
|
description: `Stage ${noun} changes
|
|
@@ -28227,7 +28571,7 @@ Examples:
|
|
|
28227
28571
|
baker ga4 ${command} archive 12`
|
|
28228
28572
|
},
|
|
28229
28573
|
subCommands: {
|
|
28230
|
-
create:
|
|
28574
|
+
create: defineCommand113({
|
|
28231
28575
|
meta: { name: "create", description: `Stage a new ${noun} (or a JSON array of them, staged together)` },
|
|
28232
28576
|
args: {
|
|
28233
28577
|
json: { type: "string", description: createJsonDescription(noun), required: false },
|
|
@@ -28245,7 +28589,7 @@ Examples:
|
|
|
28245
28589
|
);
|
|
28246
28590
|
}
|
|
28247
28591
|
}),
|
|
28248
|
-
update:
|
|
28592
|
+
update: defineCommand113({
|
|
28249
28593
|
meta: {
|
|
28250
28594
|
name: "update",
|
|
28251
28595
|
description: `Stage a change to an existing ${noun} (pass its id). The parameter name and scope cannot change \u2014 archive and recreate for that.`
|
|
@@ -28265,7 +28609,7 @@ Examples:
|
|
|
28265
28609
|
});
|
|
28266
28610
|
}
|
|
28267
28611
|
}),
|
|
28268
|
-
archive:
|
|
28612
|
+
archive: defineCommand113({
|
|
28269
28613
|
meta: {
|
|
28270
28614
|
name: "archive",
|
|
28271
28615
|
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.`
|
|
@@ -28310,7 +28654,7 @@ var dataStreamArg = {
|
|
|
28310
28654
|
function withStream(args) {
|
|
28311
28655
|
return typeof args["data-stream"] === "string" ? { dataStream: args["data-stream"] } : {};
|
|
28312
28656
|
}
|
|
28313
|
-
var customEventCommand =
|
|
28657
|
+
var customEventCommand = defineCommand113({
|
|
28314
28658
|
meta: {
|
|
28315
28659
|
name: "custom-event",
|
|
28316
28660
|
description: `Stage custom events \u2014 new events built from events the site already sends
|
|
@@ -28321,7 +28665,7 @@ Examples:
|
|
|
28321
28665
|
baker ga4 custom-event delete 7`
|
|
28322
28666
|
},
|
|
28323
28667
|
subCommands: {
|
|
28324
|
-
create:
|
|
28668
|
+
create: defineCommand113({
|
|
28325
28669
|
meta: {
|
|
28326
28670
|
name: "create",
|
|
28327
28671
|
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."
|
|
@@ -28344,7 +28688,7 @@ Examples:
|
|
|
28344
28688
|
);
|
|
28345
28689
|
}
|
|
28346
28690
|
}),
|
|
28347
|
-
update:
|
|
28691
|
+
update: defineCommand113({
|
|
28348
28692
|
meta: { name: "update", description: "Stage a change to an existing custom event (pass its id)" },
|
|
28349
28693
|
args: {
|
|
28350
28694
|
id: { type: "positional", description: "Custom event rule id", required: false },
|
|
@@ -28363,7 +28707,7 @@ Examples:
|
|
|
28363
28707
|
});
|
|
28364
28708
|
}
|
|
28365
28709
|
}),
|
|
28366
|
-
delete:
|
|
28710
|
+
delete: defineCommand113({
|
|
28367
28711
|
meta: {
|
|
28368
28712
|
name: "delete",
|
|
28369
28713
|
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."
|
|
@@ -28409,16 +28753,16 @@ function retentionValue(input, flag) {
|
|
|
28409
28753
|
const normalized = input.trim();
|
|
28410
28754
|
const mapped = RETENTION_BY_MONTHS[normalized] ?? (Object.values(RETENTION_BY_MONTHS).includes(normalized.toUpperCase()) ? normalized.toUpperCase() : void 0);
|
|
28411
28755
|
if (!mapped) {
|
|
28412
|
-
|
|
28756
|
+
failValidation3(`--${flag} must be one of 2, 14, 26, 38 or 50 (months)`);
|
|
28413
28757
|
}
|
|
28414
28758
|
return mapped;
|
|
28415
28759
|
}
|
|
28416
28760
|
function booleanArg(input, flag) {
|
|
28417
28761
|
if (input === "true") return true;
|
|
28418
28762
|
if (input === "false") return false;
|
|
28419
|
-
return
|
|
28763
|
+
return failValidation3(`--${flag} must be true or false`);
|
|
28420
28764
|
}
|
|
28421
|
-
var dataRetentionCommand =
|
|
28765
|
+
var dataRetentionCommand = defineCommand113({
|
|
28422
28766
|
meta: {
|
|
28423
28767
|
name: "data-retention",
|
|
28424
28768
|
description: `Stage a change to how long Google Analytics keeps data
|
|
@@ -28428,7 +28772,7 @@ Examples:
|
|
|
28428
28772
|
baker ga4 data-retention set --event-data 14 --user-data 14 --reset-on-activity true`
|
|
28429
28773
|
},
|
|
28430
28774
|
subCommands: {
|
|
28431
|
-
set:
|
|
28775
|
+
set: defineCommand113({
|
|
28432
28776
|
meta: { name: "set", description: "Stage the retention window (months)" },
|
|
28433
28777
|
args: {
|
|
28434
28778
|
"event-data": { type: "string", description: "2, 14, 26, 38 or 50", required: false },
|
|
@@ -28448,7 +28792,7 @@ Examples:
|
|
|
28448
28792
|
payload.resetUserDataOnNewActivity = booleanArg(args["reset-on-activity"], "reset-on-activity");
|
|
28449
28793
|
}
|
|
28450
28794
|
if (Object.keys(payload).length === 0) {
|
|
28451
|
-
|
|
28795
|
+
failValidation3("pass at least one of --event-data, --user-data or --reset-on-activity");
|
|
28452
28796
|
}
|
|
28453
28797
|
await stageOp3({ kind: "ga4.dataRetention.update", payload, ...withProperty(args) });
|
|
28454
28798
|
}
|
|
@@ -28457,7 +28801,7 @@ Examples:
|
|
|
28457
28801
|
});
|
|
28458
28802
|
|
|
28459
28803
|
// src/commands/ga4/index.ts
|
|
28460
|
-
var ga4Command =
|
|
28804
|
+
var ga4Command = defineCommand114({
|
|
28461
28805
|
meta: {
|
|
28462
28806
|
name: "ga4",
|
|
28463
28807
|
description: `Google Analytics 4. Report on a property, audit its config, and change what it measures.
|
|
@@ -28498,12 +28842,12 @@ Full guide: __tooling__/docs/tools/baker/ga4.md`
|
|
|
28498
28842
|
});
|
|
28499
28843
|
|
|
28500
28844
|
// src/commands/gsc/index.ts
|
|
28501
|
-
import { defineCommand as
|
|
28845
|
+
import { defineCommand as defineCommand118 } from "citty";
|
|
28502
28846
|
|
|
28503
28847
|
// src/commands/gsc/query.ts
|
|
28504
28848
|
import { appendFileSync as appendFileSync3, existsSync as existsSync6, readFileSync as readFileSync12, writeFileSync as writeFileSync4 } from "fs";
|
|
28505
28849
|
import { resolve as resolve3 } from "path";
|
|
28506
|
-
import { defineCommand as
|
|
28850
|
+
import { defineCommand as defineCommand115 } from "citty";
|
|
28507
28851
|
|
|
28508
28852
|
// src/commands/gsc/presets.ts
|
|
28509
28853
|
var GSC_PRESETS = [
|
|
@@ -28697,7 +29041,7 @@ function handleError3(err) {
|
|
|
28697
29041
|
});
|
|
28698
29042
|
process.exit(1);
|
|
28699
29043
|
}
|
|
28700
|
-
var queryCommand3 =
|
|
29044
|
+
var queryCommand3 = defineCommand115({
|
|
28701
29045
|
meta: {
|
|
28702
29046
|
name: "query",
|
|
28703
29047
|
description: `Run GSC Search Analytics queries. Preset-first with free-form escape hatch.
|
|
@@ -28775,7 +29119,7 @@ Free-form (escape hatch):
|
|
|
28775
29119
|
});
|
|
28776
29120
|
|
|
28777
29121
|
// src/commands/gsc/sitemaps.ts
|
|
28778
|
-
import { defineCommand as
|
|
29122
|
+
import { defineCommand as defineCommand116 } from "citty";
|
|
28779
29123
|
registerSchema({
|
|
28780
29124
|
command: "gsc.sitemaps",
|
|
28781
29125
|
description: "List sitemaps for a Search Console site. Check sitemap health and errors.",
|
|
@@ -28784,7 +29128,7 @@ registerSchema({
|
|
|
28784
29128
|
"no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false }
|
|
28785
29129
|
}
|
|
28786
29130
|
});
|
|
28787
|
-
var sitemapsCommand =
|
|
29131
|
+
var sitemapsCommand = defineCommand116({
|
|
28788
29132
|
meta: {
|
|
28789
29133
|
name: "sitemaps",
|
|
28790
29134
|
description: `List sitemaps for a site. Check health and errors.
|
|
@@ -28837,7 +29181,7 @@ Examples:
|
|
|
28837
29181
|
});
|
|
28838
29182
|
|
|
28839
29183
|
// src/commands/gsc/sites.ts
|
|
28840
|
-
import { defineCommand as
|
|
29184
|
+
import { defineCommand as defineCommand117 } from "citty";
|
|
28841
29185
|
registerSchema({
|
|
28842
29186
|
command: "gsc.sites",
|
|
28843
29187
|
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.",
|
|
@@ -28853,7 +29197,7 @@ function siteHints(sites) {
|
|
|
28853
29197
|
resources: sites.map((site) => ({ id: site.siteUrl, label: site.permissionLevel }))
|
|
28854
29198
|
});
|
|
28855
29199
|
}
|
|
28856
|
-
var sitesCommand =
|
|
29200
|
+
var sitesCommand = defineCommand117({
|
|
28857
29201
|
meta: {
|
|
28858
29202
|
name: "sites",
|
|
28859
29203
|
description: `List verified Search Console sites.
|
|
@@ -28901,7 +29245,7 @@ Examples:
|
|
|
28901
29245
|
});
|
|
28902
29246
|
|
|
28903
29247
|
// src/commands/gsc/index.ts
|
|
28904
|
-
var gscCommand =
|
|
29248
|
+
var gscCommand = defineCommand118({
|
|
28905
29249
|
meta: {
|
|
28906
29250
|
name: "gsc",
|
|
28907
29251
|
description: `Google Search Console commands. PPC-SEO arbitrage, brand halo analysis, negative keyword discovery.
|
|
@@ -28925,7 +29269,7 @@ Full guide: __tooling__/docs/tools/baker/gsc.md`
|
|
|
28925
29269
|
});
|
|
28926
29270
|
|
|
28927
29271
|
// src/commands/history/index.ts
|
|
28928
|
-
import { defineCommand as
|
|
29272
|
+
import { defineCommand as defineCommand119 } from "citty";
|
|
28929
29273
|
registerSchema({
|
|
28930
29274
|
command: "history.list",
|
|
28931
29275
|
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.",
|
|
@@ -28980,7 +29324,7 @@ function parseBoundedInt2(raw, name, min, max) {
|
|
|
28980
29324
|
}
|
|
28981
29325
|
return value;
|
|
28982
29326
|
}
|
|
28983
|
-
var
|
|
29327
|
+
var listCommand13 = defineCommand119({
|
|
28984
29328
|
meta: {
|
|
28985
29329
|
name: "list",
|
|
28986
29330
|
description: "List recent account changes (unified audit log), newest first."
|
|
@@ -29026,17 +29370,17 @@ var listCommand12 = defineCommand116({
|
|
|
29026
29370
|
}
|
|
29027
29371
|
}
|
|
29028
29372
|
});
|
|
29029
|
-
var historyCommand =
|
|
29373
|
+
var historyCommand = defineCommand119({
|
|
29030
29374
|
meta: {
|
|
29031
29375
|
name: "history",
|
|
29032
29376
|
description: `Unified account history (audit log): what changed, who did it, and when.
|
|
29033
29377
|
Full guide: __tooling__/docs/tools/baker/history.md`
|
|
29034
29378
|
},
|
|
29035
|
-
subCommands: { list:
|
|
29379
|
+
subCommands: { list: listCommand13 }
|
|
29036
29380
|
});
|
|
29037
29381
|
|
|
29038
29382
|
// src/commands/hubspot/index.ts
|
|
29039
|
-
import { defineCommand as
|
|
29383
|
+
import { defineCommand as defineCommand120 } from "citty";
|
|
29040
29384
|
var EMBED_TYPES = ["legacy", "v4", "unknown"];
|
|
29041
29385
|
function failNotConnected(err) {
|
|
29042
29386
|
if (err instanceof ApiError && err.code === "FORBIDDEN" && err.message.includes(HUBSPOT_MISSING_GRANT_MARKER)) {
|
|
@@ -29173,7 +29517,7 @@ registerSchema({
|
|
|
29173
29517
|
}
|
|
29174
29518
|
}
|
|
29175
29519
|
});
|
|
29176
|
-
var formsListCommand =
|
|
29520
|
+
var formsListCommand = defineCommand120({
|
|
29177
29521
|
meta: {
|
|
29178
29522
|
name: "list",
|
|
29179
29523
|
description: "List HubSpot forms with embed type and post-submit action. Example: baker hubspot forms list --redirecting-only"
|
|
@@ -29218,7 +29562,7 @@ var formsListCommand = defineCommand117({
|
|
|
29218
29562
|
}
|
|
29219
29563
|
}
|
|
29220
29564
|
});
|
|
29221
|
-
var formsViewCommand =
|
|
29565
|
+
var formsViewCommand = defineCommand120({
|
|
29222
29566
|
meta: {
|
|
29223
29567
|
name: "view",
|
|
29224
29568
|
description: "Show one HubSpot form's fields and configuration. Example: baker hubspot forms view 1a2b3c"
|
|
@@ -29270,7 +29614,7 @@ var formsViewCommand = defineCommand117({
|
|
|
29270
29614
|
}
|
|
29271
29615
|
}
|
|
29272
29616
|
});
|
|
29273
|
-
var meetingsListCommand =
|
|
29617
|
+
var meetingsListCommand = defineCommand120({
|
|
29274
29618
|
meta: {
|
|
29275
29619
|
name: "list",
|
|
29276
29620
|
description: "List HubSpot meeting links (calendars). Example: baker hubspot meetings list"
|
|
@@ -29312,7 +29656,7 @@ var meetingsListCommand = defineCommand117({
|
|
|
29312
29656
|
}
|
|
29313
29657
|
}
|
|
29314
29658
|
});
|
|
29315
|
-
var meetingsViewCommand =
|
|
29659
|
+
var meetingsViewCommand = defineCommand120({
|
|
29316
29660
|
meta: {
|
|
29317
29661
|
name: "view",
|
|
29318
29662
|
description: "Show one HubSpot meeting link's booking fields. Example: baker hubspot meetings view discovery-call"
|
|
@@ -29356,7 +29700,7 @@ var meetingsViewCommand = defineCommand117({
|
|
|
29356
29700
|
}
|
|
29357
29701
|
}
|
|
29358
29702
|
});
|
|
29359
|
-
var formsSubmissionsCommand =
|
|
29703
|
+
var formsSubmissionsCommand = defineCommand120({
|
|
29360
29704
|
meta: {
|
|
29361
29705
|
name: "submissions",
|
|
29362
29706
|
description: "How many leads a form received, and when. Example: baker hubspot forms submissions <formId> --days 30"
|
|
@@ -29405,7 +29749,7 @@ var formsSubmissionsCommand = defineCommand117({
|
|
|
29405
29749
|
}
|
|
29406
29750
|
}
|
|
29407
29751
|
});
|
|
29408
|
-
var workflowsListCommand =
|
|
29752
|
+
var workflowsListCommand = defineCommand120({
|
|
29409
29753
|
meta: {
|
|
29410
29754
|
name: "list",
|
|
29411
29755
|
description: "List HubSpot workflows. Example: baker hubspot workflows list --enabled-only"
|
|
@@ -29441,7 +29785,7 @@ var workflowsListCommand = defineCommand117({
|
|
|
29441
29785
|
}
|
|
29442
29786
|
}
|
|
29443
29787
|
});
|
|
29444
|
-
var pipelinesListCommand =
|
|
29788
|
+
var pipelinesListCommand = defineCommand120({
|
|
29445
29789
|
meta: {
|
|
29446
29790
|
name: "list",
|
|
29447
29791
|
description: "List HubSpot deal pipelines and their stages. Example: baker hubspot pipelines list"
|
|
@@ -29458,7 +29802,7 @@ var pipelinesListCommand = defineCommand117({
|
|
|
29458
29802
|
}
|
|
29459
29803
|
}
|
|
29460
29804
|
});
|
|
29461
|
-
var contactsSummaryCommand =
|
|
29805
|
+
var contactsSummaryCommand = defineCommand120({
|
|
29462
29806
|
meta: {
|
|
29463
29807
|
name: "summary",
|
|
29464
29808
|
description: "Whether recent leads are being worked, as counts. Example: baker hubspot contacts summary --days 30"
|
|
@@ -29528,7 +29872,7 @@ function contactLookupHints(data) {
|
|
|
29528
29872
|
}
|
|
29529
29873
|
return hints;
|
|
29530
29874
|
}
|
|
29531
|
-
var contactsLookupCommand =
|
|
29875
|
+
var contactsLookupCommand = defineCommand120({
|
|
29532
29876
|
meta: {
|
|
29533
29877
|
name: "lookup",
|
|
29534
29878
|
description: "Find one contact by email and see whether it was worked. Example: baker hubspot contacts lookup a@b.com"
|
|
@@ -29552,27 +29896,27 @@ var contactsLookupCommand = defineCommand117({
|
|
|
29552
29896
|
}
|
|
29553
29897
|
}
|
|
29554
29898
|
});
|
|
29555
|
-
var contactsCommand =
|
|
29899
|
+
var contactsCommand = defineCommand120({
|
|
29556
29900
|
meta: { name: "contacts", description: "Contacts on the connected HubSpot account." },
|
|
29557
29901
|
subCommands: { summary: contactsSummaryCommand, lookup: contactsLookupCommand }
|
|
29558
29902
|
});
|
|
29559
|
-
var formsCommand =
|
|
29903
|
+
var formsCommand = defineCommand120({
|
|
29560
29904
|
meta: { name: "forms", description: "HubSpot forms on the connected account." },
|
|
29561
29905
|
subCommands: { list: formsListCommand, view: formsViewCommand, submissions: formsSubmissionsCommand }
|
|
29562
29906
|
});
|
|
29563
|
-
var workflowsCommand =
|
|
29907
|
+
var workflowsCommand = defineCommand120({
|
|
29564
29908
|
meta: { name: "workflows", description: "HubSpot workflows on the connected account." },
|
|
29565
29909
|
subCommands: { list: workflowsListCommand }
|
|
29566
29910
|
});
|
|
29567
|
-
var pipelinesCommand =
|
|
29911
|
+
var pipelinesCommand = defineCommand120({
|
|
29568
29912
|
meta: { name: "pipelines", description: "HubSpot deal pipelines on the connected account." },
|
|
29569
29913
|
subCommands: { list: pipelinesListCommand }
|
|
29570
29914
|
});
|
|
29571
|
-
var meetingsCommand =
|
|
29915
|
+
var meetingsCommand = defineCommand120({
|
|
29572
29916
|
meta: { name: "meetings", description: "HubSpot meeting links (calendars) on the connected account." },
|
|
29573
29917
|
subCommands: { list: meetingsListCommand, view: meetingsViewCommand }
|
|
29574
29918
|
});
|
|
29575
|
-
var hubspotCommand =
|
|
29919
|
+
var hubspotCommand = defineCommand120({
|
|
29576
29920
|
meta: {
|
|
29577
29921
|
name: "hubspot",
|
|
29578
29922
|
description: `Read the connected HubSpot account \u2014 forms, the leads they received, workflows, deal pipelines and
|
|
@@ -29609,10 +29953,10 @@ Full guide: __tooling__/docs/tools/baker/hubspot.md`
|
|
|
29609
29953
|
});
|
|
29610
29954
|
|
|
29611
29955
|
// src/commands/images/index.ts
|
|
29612
|
-
import { defineCommand as
|
|
29956
|
+
import { defineCommand as defineCommand145 } from "citty";
|
|
29613
29957
|
|
|
29614
29958
|
// src/commands/images/crop.ts
|
|
29615
|
-
import { defineCommand as
|
|
29959
|
+
import { defineCommand as defineCommand121 } from "citty";
|
|
29616
29960
|
|
|
29617
29961
|
// src/lib/image/crop-sprite.ts
|
|
29618
29962
|
import sharp from "sharp";
|
|
@@ -29737,7 +30081,7 @@ function emitError2(err) {
|
|
|
29737
30081
|
}
|
|
29738
30082
|
process.exit(1);
|
|
29739
30083
|
}
|
|
29740
|
-
var cropCommand =
|
|
30084
|
+
var cropCommand = defineCommand121({
|
|
29741
30085
|
meta: {
|
|
29742
30086
|
name: "crop",
|
|
29743
30087
|
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"
|
|
@@ -29773,7 +30117,7 @@ var cropCommand = defineCommand118({
|
|
|
29773
30117
|
});
|
|
29774
30118
|
|
|
29775
30119
|
// src/commands/images/delete.ts
|
|
29776
|
-
import { defineCommand as
|
|
30120
|
+
import { defineCommand as defineCommand122 } from "citty";
|
|
29777
30121
|
registerSchema({
|
|
29778
30122
|
command: "images.delete",
|
|
29779
30123
|
description: "Delete an image by ID",
|
|
@@ -29787,7 +30131,7 @@ registerSchema({
|
|
|
29787
30131
|
}
|
|
29788
30132
|
}
|
|
29789
30133
|
});
|
|
29790
|
-
var deleteCommand =
|
|
30134
|
+
var deleteCommand = defineCommand122({
|
|
29791
30135
|
meta: {
|
|
29792
30136
|
name: "delete",
|
|
29793
30137
|
description: "Delete an image by ID. Use --dry-run to preview. Example: baker images delete j571abc123 --dry-run"
|
|
@@ -29828,7 +30172,7 @@ var deleteCommand = defineCommand119({
|
|
|
29828
30172
|
});
|
|
29829
30173
|
|
|
29830
30174
|
// src/commands/images/dimensions.ts
|
|
29831
|
-
import { defineCommand as
|
|
30175
|
+
import { defineCommand as defineCommand123 } from "citty";
|
|
29832
30176
|
|
|
29833
30177
|
// src/lib/image/dimensions.ts
|
|
29834
30178
|
import { imageSize } from "image-size";
|
|
@@ -29851,7 +30195,7 @@ registerSchema({
|
|
|
29851
30195
|
target: { type: "string", description: "Local file path or remote http(s) URL", required: true }
|
|
29852
30196
|
}
|
|
29853
30197
|
});
|
|
29854
|
-
var dimensionsCommand =
|
|
30198
|
+
var dimensionsCommand = defineCommand123({
|
|
29855
30199
|
meta: {
|
|
29856
30200
|
name: "dimensions",
|
|
29857
30201
|
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"
|
|
@@ -29895,7 +30239,7 @@ var dimensionsCommand = defineCommand120({
|
|
|
29895
30239
|
});
|
|
29896
30240
|
|
|
29897
30241
|
// src/commands/images/extract.ts
|
|
29898
|
-
import { defineCommand as
|
|
30242
|
+
import { defineCommand as defineCommand124 } from "citty";
|
|
29899
30243
|
registerSchema({
|
|
29900
30244
|
command: "images.extract",
|
|
29901
30245
|
description: "Extract images from a URL via Firecrawl (formats: images).",
|
|
@@ -29911,7 +30255,7 @@ registerSchema({
|
|
|
29911
30255
|
}
|
|
29912
30256
|
}
|
|
29913
30257
|
});
|
|
29914
|
-
var extractCommand =
|
|
30258
|
+
var extractCommand = defineCommand124({
|
|
29915
30259
|
meta: {
|
|
29916
30260
|
name: "extract",
|
|
29917
30261
|
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"
|
|
@@ -29949,7 +30293,7 @@ var extractCommand = defineCommand121({
|
|
|
29949
30293
|
});
|
|
29950
30294
|
|
|
29951
30295
|
// src/commands/images/find.ts
|
|
29952
|
-
import { defineCommand as
|
|
30296
|
+
import { defineCommand as defineCommand125 } from "citty";
|
|
29953
30297
|
registerSchema({
|
|
29954
30298
|
command: "images.find",
|
|
29955
30299
|
description: "Fanout image search: library first, then opted-in external providers.",
|
|
@@ -29981,7 +30325,7 @@ registerSchema({
|
|
|
29981
30325
|
}
|
|
29982
30326
|
}
|
|
29983
30327
|
});
|
|
29984
|
-
var findCommand =
|
|
30328
|
+
var findCommand = defineCommand125({
|
|
29985
30329
|
meta: {
|
|
29986
30330
|
name: "find",
|
|
29987
30331
|
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"
|
|
@@ -30029,7 +30373,7 @@ var findCommand = defineCommand122({
|
|
|
30029
30373
|
});
|
|
30030
30374
|
|
|
30031
30375
|
// src/commands/images/get.ts
|
|
30032
|
-
import { defineCommand as
|
|
30376
|
+
import { defineCommand as defineCommand126 } from "citty";
|
|
30033
30377
|
registerSchema({
|
|
30034
30378
|
command: "images.get",
|
|
30035
30379
|
description: "Get a single image by ID",
|
|
@@ -30037,7 +30381,7 @@ registerSchema({
|
|
|
30037
30381
|
id: { type: "string", description: "Image ID", required: true }
|
|
30038
30382
|
}
|
|
30039
30383
|
});
|
|
30040
|
-
var getCommand2 =
|
|
30384
|
+
var getCommand2 = defineCommand126({
|
|
30041
30385
|
meta: { name: "get", description: "Get a single image by ID. Example: baker images get j571abc123" },
|
|
30042
30386
|
args: {
|
|
30043
30387
|
id: { type: "positional", description: "Image ID", required: false },
|
|
@@ -30073,7 +30417,7 @@ var getCommand2 = defineCommand123({
|
|
|
30073
30417
|
});
|
|
30074
30418
|
|
|
30075
30419
|
// src/commands/images/gif.ts
|
|
30076
|
-
import { defineCommand as
|
|
30420
|
+
import { defineCommand as defineCommand127 } from "citty";
|
|
30077
30421
|
registerSchema({
|
|
30078
30422
|
command: "images.gif",
|
|
30079
30423
|
description: "Search Giphy for GIFs / reaction memes (paid social creative).",
|
|
@@ -30105,7 +30449,7 @@ registerSchema({
|
|
|
30105
30449
|
}
|
|
30106
30450
|
}
|
|
30107
30451
|
});
|
|
30108
|
-
var gifCommand =
|
|
30452
|
+
var gifCommand = defineCommand127({
|
|
30109
30453
|
meta: {
|
|
30110
30454
|
name: "gif",
|
|
30111
30455
|
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"
|
|
@@ -30152,7 +30496,7 @@ var gifCommand = defineCommand124({
|
|
|
30152
30496
|
});
|
|
30153
30497
|
|
|
30154
30498
|
// src/commands/images/google.ts
|
|
30155
|
-
import { defineCommand as
|
|
30499
|
+
import { defineCommand as defineCommand128 } from "citty";
|
|
30156
30500
|
|
|
30157
30501
|
// src/commands/images/searchHints.ts
|
|
30158
30502
|
var FALLBACK = {
|
|
@@ -30216,7 +30560,7 @@ registerSchema({
|
|
|
30216
30560
|
}
|
|
30217
30561
|
}
|
|
30218
30562
|
});
|
|
30219
|
-
var googleCommand2 =
|
|
30563
|
+
var googleCommand2 = defineCommand128({
|
|
30220
30564
|
meta: {
|
|
30221
30565
|
name: "google",
|
|
30222
30566
|
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"
|
|
@@ -30272,7 +30616,7 @@ var googleCommand2 = defineCommand125({
|
|
|
30272
30616
|
});
|
|
30273
30617
|
|
|
30274
30618
|
// src/commands/images/group.ts
|
|
30275
|
-
import { defineCommand as
|
|
30619
|
+
import { defineCommand as defineCommand129 } from "citty";
|
|
30276
30620
|
|
|
30277
30621
|
// src/commands/mediaGroup.ts
|
|
30278
30622
|
async function runMediaGroupLookup(input) {
|
|
@@ -30325,7 +30669,7 @@ registerSchema({
|
|
|
30325
30669
|
"group-key": { type: "string", description: "The set key directly, when you already have it", required: false }
|
|
30326
30670
|
}
|
|
30327
30671
|
});
|
|
30328
|
-
var groupCommand =
|
|
30672
|
+
var groupCommand = defineCommand129({
|
|
30329
30673
|
meta: {
|
|
30330
30674
|
name: "group",
|
|
30331
30675
|
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>"
|
|
@@ -30345,7 +30689,7 @@ var groupCommand = defineCommand126({
|
|
|
30345
30689
|
});
|
|
30346
30690
|
|
|
30347
30691
|
// src/commands/images/icon.ts
|
|
30348
|
-
import { defineCommand as
|
|
30692
|
+
import { defineCommand as defineCommand130 } from "citty";
|
|
30349
30693
|
registerSchema({
|
|
30350
30694
|
command: "images.icon",
|
|
30351
30695
|
description: "Icon lookup via Iconify (200+ icon sets, free CDN).",
|
|
@@ -30371,7 +30715,7 @@ registerSchema({
|
|
|
30371
30715
|
}
|
|
30372
30716
|
}
|
|
30373
30717
|
});
|
|
30374
|
-
var iconCommand =
|
|
30718
|
+
var iconCommand = defineCommand130({
|
|
30375
30719
|
meta: {
|
|
30376
30720
|
name: "icon",
|
|
30377
30721
|
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'"
|
|
@@ -30411,7 +30755,7 @@ var iconCommand = defineCommand127({
|
|
|
30411
30755
|
});
|
|
30412
30756
|
|
|
30413
30757
|
// src/commands/images/ingest.ts
|
|
30414
|
-
import { defineCommand as
|
|
30758
|
+
import { defineCommand as defineCommand131 } from "citty";
|
|
30415
30759
|
registerSchema({
|
|
30416
30760
|
command: "images.ingest",
|
|
30417
30761
|
description: "Ingest a remote image URL into the library (full describe + embed).",
|
|
@@ -30423,7 +30767,7 @@ registerSchema({
|
|
|
30423
30767
|
context: { type: "string", description: "Description context hint", required: false }
|
|
30424
30768
|
}
|
|
30425
30769
|
});
|
|
30426
|
-
var ingestCommand =
|
|
30770
|
+
var ingestCommand = defineCommand131({
|
|
30427
30771
|
meta: {
|
|
30428
30772
|
name: "ingest",
|
|
30429
30773
|
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"
|
|
@@ -30465,7 +30809,7 @@ var ingestCommand = defineCommand128({
|
|
|
30465
30809
|
});
|
|
30466
30810
|
|
|
30467
30811
|
// src/commands/images/layerize.ts
|
|
30468
|
-
import { defineCommand as
|
|
30812
|
+
import { defineCommand as defineCommand132 } from "citty";
|
|
30469
30813
|
registerSchema({
|
|
30470
30814
|
command: "images.layerize",
|
|
30471
30815
|
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.",
|
|
@@ -30529,7 +30873,7 @@ async function pollUntilSettled(imageId, maxWait) {
|
|
|
30529
30873
|
}
|
|
30530
30874
|
return null;
|
|
30531
30875
|
}
|
|
30532
|
-
var layerizeCommand =
|
|
30876
|
+
var layerizeCommand = defineCommand132({
|
|
30533
30877
|
meta: {
|
|
30534
30878
|
name: "layerize",
|
|
30535
30879
|
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'"
|
|
@@ -30598,7 +30942,7 @@ registerSchema({
|
|
|
30598
30942
|
full: { type: "boolean", description: "Include geometry and typography for every layer", required: false }
|
|
30599
30943
|
}
|
|
30600
30944
|
});
|
|
30601
|
-
var layersCommand =
|
|
30945
|
+
var layersCommand = defineCommand132({
|
|
30602
30946
|
meta: {
|
|
30603
30947
|
name: "layers",
|
|
30604
30948
|
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"
|
|
@@ -30638,7 +30982,7 @@ var layersCommand = defineCommand129({
|
|
|
30638
30982
|
});
|
|
30639
30983
|
|
|
30640
30984
|
// src/commands/images/library.ts
|
|
30641
|
-
import { defineCommand as
|
|
30985
|
+
import { defineCommand as defineCommand133 } from "citty";
|
|
30642
30986
|
registerSchema({
|
|
30643
30987
|
command: "images.library",
|
|
30644
30988
|
description: "Search the company image library. Returns only ready images.",
|
|
@@ -30664,7 +31008,7 @@ registerSchema({
|
|
|
30664
31008
|
}
|
|
30665
31009
|
}
|
|
30666
31010
|
});
|
|
30667
|
-
var libraryCommand =
|
|
31011
|
+
var libraryCommand = defineCommand133({
|
|
30668
31012
|
meta: {
|
|
30669
31013
|
name: "library",
|
|
30670
31014
|
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"
|
|
@@ -30721,7 +31065,7 @@ var libraryCommand = defineCommand130({
|
|
|
30721
31065
|
});
|
|
30722
31066
|
|
|
30723
31067
|
// src/commands/images/logo.ts
|
|
30724
|
-
import { defineCommand as
|
|
31068
|
+
import { defineCommand as defineCommand134 } from "citty";
|
|
30725
31069
|
registerSchema({
|
|
30726
31070
|
command: "images.logo",
|
|
30727
31071
|
description: "Brand logo lookup via Brandfetch CDN (fallback/404). Auto-ingests by default.",
|
|
@@ -30746,7 +31090,7 @@ registerSchema({
|
|
|
30746
31090
|
}
|
|
30747
31091
|
}
|
|
30748
31092
|
});
|
|
30749
|
-
var logoCommand =
|
|
31093
|
+
var logoCommand = defineCommand134({
|
|
30750
31094
|
meta: {
|
|
30751
31095
|
name: "logo",
|
|
30752
31096
|
description: "Brand logo via Brandfetch CDN. Returns up to 5 variants (icon, light/dark logo, light/dark symbol). Auto-ingests the first variant.\n\nExample: baker images logo stripe.com --variant logo"
|
|
@@ -30784,7 +31128,7 @@ var logoCommand = defineCommand131({
|
|
|
30784
31128
|
});
|
|
30785
31129
|
|
|
30786
31130
|
// src/commands/images/normalize.ts
|
|
30787
|
-
import { defineCommand as
|
|
31131
|
+
import { defineCommand as defineCommand135 } from "citty";
|
|
30788
31132
|
|
|
30789
31133
|
// src/lib/image/color-changer.ts
|
|
30790
31134
|
import quantize from "quantize";
|
|
@@ -31516,7 +31860,7 @@ function coerceRawArgs(args) {
|
|
|
31516
31860
|
"dry-run": bool(args["dry-run"])
|
|
31517
31861
|
};
|
|
31518
31862
|
}
|
|
31519
|
-
var normalizeCommand =
|
|
31863
|
+
var normalizeCommand = defineCommand135({
|
|
31520
31864
|
meta: {
|
|
31521
31865
|
name: "normalize",
|
|
31522
31866
|
description: `Normalize logos / images: declarative recolor + bg removal + trim + resize. Operates on local files; writes in-place by default.
|
|
@@ -31571,7 +31915,7 @@ Examples:
|
|
|
31571
31915
|
});
|
|
31572
31916
|
|
|
31573
31917
|
// src/commands/images/pinterest.ts
|
|
31574
|
-
import { defineCommand as
|
|
31918
|
+
import { defineCommand as defineCommand136 } from "citty";
|
|
31575
31919
|
registerSchema({
|
|
31576
31920
|
command: "images.pinterest",
|
|
31577
31921
|
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.",
|
|
@@ -31591,7 +31935,7 @@ registerSchema({
|
|
|
31591
31935
|
}
|
|
31592
31936
|
}
|
|
31593
31937
|
});
|
|
31594
|
-
var pinterestCommand =
|
|
31938
|
+
var pinterestCommand = defineCommand136({
|
|
31595
31939
|
meta: {
|
|
31596
31940
|
name: "pinterest",
|
|
31597
31941
|
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'"
|
|
@@ -31631,7 +31975,7 @@ var pinterestCommand = defineCommand133({
|
|
|
31631
31975
|
});
|
|
31632
31976
|
|
|
31633
31977
|
// src/commands/images/screenshot.ts
|
|
31634
|
-
import { defineCommand as
|
|
31978
|
+
import { defineCommand as defineCommand137 } from "citty";
|
|
31635
31979
|
registerSchema({
|
|
31636
31980
|
command: "images.screenshot",
|
|
31637
31981
|
description: "Capture a website screenshot via ScreenshotOne. Auto-ingests on success.",
|
|
@@ -31647,7 +31991,7 @@ registerSchema({
|
|
|
31647
31991
|
}
|
|
31648
31992
|
}
|
|
31649
31993
|
});
|
|
31650
|
-
var screenshotCommand =
|
|
31994
|
+
var screenshotCommand = defineCommand137({
|
|
31651
31995
|
meta: {
|
|
31652
31996
|
name: "screenshot",
|
|
31653
31997
|
description: "Screenshot a URL via ScreenshotOne. $0.009/capture. Auto-ingests to library.\n\nExample: baker images screenshot https://stripe.com --full-page"
|
|
@@ -31710,7 +32054,7 @@ var screenshotCommand = defineCommand134({
|
|
|
31710
32054
|
});
|
|
31711
32055
|
|
|
31712
32056
|
// src/commands/images/search.ts
|
|
31713
|
-
import { defineCommand as
|
|
32057
|
+
import { defineCommand as defineCommand138 } from "citty";
|
|
31714
32058
|
registerSchema({
|
|
31715
32059
|
command: "images.search",
|
|
31716
32060
|
description: "Search images by text query. Only returns ready images.",
|
|
@@ -31726,7 +32070,7 @@ registerSchema({
|
|
|
31726
32070
|
tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
|
|
31727
32071
|
}
|
|
31728
32072
|
});
|
|
31729
|
-
var searchCommand =
|
|
32073
|
+
var searchCommand = defineCommand138({
|
|
31730
32074
|
meta: {
|
|
31731
32075
|
name: "search",
|
|
31732
32076
|
description: "Semantic search images by text query. Uses hybrid BM25 + vector + reranking. Example: baker images search 'hero banner' --aspect-ratio 16:9 --tags logo"
|
|
@@ -31786,7 +32130,7 @@ var searchCommand = defineCommand135({
|
|
|
31786
32130
|
});
|
|
31787
32131
|
|
|
31788
32132
|
// src/commands/images/sticker.ts
|
|
31789
|
-
import { defineCommand as
|
|
32133
|
+
import { defineCommand as defineCommand139 } from "citty";
|
|
31790
32134
|
registerSchema({
|
|
31791
32135
|
command: "images.sticker",
|
|
31792
32136
|
description: "Search Giphy stickers \u2014 transparent-background overlays for ad creative.",
|
|
@@ -31818,7 +32162,7 @@ registerSchema({
|
|
|
31818
32162
|
}
|
|
31819
32163
|
}
|
|
31820
32164
|
});
|
|
31821
|
-
var stickerCommand =
|
|
32165
|
+
var stickerCommand = defineCommand139({
|
|
31822
32166
|
meta: {
|
|
31823
32167
|
name: "sticker",
|
|
31824
32168
|
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"
|
|
@@ -31865,7 +32209,7 @@ var stickerCommand = defineCommand136({
|
|
|
31865
32209
|
});
|
|
31866
32210
|
|
|
31867
32211
|
// src/commands/images/stock.ts
|
|
31868
|
-
import { defineCommand as
|
|
32212
|
+
import { defineCommand as defineCommand140 } from "citty";
|
|
31869
32213
|
var STOCK_ERROR_FIX = {
|
|
31870
32214
|
action: "use_different_resource",
|
|
31871
32215
|
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."
|
|
@@ -31942,7 +32286,7 @@ function buildStockRequest(query, args) {
|
|
|
31942
32286
|
if (args.context) body.descriptionContext = args.context;
|
|
31943
32287
|
return body;
|
|
31944
32288
|
}
|
|
31945
|
-
var stockCommand =
|
|
32289
|
+
var stockCommand = defineCommand140({
|
|
31946
32290
|
meta: {
|
|
31947
32291
|
name: "stock",
|
|
31948
32292
|
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"
|
|
@@ -31998,7 +32342,7 @@ var stockCommand = defineCommand137({
|
|
|
31998
32342
|
});
|
|
31999
32343
|
|
|
32000
32344
|
// src/lib/tags-command.ts
|
|
32001
|
-
import { defineCommand as
|
|
32345
|
+
import { defineCommand as defineCommand141 } from "citty";
|
|
32002
32346
|
function makeTagsCommand(command, label, endpoint) {
|
|
32003
32347
|
registerSchema({
|
|
32004
32348
|
command: `${command}.tags`,
|
|
@@ -32007,7 +32351,7 @@ function makeTagsCommand(command, label, endpoint) {
|
|
|
32007
32351
|
output: { type: "string", description: "Output format: md|json", required: false, default: "md" }
|
|
32008
32352
|
}
|
|
32009
32353
|
});
|
|
32010
|
-
return
|
|
32354
|
+
return defineCommand141({
|
|
32011
32355
|
meta: {
|
|
32012
32356
|
name: "tags",
|
|
32013
32357
|
description: `List the available ${label} tag names (defaults + company custom tags). Use before filtering with --tags. Example: baker ${command} tags`
|
|
@@ -32043,7 +32387,7 @@ function makeTagsCommand(command, label, endpoint) {
|
|
|
32043
32387
|
var tagsCommand2 = makeTagsCommand("images", "image", "/api/images/tags");
|
|
32044
32388
|
|
|
32045
32389
|
// src/commands/images/upload.ts
|
|
32046
|
-
import { defineCommand as
|
|
32390
|
+
import { defineCommand as defineCommand142 } from "citty";
|
|
32047
32391
|
registerSchema({
|
|
32048
32392
|
command: "images.upload",
|
|
32049
32393
|
description: "Upload an image to the library \u2014 local file path or remote http(s) URL.",
|
|
@@ -32081,7 +32425,7 @@ registerSchema({
|
|
|
32081
32425
|
function isRemoteUrl2(value) {
|
|
32082
32426
|
return /^https?:\/\//i.test(value);
|
|
32083
32427
|
}
|
|
32084
|
-
var uploadCommand =
|
|
32428
|
+
var uploadCommand = defineCommand142({
|
|
32085
32429
|
meta: {
|
|
32086
32430
|
name: "upload",
|
|
32087
32431
|
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'"
|
|
@@ -32174,7 +32518,7 @@ async function uploadLocal(target, args) {
|
|
|
32174
32518
|
}
|
|
32175
32519
|
|
|
32176
32520
|
// src/commands/images/upscale.ts
|
|
32177
|
-
import { defineCommand as
|
|
32521
|
+
import { defineCommand as defineCommand143 } from "citty";
|
|
32178
32522
|
registerSchema({
|
|
32179
32523
|
command: "images.upscale",
|
|
32180
32524
|
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).",
|
|
@@ -32189,7 +32533,7 @@ registerSchema({
|
|
|
32189
32533
|
}
|
|
32190
32534
|
});
|
|
32191
32535
|
var POLL_INTERVAL_MS4 = 1500;
|
|
32192
|
-
var upscaleCommand =
|
|
32536
|
+
var upscaleCommand = defineCommand143({
|
|
32193
32537
|
meta: {
|
|
32194
32538
|
name: "upscale",
|
|
32195
32539
|
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"
|
|
@@ -32244,7 +32588,7 @@ var upscaleCommand = defineCommand140({
|
|
|
32244
32588
|
});
|
|
32245
32589
|
|
|
32246
32590
|
// src/commands/images/use.ts
|
|
32247
|
-
import { defineCommand as
|
|
32591
|
+
import { defineCommand as defineCommand144 } from "citty";
|
|
32248
32592
|
registerSchema({
|
|
32249
32593
|
command: "images.use",
|
|
32250
32594
|
description: "Ingest a URL and wait for the library record to be ready.",
|
|
@@ -32260,7 +32604,7 @@ registerSchema({
|
|
|
32260
32604
|
}
|
|
32261
32605
|
});
|
|
32262
32606
|
var POLL_INTERVAL_MS5 = 1500;
|
|
32263
|
-
var useCommand =
|
|
32607
|
+
var useCommand = defineCommand144({
|
|
32264
32608
|
meta: {
|
|
32265
32609
|
name: "use",
|
|
32266
32610
|
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"
|
|
@@ -32306,7 +32650,7 @@ var useCommand = defineCommand141({
|
|
|
32306
32650
|
});
|
|
32307
32651
|
|
|
32308
32652
|
// src/commands/images/index.ts
|
|
32309
|
-
var imagesCommand =
|
|
32653
|
+
var imagesCommand = defineCommand145({
|
|
32310
32654
|
meta: {
|
|
32311
32655
|
name: "images",
|
|
32312
32656
|
description: `Find, source, and normalize images. Subcommands route by provider so cost + license are explicit.
|
|
@@ -32382,12 +32726,12 @@ Full guide: __tooling__/docs/tools/baker/images.md`
|
|
|
32382
32726
|
});
|
|
32383
32727
|
|
|
32384
32728
|
// src/commands/landing/index.ts
|
|
32385
|
-
import { defineCommand as
|
|
32729
|
+
import { defineCommand as defineCommand155 } from "citty";
|
|
32386
32730
|
|
|
32387
32731
|
// src/commands/landing/critique.ts
|
|
32388
32732
|
import { readdir as readdir8, stat as stat6 } from "fs/promises";
|
|
32389
32733
|
import path28 from "path";
|
|
32390
|
-
import { defineCommand as
|
|
32734
|
+
import { defineCommand as defineCommand146 } from "citty";
|
|
32391
32735
|
|
|
32392
32736
|
// src/engine/landing/lib/brand-tokens.ts
|
|
32393
32737
|
import { readFile as readFile20 } from "fs/promises";
|
|
@@ -33782,7 +34126,7 @@ function fail5(code, message, fix) {
|
|
|
33782
34126
|
);
|
|
33783
34127
|
process.exit(2);
|
|
33784
34128
|
}
|
|
33785
|
-
var critiqueCommand2 =
|
|
34129
|
+
var critiqueCommand2 = defineCommand146({
|
|
33786
34130
|
meta: {
|
|
33787
34131
|
name: "critique",
|
|
33788
34132
|
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."
|
|
@@ -33891,10 +34235,10 @@ async function isDir(p) {
|
|
|
33891
34235
|
}
|
|
33892
34236
|
|
|
33893
34237
|
// src/commands/landing/inspiration/index.ts
|
|
33894
|
-
import { defineCommand as
|
|
34238
|
+
import { defineCommand as defineCommand154 } from "citty";
|
|
33895
34239
|
|
|
33896
34240
|
// src/commands/landing/inspiration/add.ts
|
|
33897
|
-
import { defineCommand as
|
|
34241
|
+
import { defineCommand as defineCommand147 } from "citty";
|
|
33898
34242
|
|
|
33899
34243
|
// src/commands/landing/inspiration/shared.ts
|
|
33900
34244
|
var INSPIRATION_HINTS = {
|
|
@@ -33940,7 +34284,7 @@ registerSchema({
|
|
|
33940
34284
|
note: { type: "string", description: "Why this page is worth keeping", required: false }
|
|
33941
34285
|
}
|
|
33942
34286
|
});
|
|
33943
|
-
var addCommand =
|
|
34287
|
+
var addCommand = defineCommand147({
|
|
33944
34288
|
meta: {
|
|
33945
34289
|
name: "add",
|
|
33946
34290
|
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'"
|
|
@@ -33978,7 +34322,7 @@ var addCommand = defineCommand144({
|
|
|
33978
34322
|
// src/commands/landing/inspiration/code.ts
|
|
33979
34323
|
import { mkdir as mkdir10, writeFile as writeFile13 } from "fs/promises";
|
|
33980
34324
|
import path29 from "path";
|
|
33981
|
-
import { defineCommand as
|
|
34325
|
+
import { defineCommand as defineCommand148 } from "citty";
|
|
33982
34326
|
registerSchema({
|
|
33983
34327
|
command: "landing.inspiration.code",
|
|
33984
34328
|
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.",
|
|
@@ -33987,7 +34331,7 @@ registerSchema({
|
|
|
33987
34331
|
full: { type: "boolean", description: "Print the markup inline as well as writing it", required: false }
|
|
33988
34332
|
}
|
|
33989
34333
|
});
|
|
33990
|
-
var codeCommand =
|
|
34334
|
+
var codeCommand = defineCommand148({
|
|
33991
34335
|
meta: {
|
|
33992
34336
|
name: "code",
|
|
33993
34337
|
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."
|
|
@@ -34044,7 +34388,7 @@ var codeCommand = defineCommand145({
|
|
|
34044
34388
|
});
|
|
34045
34389
|
|
|
34046
34390
|
// src/commands/landing/inspiration/favorites.ts
|
|
34047
|
-
import { defineCommand as
|
|
34391
|
+
import { defineCommand as defineCommand149 } from "citty";
|
|
34048
34392
|
registerSchema({
|
|
34049
34393
|
command: "landing.inspiration.favorites",
|
|
34050
34394
|
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.",
|
|
@@ -34058,7 +34402,7 @@ registerSchema({
|
|
|
34058
34402
|
}
|
|
34059
34403
|
}
|
|
34060
34404
|
});
|
|
34061
|
-
var favoritesCommand =
|
|
34405
|
+
var favoritesCommand = defineCommand149({
|
|
34062
34406
|
meta: {
|
|
34063
34407
|
name: "favorites",
|
|
34064
34408
|
description: "List this company's saved reference sections. Example: baker landing inspiration favorites --type hero,pricing"
|
|
@@ -34118,7 +34462,7 @@ registerSchema({
|
|
|
34118
34462
|
note: { type: "string", description: "Why this is worth keeping", required: false }
|
|
34119
34463
|
}
|
|
34120
34464
|
});
|
|
34121
|
-
var favoriteCommand =
|
|
34465
|
+
var favoriteCommand = defineCommand149({
|
|
34122
34466
|
meta: {
|
|
34123
34467
|
name: "favorite",
|
|
34124
34468
|
description: "Save a reference section to this company. Example: baker landing inspiration favorite k57abc\u2026"
|
|
@@ -34156,7 +34500,7 @@ registerSchema({
|
|
|
34156
34500
|
page: { type: "boolean", description: "Treat the id as a page rather than a section", required: false }
|
|
34157
34501
|
}
|
|
34158
34502
|
});
|
|
34159
|
-
var unfavoriteCommand =
|
|
34503
|
+
var unfavoriteCommand = defineCommand149({
|
|
34160
34504
|
meta: {
|
|
34161
34505
|
name: "unfavorite",
|
|
34162
34506
|
description: "Remove a reference section from this company's saved set. Example: baker landing inspiration unfavorite k57abc\u2026"
|
|
@@ -34178,7 +34522,7 @@ var unfavoriteCommand = defineCommand146({
|
|
|
34178
34522
|
});
|
|
34179
34523
|
|
|
34180
34524
|
// src/commands/landing/inspiration/page.ts
|
|
34181
|
-
import { defineCommand as
|
|
34525
|
+
import { defineCommand as defineCommand150 } from "citty";
|
|
34182
34526
|
registerSchema({
|
|
34183
34527
|
command: "landing.inspiration.page",
|
|
34184
34528
|
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.",
|
|
@@ -34195,7 +34539,7 @@ registerSchema({
|
|
|
34195
34539
|
}
|
|
34196
34540
|
}
|
|
34197
34541
|
});
|
|
34198
|
-
var pageCommand =
|
|
34542
|
+
var pageCommand = defineCommand150({
|
|
34199
34543
|
meta: {
|
|
34200
34544
|
name: "page",
|
|
34201
34545
|
description: "Show how a reference page sequences its sections. Example: baker landing inspiration page j91xyz\u2026 \u2014 the blueprint, not the pixels."
|
|
@@ -34260,7 +34604,7 @@ var pageCommand = defineCommand147({
|
|
|
34260
34604
|
// src/commands/landing/inspiration/scrape.ts
|
|
34261
34605
|
import { readFile as readFile23 } from "fs/promises";
|
|
34262
34606
|
import path32 from "path";
|
|
34263
|
-
import { defineCommand as
|
|
34607
|
+
import { defineCommand as defineCommand151 } from "citty";
|
|
34264
34608
|
|
|
34265
34609
|
// src/engine/landing/lib/capturedReferences.ts
|
|
34266
34610
|
var MAX_STRINGS_PER_SECTION = 40;
|
|
@@ -36055,7 +36399,7 @@ registerSchema({
|
|
|
36055
36399
|
report: { type: "boolean", description: "Write report.html. `--no-report` to skip", required: false }
|
|
36056
36400
|
}
|
|
36057
36401
|
});
|
|
36058
|
-
var scrapeCommand =
|
|
36402
|
+
var scrapeCommand = defineCommand151({
|
|
36059
36403
|
meta: {
|
|
36060
36404
|
name: "scrape",
|
|
36061
36405
|
description: "Capture a landing page to a directory, now. Example: baker landing inspiration scrape https://linear.app --out .baker/inspiration/linear.app"
|
|
@@ -36134,7 +36478,7 @@ var scrapeCommand = defineCommand148({
|
|
|
36134
36478
|
// src/commands/landing/inspiration/search.ts
|
|
36135
36479
|
import { mkdir as mkdir12, writeFile as writeFile16 } from "fs/promises";
|
|
36136
36480
|
import path33 from "path";
|
|
36137
|
-
import { defineCommand as
|
|
36481
|
+
import { defineCommand as defineCommand152 } from "citty";
|
|
36138
36482
|
registerSchema({
|
|
36139
36483
|
command: "landing.inspiration.search",
|
|
36140
36484
|
description: "Search the shared library of real landing-page sections for reference before you design. Start here: baker landing inspiration search 'pricing with a monthly/annual toggle'. Returns the idea behind each section plus a downloaded screenshot you can Read. Defaults to this company's saved sections; pass --scope all for the whole library.",
|
|
@@ -36238,7 +36582,7 @@ async function downloadShots(results) {
|
|
|
36238
36582
|
);
|
|
36239
36583
|
return saved;
|
|
36240
36584
|
}
|
|
36241
|
-
var searchCommand2 =
|
|
36585
|
+
var searchCommand2 = defineCommand152({
|
|
36242
36586
|
meta: {
|
|
36243
36587
|
name: "search",
|
|
36244
36588
|
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"
|
|
@@ -36326,7 +36670,7 @@ var searchCommand2 = defineCommand149({
|
|
|
36326
36670
|
// src/commands/landing/inspiration/view.ts
|
|
36327
36671
|
import { mkdir as mkdir13, writeFile as writeFile17 } from "fs/promises";
|
|
36328
36672
|
import path34 from "path";
|
|
36329
|
-
import { defineCommand as
|
|
36673
|
+
import { defineCommand as defineCommand153 } from "citty";
|
|
36330
36674
|
registerSchema({
|
|
36331
36675
|
command: "landing.inspiration.view",
|
|
36332
36676
|
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.",
|
|
@@ -36351,7 +36695,7 @@ async function download(url, file) {
|
|
|
36351
36695
|
return null;
|
|
36352
36696
|
}
|
|
36353
36697
|
}
|
|
36354
|
-
var viewCommand2 =
|
|
36698
|
+
var viewCommand2 = defineCommand153({
|
|
36355
36699
|
meta: {
|
|
36356
36700
|
name: "view",
|
|
36357
36701
|
description: "Full detail for one reference section. Example: baker landing inspiration view k57abc\u2026 \u2014 read the screenshots it saves before you build."
|
|
@@ -36434,7 +36778,7 @@ var viewCommand2 = defineCommand150({
|
|
|
36434
36778
|
});
|
|
36435
36779
|
|
|
36436
36780
|
// src/commands/landing/inspiration/index.ts
|
|
36437
|
-
var inspirationCommand =
|
|
36781
|
+
var inspirationCommand = defineCommand154({
|
|
36438
36782
|
meta: {
|
|
36439
36783
|
name: "inspiration",
|
|
36440
36784
|
description: `Reference library of real landing-page sections \u2014 look at how good pages actually solve a problem before you design one.
|
|
@@ -36476,7 +36820,7 @@ Full guide: __tooling__/docs/tools/baker/landing.md`
|
|
|
36476
36820
|
});
|
|
36477
36821
|
|
|
36478
36822
|
// src/commands/landing/index.ts
|
|
36479
|
-
var landingCommand =
|
|
36823
|
+
var landingCommand = defineCommand155({
|
|
36480
36824
|
meta: {
|
|
36481
36825
|
name: "landing",
|
|
36482
36826
|
description: `Design-quality tools for landing pages (src/pages/<slug>/).
|
|
@@ -36494,7 +36838,7 @@ Subcommands:
|
|
|
36494
36838
|
});
|
|
36495
36839
|
|
|
36496
36840
|
// src/commands/mcp/index.ts
|
|
36497
|
-
import { defineCommand as
|
|
36841
|
+
import { defineCommand as defineCommand156 } from "citty";
|
|
36498
36842
|
|
|
36499
36843
|
// src/commands/mcp/platforms.ts
|
|
36500
36844
|
function readsKey(label) {
|
|
@@ -36563,7 +36907,7 @@ registerSchema({
|
|
|
36563
36907
|
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.",
|
|
36564
36908
|
args: {}
|
|
36565
36909
|
});
|
|
36566
|
-
var connectedCommand =
|
|
36910
|
+
var connectedCommand = defineCommand156({
|
|
36567
36911
|
meta: {
|
|
36568
36912
|
name: "connected",
|
|
36569
36913
|
description: `Everything this chat can reach \u2014 managed integrations, custom MCP servers, and connected platforms.
|
|
@@ -36622,7 +36966,7 @@ registerSchema({
|
|
|
36622
36966
|
description: "List the custom MCP servers this company's chats see (org + company + your own user scope).",
|
|
36623
36967
|
args: {}
|
|
36624
36968
|
});
|
|
36625
|
-
var
|
|
36969
|
+
var listCommand14 = defineCommand156({
|
|
36626
36970
|
meta: { name: "list", description: "List custom MCP servers visible to this company's chats." },
|
|
36627
36971
|
run: async () => {
|
|
36628
36972
|
try {
|
|
@@ -36659,7 +37003,7 @@ registerSchema({
|
|
|
36659
37003
|
header: { type: "string", description: 'Auth header "Key: Value" (repeatable)', required: false }
|
|
36660
37004
|
}
|
|
36661
37005
|
});
|
|
36662
|
-
var addCommand2 =
|
|
37006
|
+
var addCommand2 = defineCommand156({
|
|
36663
37007
|
meta: {
|
|
36664
37008
|
name: "add",
|
|
36665
37009
|
description: `Register a custom MCP server. Tools appear as mcp__<name>__* on the NEXT message.
|
|
@@ -36711,7 +37055,7 @@ registerSchema({
|
|
|
36711
37055
|
description: "Remove a company custom MCP server by name.",
|
|
36712
37056
|
args: { name: { type: "string", description: "Server name to remove", required: true } }
|
|
36713
37057
|
});
|
|
36714
|
-
var removeCommand4 =
|
|
37058
|
+
var removeCommand4 = defineCommand156({
|
|
36715
37059
|
meta: {
|
|
36716
37060
|
name: "remove",
|
|
36717
37061
|
description: `Remove a company custom MCP server by name.
|
|
@@ -36733,7 +37077,7 @@ Example:
|
|
|
36733
37077
|
}
|
|
36734
37078
|
}
|
|
36735
37079
|
});
|
|
36736
|
-
var mcpCommand =
|
|
37080
|
+
var mcpCommand = defineCommand156({
|
|
36737
37081
|
meta: {
|
|
36738
37082
|
name: "mcp",
|
|
36739
37083
|
description: `Third-party tools for this company \u2014 see what's connected, register custom HTTPS MCP endpoints.
|
|
@@ -36752,17 +37096,17 @@ Full guide: __tooling__/docs/tools/baker/mcp.md`
|
|
|
36752
37096
|
},
|
|
36753
37097
|
subCommands: {
|
|
36754
37098
|
connected: connectedCommand,
|
|
36755
|
-
list:
|
|
37099
|
+
list: listCommand14,
|
|
36756
37100
|
add: addCommand2,
|
|
36757
37101
|
remove: removeCommand4
|
|
36758
37102
|
}
|
|
36759
37103
|
});
|
|
36760
37104
|
|
|
36761
37105
|
// src/commands/research/index.ts
|
|
36762
|
-
import { defineCommand as
|
|
37106
|
+
import { defineCommand as defineCommand167 } from "citty";
|
|
36763
37107
|
|
|
36764
37108
|
// src/commands/research/advertisers.ts
|
|
36765
|
-
import { defineCommand as
|
|
37109
|
+
import { defineCommand as defineCommand157 } from "citty";
|
|
36766
37110
|
|
|
36767
37111
|
// src/commands/research/output.ts
|
|
36768
37112
|
var RESEARCH_DATA_NOTE = "Estimates based on third-party SERP data \u2014 not exact figures. Use for directional insights, not precise measurement.";
|
|
@@ -36875,7 +37219,7 @@ var FIELDS3 = {
|
|
|
36875
37219
|
etv: "Estimated traffic value (USD)",
|
|
36876
37220
|
visibility: "SERP visibility score (0-1)"
|
|
36877
37221
|
};
|
|
36878
|
-
var advertisersCommand =
|
|
37222
|
+
var advertisersCommand = defineCommand157({
|
|
36879
37223
|
meta: {
|
|
36880
37224
|
name: "advertisers",
|
|
36881
37225
|
description: `Find domains competing for a keyword in Google SERPs.
|
|
@@ -36922,7 +37266,7 @@ Examples:
|
|
|
36922
37266
|
});
|
|
36923
37267
|
|
|
36924
37268
|
// src/commands/research/autocomplete.ts
|
|
36925
|
-
import { defineCommand as
|
|
37269
|
+
import { defineCommand as defineCommand158 } from "citty";
|
|
36926
37270
|
registerSchema({
|
|
36927
37271
|
command: "research.autocomplete",
|
|
36928
37272
|
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).",
|
|
@@ -36945,7 +37289,7 @@ registerSchema({
|
|
|
36945
37289
|
var FIELDS4 = {
|
|
36946
37290
|
suggestion: "Autocomplete suggestion from Google"
|
|
36947
37291
|
};
|
|
36948
|
-
var autocompleteCommand =
|
|
37292
|
+
var autocompleteCommand = defineCommand158({
|
|
36949
37293
|
meta: {
|
|
36950
37294
|
name: "autocomplete",
|
|
36951
37295
|
description: `Get Google Autocomplete suggestions for keyword expansion.
|
|
@@ -36991,7 +37335,7 @@ Examples:
|
|
|
36991
37335
|
});
|
|
36992
37336
|
|
|
36993
37337
|
// src/commands/research/countries.ts
|
|
36994
|
-
import { defineCommand as
|
|
37338
|
+
import { defineCommand as defineCommand159 } from "citty";
|
|
36995
37339
|
registerSchema({
|
|
36996
37340
|
command: "research.countries",
|
|
36997
37341
|
description: "List all supported country codes for --location flag in research commands.",
|
|
@@ -37048,7 +37392,7 @@ var FIELDS5 = {
|
|
|
37048
37392
|
code: "Country code to pass as --location",
|
|
37049
37393
|
name: "Country name"
|
|
37050
37394
|
};
|
|
37051
|
-
var countriesCommand =
|
|
37395
|
+
var countriesCommand = defineCommand159({
|
|
37052
37396
|
meta: {
|
|
37053
37397
|
name: "countries",
|
|
37054
37398
|
description: "List all supported country codes for --location flag."
|
|
@@ -37059,7 +37403,7 @@ var countriesCommand = defineCommand156({
|
|
|
37059
37403
|
});
|
|
37060
37404
|
|
|
37061
37405
|
// src/commands/research/intent.ts
|
|
37062
|
-
import { defineCommand as
|
|
37406
|
+
import { defineCommand as defineCommand160 } from "citty";
|
|
37063
37407
|
registerSchema({
|
|
37064
37408
|
command: "research.intent",
|
|
37065
37409
|
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.",
|
|
@@ -37082,7 +37426,7 @@ var FIELDS6 = {
|
|
|
37082
37426
|
intent: "Primary Google Search intent: informational, navigational, commercial, transactional",
|
|
37083
37427
|
probability: "Confidence score 0.0-1.0"
|
|
37084
37428
|
};
|
|
37085
|
-
var intentCommand =
|
|
37429
|
+
var intentCommand = defineCommand160({
|
|
37086
37430
|
meta: {
|
|
37087
37431
|
name: "intent",
|
|
37088
37432
|
description: `Classify Google Search intent for keywords. Returns intent type and confidence.
|
|
@@ -37130,7 +37474,7 @@ Examples:
|
|
|
37130
37474
|
});
|
|
37131
37475
|
|
|
37132
37476
|
// src/commands/research/keyword-gap.ts
|
|
37133
|
-
import { defineCommand as
|
|
37477
|
+
import { defineCommand as defineCommand161 } from "citty";
|
|
37134
37478
|
registerSchema({
|
|
37135
37479
|
command: "research.keyword-gap",
|
|
37136
37480
|
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.",
|
|
@@ -37159,7 +37503,7 @@ var FIELDS7 = {
|
|
|
37159
37503
|
cpc: "Cost per click USD",
|
|
37160
37504
|
their_position: "Competitor's ranking position"
|
|
37161
37505
|
};
|
|
37162
|
-
var keywordGapCommand =
|
|
37506
|
+
var keywordGapCommand = defineCommand161({
|
|
37163
37507
|
meta: {
|
|
37164
37508
|
name: "keyword-gap",
|
|
37165
37509
|
description: `Find keywords a competitor has that you don't. Supports pagination via --offset.
|
|
@@ -37233,7 +37577,7 @@ Examples:
|
|
|
37233
37577
|
});
|
|
37234
37578
|
|
|
37235
37579
|
// src/commands/research/keywords-for-site.ts
|
|
37236
|
-
import { defineCommand as
|
|
37580
|
+
import { defineCommand as defineCommand162 } from "citty";
|
|
37237
37581
|
registerSchema({
|
|
37238
37582
|
command: "research.keywords-for-site",
|
|
37239
37583
|
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.",
|
|
@@ -37266,7 +37610,7 @@ var FIELDS8 = {
|
|
|
37266
37610
|
competition: "LOW, MEDIUM, or HIGH",
|
|
37267
37611
|
competition_index: "Competition score 0-100"
|
|
37268
37612
|
};
|
|
37269
|
-
var keywordsForSiteCommand =
|
|
37613
|
+
var keywordsForSiteCommand = defineCommand162({
|
|
37270
37614
|
meta: {
|
|
37271
37615
|
name: "keywords-for-site",
|
|
37272
37616
|
description: `Get keywords a competitor targets in Google. Use --type to filter paid/organic.
|
|
@@ -37319,7 +37663,7 @@ Examples:
|
|
|
37319
37663
|
});
|
|
37320
37664
|
|
|
37321
37665
|
// src/commands/research/languages.ts
|
|
37322
|
-
import { defineCommand as
|
|
37666
|
+
import { defineCommand as defineCommand163 } from "citty";
|
|
37323
37667
|
registerSchema({
|
|
37324
37668
|
command: "research.languages",
|
|
37325
37669
|
description: "List all supported language codes for --language flag in research commands.",
|
|
@@ -37349,7 +37693,7 @@ var FIELDS9 = {
|
|
|
37349
37693
|
code: "Language code to pass as --language",
|
|
37350
37694
|
name: "Language name (also accepted by --language)"
|
|
37351
37695
|
};
|
|
37352
|
-
var languagesCommand2 =
|
|
37696
|
+
var languagesCommand2 = defineCommand163({
|
|
37353
37697
|
meta: {
|
|
37354
37698
|
name: "languages",
|
|
37355
37699
|
description: "List all supported language codes for --language flag."
|
|
@@ -37360,7 +37704,7 @@ var languagesCommand2 = defineCommand160({
|
|
|
37360
37704
|
});
|
|
37361
37705
|
|
|
37362
37706
|
// src/commands/research/lighthouse.ts
|
|
37363
|
-
import { defineCommand as
|
|
37707
|
+
import { defineCommand as defineCommand164 } from "citty";
|
|
37364
37708
|
registerSchema({
|
|
37365
37709
|
command: "research.lighthouse",
|
|
37366
37710
|
description: "Landing page performance audit. Returns metrics that affect Google Ads Quality Score and CPC.",
|
|
@@ -37379,7 +37723,7 @@ var FIELDS10 = {
|
|
|
37379
37723
|
speed_index_ms: "Speed Index in ms (good: < 3400)",
|
|
37380
37724
|
interactive_ms: "Time to Interactive in ms (good: < 3800)"
|
|
37381
37725
|
};
|
|
37382
|
-
var lighthouseCommand =
|
|
37726
|
+
var lighthouseCommand = defineCommand164({
|
|
37383
37727
|
meta: {
|
|
37384
37728
|
name: "lighthouse",
|
|
37385
37729
|
description: `Landing page performance audit. Metrics affecting Google Ads Quality Score.
|
|
@@ -37417,7 +37761,7 @@ Examples:
|
|
|
37417
37761
|
});
|
|
37418
37762
|
|
|
37419
37763
|
// src/commands/research/relevant-pages.ts
|
|
37420
|
-
import { defineCommand as
|
|
37764
|
+
import { defineCommand as defineCommand165 } from "citty";
|
|
37421
37765
|
registerSchema({
|
|
37422
37766
|
command: "research.relevant-pages",
|
|
37423
37767
|
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).",
|
|
@@ -37443,7 +37787,7 @@ var FIELDS11 = {
|
|
|
37443
37787
|
keywords: "Total organic keywords the page ranks for",
|
|
37444
37788
|
top_10: "Keywords in positions 1-10"
|
|
37445
37789
|
};
|
|
37446
|
-
var relevantPagesCommand =
|
|
37790
|
+
var relevantPagesCommand = defineCommand165({
|
|
37447
37791
|
meta: {
|
|
37448
37792
|
name: "relevant-pages",
|
|
37449
37793
|
description: `Get the top pages of a competitor domain with traffic data.
|
|
@@ -37489,7 +37833,7 @@ Examples:
|
|
|
37489
37833
|
});
|
|
37490
37834
|
|
|
37491
37835
|
// src/commands/research/web.ts
|
|
37492
|
-
import { defineCommand as
|
|
37836
|
+
import { defineCommand as defineCommand166 } from "citty";
|
|
37493
37837
|
registerSchema({
|
|
37494
37838
|
command: "research.web",
|
|
37495
37839
|
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).",
|
|
@@ -37540,7 +37884,7 @@ async function runDeepResearch(question) {
|
|
|
37540
37884
|
}
|
|
37541
37885
|
throw new Error("Deep research timed out");
|
|
37542
37886
|
}
|
|
37543
|
-
var webCommand =
|
|
37887
|
+
var webCommand = defineCommand166({
|
|
37544
37888
|
meta: {
|
|
37545
37889
|
name: "web",
|
|
37546
37890
|
description: `Search the web with AI to answer any open-ended marketing question. Uses live internet data via Google Search.
|
|
@@ -37600,7 +37944,7 @@ Examples:
|
|
|
37600
37944
|
});
|
|
37601
37945
|
|
|
37602
37946
|
// src/commands/research/index.ts
|
|
37603
|
-
var researchCommand =
|
|
37947
|
+
var researchCommand = defineCommand167({
|
|
37604
37948
|
meta: {
|
|
37605
37949
|
name: "research",
|
|
37606
37950
|
description: `Competitive intelligence and AI-powered research commands.
|
|
@@ -37641,10 +37985,10 @@ Full guide: __tooling__/docs/tools/baker/research.md`
|
|
|
37641
37985
|
});
|
|
37642
37986
|
|
|
37643
37987
|
// src/commands/scheduled-actions/index.ts
|
|
37644
|
-
import { defineCommand as
|
|
37988
|
+
import { defineCommand as defineCommand174 } from "citty";
|
|
37645
37989
|
|
|
37646
37990
|
// src/commands/scheduled-actions/create.ts
|
|
37647
|
-
import { defineCommand as
|
|
37991
|
+
import { defineCommand as defineCommand168 } from "citty";
|
|
37648
37992
|
|
|
37649
37993
|
// src/commands/scheduled-actions/shared.ts
|
|
37650
37994
|
var TEMP_SCHEDULED_ACTION_PREFIX = "temp_sched_";
|
|
@@ -37652,11 +37996,11 @@ var TEMP_ID_PREFIX = "temp_";
|
|
|
37652
37996
|
function writeOk2(data) {
|
|
37653
37997
|
writeJson({ ok: true, data: data ?? null });
|
|
37654
37998
|
}
|
|
37655
|
-
function
|
|
37999
|
+
function failValidation4(message) {
|
|
37656
38000
|
writeJson({ ok: false, error: { code: "VALIDATION_ERROR", message } });
|
|
37657
38001
|
process.exit(1);
|
|
37658
38002
|
}
|
|
37659
|
-
function
|
|
38003
|
+
function failApi3(err) {
|
|
37660
38004
|
if (err instanceof ApiError) {
|
|
37661
38005
|
writeJson({ ok: false, error: { code: err.code, message: err.message } });
|
|
37662
38006
|
process.exit(1);
|
|
@@ -37676,7 +38020,7 @@ function isOtherTempId(id) {
|
|
|
37676
38020
|
}
|
|
37677
38021
|
function validateScheduledActionRef(ref) {
|
|
37678
38022
|
if (isOtherTempId(ref)) {
|
|
37679
|
-
|
|
38023
|
+
failValidation4(`Scheduled action temp IDs must start with ${TEMP_SCHEDULED_ACTION_PREFIX}.`);
|
|
37680
38024
|
}
|
|
37681
38025
|
if (!isTempScheduledActionId(ref)) {
|
|
37682
38026
|
validateConvexId(ref);
|
|
@@ -37690,7 +38034,7 @@ function isPromptWithoutAgent(args, agentDisabled) {
|
|
|
37690
38034
|
}
|
|
37691
38035
|
function failIfPromptWithoutAgent(args, agentDisabled) {
|
|
37692
38036
|
if (isPromptWithoutAgent(args, agentDisabled)) {
|
|
37693
|
-
|
|
38037
|
+
failValidation4(
|
|
37694
38038
|
"--prompt only applies when an agent is spawned; it has no effect with --no-spawn-agent or --spawn-agent false."
|
|
37695
38039
|
);
|
|
37696
38040
|
}
|
|
@@ -37705,21 +38049,21 @@ function parseBooleanFlag(raw, flagName) {
|
|
|
37705
38049
|
if (raw === false || raw === "false") {
|
|
37706
38050
|
return false;
|
|
37707
38051
|
}
|
|
37708
|
-
|
|
38052
|
+
failValidation4(`${flagName} must be true or false.`);
|
|
37709
38053
|
}
|
|
37710
38054
|
function buildScheduleBody(args, options) {
|
|
37711
38055
|
const cron = args.cron;
|
|
37712
38056
|
const runAt = args["run-at"];
|
|
37713
38057
|
const timezone = args.timezone;
|
|
37714
38058
|
if (cron && runAt) {
|
|
37715
|
-
|
|
38059
|
+
failValidation4("--cron and --run-at are mutually exclusive.");
|
|
37716
38060
|
}
|
|
37717
38061
|
if (runAt) {
|
|
37718
38062
|
if (!runAt.endsWith("Z")) {
|
|
37719
|
-
|
|
38063
|
+
failValidation4("--run-at must be an ISO UTC timestamp ending in Z.");
|
|
37720
38064
|
}
|
|
37721
38065
|
if (!Number.isFinite(Date.parse(runAt))) {
|
|
37722
|
-
|
|
38066
|
+
failValidation4("--run-at must be a valid ISO timestamp.");
|
|
37723
38067
|
}
|
|
37724
38068
|
return { runAt, ...timezone ? { timezone } : {} };
|
|
37725
38069
|
}
|
|
@@ -37730,7 +38074,7 @@ function buildScheduleBody(args, options) {
|
|
|
37730
38074
|
return { timezone };
|
|
37731
38075
|
}
|
|
37732
38076
|
if (options.required) {
|
|
37733
|
-
|
|
38077
|
+
failValidation4("Provide exactly one of --cron or --run-at.");
|
|
37734
38078
|
}
|
|
37735
38079
|
return void 0;
|
|
37736
38080
|
}
|
|
@@ -37759,7 +38103,7 @@ registerSchema({
|
|
|
37759
38103
|
prompt: { type: "string", description: "Additional prompt instructions for the spawned agent", required: false }
|
|
37760
38104
|
}
|
|
37761
38105
|
});
|
|
37762
|
-
var createCommand2 =
|
|
38106
|
+
var createCommand2 = defineCommand168({
|
|
37763
38107
|
meta: {
|
|
37764
38108
|
name: "create",
|
|
37765
38109
|
description: 'Stage a scheduled action. Example: baker scheduled-actions create --name "Weekly report" --description "..." --cron "0 9 * * MON"'
|
|
@@ -37779,10 +38123,10 @@ var createCommand2 = defineCommand165({
|
|
|
37779
38123
|
const name = args.name;
|
|
37780
38124
|
const description = args.description;
|
|
37781
38125
|
if (!name || name.trim().length === 0) {
|
|
37782
|
-
|
|
38126
|
+
failValidation4("--name is required.");
|
|
37783
38127
|
}
|
|
37784
38128
|
if (!description || description.trim().length === 0) {
|
|
37785
|
-
|
|
38129
|
+
failValidation4("--description is required.");
|
|
37786
38130
|
}
|
|
37787
38131
|
const schedule = buildScheduleBody(args, { required: true });
|
|
37788
38132
|
const chatId = requireChatId();
|
|
@@ -37802,13 +38146,13 @@ var createCommand2 = defineCommand165({
|
|
|
37802
38146
|
const response = await apiPost("/api/scheduled-actions/create", body);
|
|
37803
38147
|
writeJson(response);
|
|
37804
38148
|
} catch (err) {
|
|
37805
|
-
|
|
38149
|
+
failApi3(err);
|
|
37806
38150
|
}
|
|
37807
38151
|
}
|
|
37808
38152
|
});
|
|
37809
38153
|
|
|
37810
38154
|
// src/commands/scheduled-actions/delete.ts
|
|
37811
|
-
import { defineCommand as
|
|
38155
|
+
import { defineCommand as defineCommand169 } from "citty";
|
|
37812
38156
|
registerSchema({
|
|
37813
38157
|
command: "scheduled-actions.delete",
|
|
37814
38158
|
description: "Stage deletion of a published scheduled action or cancellation of a temp_sched_* draft creation.",
|
|
@@ -37816,7 +38160,7 @@ registerSchema({
|
|
|
37816
38160
|
id: { type: "string", description: "Published scheduled action ID or temp_sched_* draft ID", required: true }
|
|
37817
38161
|
}
|
|
37818
38162
|
});
|
|
37819
|
-
var deleteCommand2 =
|
|
38163
|
+
var deleteCommand2 = defineCommand169({
|
|
37820
38164
|
meta: {
|
|
37821
38165
|
name: "delete",
|
|
37822
38166
|
description: "Stage scheduled action deletion. Example: baker scheduled-actions delete <id-or-temp_sched_id>"
|
|
@@ -37833,19 +38177,19 @@ var deleteCommand2 = defineCommand166({
|
|
|
37833
38177
|
try {
|
|
37834
38178
|
const id = args.id || args["scheduled-action-id"];
|
|
37835
38179
|
if (!id) {
|
|
37836
|
-
|
|
38180
|
+
failValidation4("Scheduled action ID is required.");
|
|
37837
38181
|
}
|
|
37838
38182
|
validateScheduledActionRef(id);
|
|
37839
38183
|
await apiPost("/api/scheduled-actions/delete", { chatId: requireChatId(), id });
|
|
37840
38184
|
writeOk2();
|
|
37841
38185
|
} catch (err) {
|
|
37842
|
-
|
|
38186
|
+
failApi3(err);
|
|
37843
38187
|
}
|
|
37844
38188
|
}
|
|
37845
38189
|
});
|
|
37846
38190
|
|
|
37847
38191
|
// src/commands/scheduled-actions/get.ts
|
|
37848
|
-
import { defineCommand as
|
|
38192
|
+
import { defineCommand as defineCommand170 } from "citty";
|
|
37849
38193
|
registerSchema({
|
|
37850
38194
|
command: "scheduled-actions.get",
|
|
37851
38195
|
description: "Get a published scheduled action or a temp_sched_* draft-created scheduled action.",
|
|
@@ -37854,7 +38198,7 @@ registerSchema({
|
|
|
37854
38198
|
chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
|
|
37855
38199
|
}
|
|
37856
38200
|
});
|
|
37857
|
-
var getCommand3 =
|
|
38201
|
+
var getCommand3 = defineCommand170({
|
|
37858
38202
|
meta: {
|
|
37859
38203
|
name: "get",
|
|
37860
38204
|
description: "Get a scheduled action. Example: baker scheduled-actions get <id-or-temp_sched_id>"
|
|
@@ -37872,13 +38216,13 @@ var getCommand3 = defineCommand167({
|
|
|
37872
38216
|
try {
|
|
37873
38217
|
const id = args.id || args["scheduled-action-id"];
|
|
37874
38218
|
if (!id) {
|
|
37875
|
-
|
|
38219
|
+
failValidation4("Scheduled action ID is required.");
|
|
37876
38220
|
}
|
|
37877
38221
|
validateScheduledActionRef(id);
|
|
37878
38222
|
const env = getEnv();
|
|
37879
38223
|
const chatId = typeof args.chat === "string" && args.chat.length > 0 ? args.chat : env.BAKER_CHAT_ID;
|
|
37880
38224
|
if (isTempScheduledActionId(id) && !chatId) {
|
|
37881
|
-
|
|
38225
|
+
failValidation4("BAKER_CHAT_ID or --chat is required to get a temp scheduled action ID.");
|
|
37882
38226
|
}
|
|
37883
38227
|
const body = { id };
|
|
37884
38228
|
if (chatId) {
|
|
@@ -37887,13 +38231,13 @@ var getCommand3 = defineCommand167({
|
|
|
37887
38231
|
const response = await apiPost("/api/scheduled-actions/get", body);
|
|
37888
38232
|
writeJson(response);
|
|
37889
38233
|
} catch (err) {
|
|
37890
|
-
|
|
38234
|
+
failApi3(err);
|
|
37891
38235
|
}
|
|
37892
38236
|
}
|
|
37893
38237
|
});
|
|
37894
38238
|
|
|
37895
38239
|
// src/commands/scheduled-actions/list.ts
|
|
37896
|
-
import { defineCommand as
|
|
38240
|
+
import { defineCommand as defineCommand171 } from "citty";
|
|
37897
38241
|
registerSchema({
|
|
37898
38242
|
command: "scheduled-actions.list",
|
|
37899
38243
|
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.",
|
|
@@ -37901,7 +38245,7 @@ registerSchema({
|
|
|
37901
38245
|
chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
|
|
37902
38246
|
}
|
|
37903
38247
|
});
|
|
37904
|
-
var
|
|
38248
|
+
var listCommand15 = defineCommand171({
|
|
37905
38249
|
meta: {
|
|
37906
38250
|
name: "list",
|
|
37907
38251
|
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."
|
|
@@ -37918,13 +38262,13 @@ var listCommand14 = defineCommand168({
|
|
|
37918
38262
|
const response = await apiPost("/api/scheduled-actions/list", body);
|
|
37919
38263
|
writeJson(response);
|
|
37920
38264
|
} catch (err) {
|
|
37921
|
-
|
|
38265
|
+
failApi3(err);
|
|
37922
38266
|
}
|
|
37923
38267
|
}
|
|
37924
38268
|
});
|
|
37925
38269
|
|
|
37926
38270
|
// src/commands/scheduled-actions/trigger.ts
|
|
37927
|
-
import { defineCommand as
|
|
38271
|
+
import { defineCommand as defineCommand172 } from "citty";
|
|
37928
38272
|
registerSchema({
|
|
37929
38273
|
command: "scheduled-actions.trigger",
|
|
37930
38274
|
description: "Immediately trigger a published scheduled action. Does not require BAKER_CHAT_ID and rejects temp_sched_* IDs.",
|
|
@@ -37932,7 +38276,7 @@ registerSchema({
|
|
|
37932
38276
|
id: { type: "string", description: "Published scheduled action ID", required: true }
|
|
37933
38277
|
}
|
|
37934
38278
|
});
|
|
37935
|
-
var triggerCommand =
|
|
38279
|
+
var triggerCommand = defineCommand172({
|
|
37936
38280
|
meta: {
|
|
37937
38281
|
name: "trigger",
|
|
37938
38282
|
description: "Immediately trigger a published scheduled action. Example: baker scheduled-actions trigger <id>"
|
|
@@ -37949,10 +38293,10 @@ var triggerCommand = defineCommand169({
|
|
|
37949
38293
|
try {
|
|
37950
38294
|
const id = args.id || args["scheduled-action-id"];
|
|
37951
38295
|
if (!id) {
|
|
37952
|
-
|
|
38296
|
+
failValidation4("Scheduled action ID is required.");
|
|
37953
38297
|
}
|
|
37954
38298
|
if (isTempScheduledActionId(id)) {
|
|
37955
|
-
|
|
38299
|
+
failValidation4("trigger requires a published scheduled action ID, not temp_sched_*.");
|
|
37956
38300
|
}
|
|
37957
38301
|
validateConvexId(id);
|
|
37958
38302
|
const env = getEnv();
|
|
@@ -37963,13 +38307,13 @@ var triggerCommand = defineCommand169({
|
|
|
37963
38307
|
const response = await apiPost("/api/scheduled-actions/trigger", body);
|
|
37964
38308
|
writeJson(response);
|
|
37965
38309
|
} catch (err) {
|
|
37966
|
-
|
|
38310
|
+
failApi3(err);
|
|
37967
38311
|
}
|
|
37968
38312
|
}
|
|
37969
38313
|
});
|
|
37970
38314
|
|
|
37971
38315
|
// src/commands/scheduled-actions/update.ts
|
|
37972
|
-
import { defineCommand as
|
|
38316
|
+
import { defineCommand as defineCommand173 } from "citty";
|
|
37973
38317
|
registerSchema({
|
|
37974
38318
|
command: "scheduled-actions.update",
|
|
37975
38319
|
description: "Stage an update to a published scheduled action or temp_sched_* draft-created scheduled action.",
|
|
@@ -37994,7 +38338,7 @@ registerSchema({
|
|
|
37994
38338
|
prompt: { type: "string", description: "Replacement additional spawned-agent instructions", required: false }
|
|
37995
38339
|
}
|
|
37996
38340
|
});
|
|
37997
|
-
var updateCommand2 =
|
|
38341
|
+
var updateCommand2 = defineCommand173({
|
|
37998
38342
|
meta: {
|
|
37999
38343
|
name: "update",
|
|
38000
38344
|
description: "Stage a scheduled action update. Example: baker scheduled-actions update <id> --enabled false"
|
|
@@ -38019,7 +38363,7 @@ var updateCommand2 = defineCommand170({
|
|
|
38019
38363
|
try {
|
|
38020
38364
|
const id = args.id || args["scheduled-action-id"];
|
|
38021
38365
|
if (!id) {
|
|
38022
|
-
|
|
38366
|
+
failValidation4("Scheduled action ID is required.");
|
|
38023
38367
|
}
|
|
38024
38368
|
validateScheduledActionRef(id);
|
|
38025
38369
|
const body = { id };
|
|
@@ -38051,7 +38395,7 @@ var updateCommand2 = defineCommand170({
|
|
|
38051
38395
|
hasPatch = true;
|
|
38052
38396
|
}
|
|
38053
38397
|
if (!hasPatch) {
|
|
38054
|
-
|
|
38398
|
+
failValidation4(
|
|
38055
38399
|
"Provide at least one of --name, --description, --cron, --run-at, --timezone, --enabled, --spawn-agent, --prompt."
|
|
38056
38400
|
);
|
|
38057
38401
|
}
|
|
@@ -38059,13 +38403,13 @@ var updateCommand2 = defineCommand170({
|
|
|
38059
38403
|
await apiPost("/api/scheduled-actions/update", body);
|
|
38060
38404
|
writeOk2();
|
|
38061
38405
|
} catch (err) {
|
|
38062
|
-
|
|
38406
|
+
failApi3(err);
|
|
38063
38407
|
}
|
|
38064
38408
|
}
|
|
38065
38409
|
});
|
|
38066
38410
|
|
|
38067
38411
|
// src/commands/scheduled-actions/index.ts
|
|
38068
|
-
var scheduledActionsCommand =
|
|
38412
|
+
var scheduledActionsCommand = defineCommand174({
|
|
38069
38413
|
meta: {
|
|
38070
38414
|
name: "scheduled-actions",
|
|
38071
38415
|
description: `Manage Scheduled Actions. Subcommands: list, get, create, update, delete, trigger.
|
|
@@ -38082,7 +38426,7 @@ Examples:
|
|
|
38082
38426
|
Full guide: __tooling__/docs/tools/baker/scheduled-actions.md`
|
|
38083
38427
|
},
|
|
38084
38428
|
subCommands: {
|
|
38085
|
-
list:
|
|
38429
|
+
list: listCommand15,
|
|
38086
38430
|
get: getCommand3,
|
|
38087
38431
|
create: createCommand2,
|
|
38088
38432
|
update: updateCommand2,
|
|
@@ -38092,14 +38436,14 @@ Full guide: __tooling__/docs/tools/baker/scheduled-actions.md`
|
|
|
38092
38436
|
});
|
|
38093
38437
|
|
|
38094
38438
|
// src/commands/schema.ts
|
|
38095
|
-
import { defineCommand as
|
|
38439
|
+
import { defineCommand as defineCommand175 } from "citty";
|
|
38096
38440
|
function narrowToFamily(commandName, available) {
|
|
38097
38441
|
const segments = commandName.split(".");
|
|
38098
38442
|
const prefix = segments[0] === "ads" && segments[1] ? `ads.${segments[1]}.` : `${segments[0]}.`;
|
|
38099
38443
|
const siblings = available.filter((name) => name.startsWith(prefix));
|
|
38100
38444
|
return siblings.length > 0 ? siblings : available;
|
|
38101
38445
|
}
|
|
38102
|
-
var schemaCommand =
|
|
38446
|
+
var schemaCommand = defineCommand175({
|
|
38103
38447
|
meta: {
|
|
38104
38448
|
name: "schema",
|
|
38105
38449
|
description: "Inspect command argument schemas (for AI agent introspection). Lists all commands if no argument given. Example: baker schema images.search"
|
|
@@ -38143,10 +38487,10 @@ var schemaCommand = defineCommand172({
|
|
|
38143
38487
|
});
|
|
38144
38488
|
|
|
38145
38489
|
// src/commands/studio/index.ts
|
|
38146
|
-
import { defineCommand as
|
|
38490
|
+
import { defineCommand as defineCommand184 } from "citty";
|
|
38147
38491
|
|
|
38148
38492
|
// src/commands/studio/animate.ts
|
|
38149
|
-
import { defineCommand as
|
|
38493
|
+
import { defineCommand as defineCommand176 } from "citty";
|
|
38150
38494
|
|
|
38151
38495
|
// src/commands/studio/batch.ts
|
|
38152
38496
|
function projectBatch(generation, full) {
|
|
@@ -38591,7 +38935,7 @@ function costHintsFor(body) {
|
|
|
38591
38935
|
}
|
|
38592
38936
|
return hints;
|
|
38593
38937
|
}
|
|
38594
|
-
var animateCommand =
|
|
38938
|
+
var animateCommand = defineCommand176({
|
|
38595
38939
|
meta: {
|
|
38596
38940
|
name: "animate",
|
|
38597
38941
|
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"
|
|
@@ -38710,7 +39054,7 @@ var animateCommand = defineCommand173({
|
|
|
38710
39054
|
});
|
|
38711
39055
|
|
|
38712
39056
|
// src/commands/studio/generate.ts
|
|
38713
|
-
import { defineCommand as
|
|
39057
|
+
import { defineCommand as defineCommand177 } from "citty";
|
|
38714
39058
|
var MODEL_LIST2 = IMAGE_MODEL_IDS;
|
|
38715
39059
|
var DEFAULT_MAX_WAIT_MS2 = 24e4;
|
|
38716
39060
|
registerSchema({
|
|
@@ -38840,7 +39184,7 @@ function buildGenerateBody(args, prompt) {
|
|
|
38840
39184
|
}
|
|
38841
39185
|
return body;
|
|
38842
39186
|
}
|
|
38843
|
-
var generateCommand =
|
|
39187
|
+
var generateCommand = defineCommand177({
|
|
38844
39188
|
meta: {
|
|
38845
39189
|
name: "generate",
|
|
38846
39190
|
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]]'"
|
|
@@ -38918,7 +39262,7 @@ var generateCommand = defineCommand174({
|
|
|
38918
39262
|
});
|
|
38919
39263
|
|
|
38920
39264
|
// src/commands/studio/get.ts
|
|
38921
|
-
import { defineCommand as
|
|
39265
|
+
import { defineCommand as defineCommand178 } from "citty";
|
|
38922
39266
|
registerSchema({
|
|
38923
39267
|
command: "studio.get",
|
|
38924
39268
|
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.",
|
|
@@ -38927,7 +39271,7 @@ registerSchema({
|
|
|
38927
39271
|
full: { type: "boolean", description: "Include settings, references and attribution", required: false }
|
|
38928
39272
|
}
|
|
38929
39273
|
});
|
|
38930
|
-
var getCommand4 =
|
|
39274
|
+
var getCommand4 = defineCommand178({
|
|
38931
39275
|
meta: {
|
|
38932
39276
|
name: "get",
|
|
38933
39277
|
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"
|
|
@@ -38956,7 +39300,7 @@ var getCommand4 = defineCommand175({
|
|
|
38956
39300
|
});
|
|
38957
39301
|
|
|
38958
39302
|
// src/commands/studio/improve.ts
|
|
38959
|
-
import { defineCommand as
|
|
39303
|
+
import { defineCommand as defineCommand179 } from "citty";
|
|
38960
39304
|
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.";
|
|
38961
39305
|
registerSchema({
|
|
38962
39306
|
command: "studio.improve",
|
|
@@ -38981,7 +39325,7 @@ registerSchema({
|
|
|
38981
39325
|
}
|
|
38982
39326
|
}
|
|
38983
39327
|
});
|
|
38984
|
-
var improveCommand =
|
|
39328
|
+
var improveCommand = defineCommand179({
|
|
38985
39329
|
meta: {
|
|
38986
39330
|
name: "improve",
|
|
38987
39331
|
description: `${DESCRIPTION}
|
|
@@ -39025,7 +39369,7 @@ Examples:
|
|
|
39025
39369
|
});
|
|
39026
39370
|
|
|
39027
39371
|
// src/commands/studio/keep.ts
|
|
39028
|
-
import { defineCommand as
|
|
39372
|
+
import { defineCommand as defineCommand180 } from "citty";
|
|
39029
39373
|
registerSchema({
|
|
39030
39374
|
command: "studio.keep",
|
|
39031
39375
|
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.",
|
|
@@ -39035,7 +39379,7 @@ registerSchema({
|
|
|
39035
39379
|
undo: { type: "boolean", description: "Un-star an image, or take a kept clip back out", required: false }
|
|
39036
39380
|
}
|
|
39037
39381
|
});
|
|
39038
|
-
var keepCommand =
|
|
39382
|
+
var keepCommand = defineCommand180({
|
|
39039
39383
|
meta: {
|
|
39040
39384
|
name: "keep",
|
|
39041
39385
|
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"
|
|
@@ -39086,7 +39430,7 @@ var keepCommand = defineCommand177({
|
|
|
39086
39430
|
});
|
|
39087
39431
|
|
|
39088
39432
|
// src/commands/studio/list.ts
|
|
39089
|
-
import { defineCommand as
|
|
39433
|
+
import { defineCommand as defineCommand181 } from "citty";
|
|
39090
39434
|
registerSchema({
|
|
39091
39435
|
command: "studio.list",
|
|
39092
39436
|
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.",
|
|
@@ -39097,7 +39441,7 @@ registerSchema({
|
|
|
39097
39441
|
full: { type: "boolean", description: "Include settings, references and attribution", required: false }
|
|
39098
39442
|
}
|
|
39099
39443
|
});
|
|
39100
|
-
var
|
|
39444
|
+
var listCommand16 = defineCommand181({
|
|
39101
39445
|
meta: {
|
|
39102
39446
|
name: "list",
|
|
39103
39447
|
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"
|
|
@@ -39131,7 +39475,7 @@ var listCommand15 = defineCommand178({
|
|
|
39131
39475
|
});
|
|
39132
39476
|
|
|
39133
39477
|
// src/commands/studio/models.ts
|
|
39134
|
-
import { defineCommand as
|
|
39478
|
+
import { defineCommand as defineCommand182 } from "citty";
|
|
39135
39479
|
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.";
|
|
39136
39480
|
registerSchema({
|
|
39137
39481
|
command: "studio.models",
|
|
@@ -39218,7 +39562,7 @@ function buildModelCards(kind, model) {
|
|
|
39218
39562
|
const selected = model ? ids.filter((id) => id === model) : ids;
|
|
39219
39563
|
return selected.map((id) => build(id));
|
|
39220
39564
|
}
|
|
39221
|
-
var modelsCommand =
|
|
39565
|
+
var modelsCommand = defineCommand182({
|
|
39222
39566
|
meta: {
|
|
39223
39567
|
name: "models",
|
|
39224
39568
|
description: `${DESCRIPTION2}
|
|
@@ -39265,13 +39609,13 @@ Examples:
|
|
|
39265
39609
|
});
|
|
39266
39610
|
|
|
39267
39611
|
// src/commands/studio/skills.ts
|
|
39268
|
-
import { defineCommand as
|
|
39612
|
+
import { defineCommand as defineCommand183 } from "citty";
|
|
39269
39613
|
registerSchema({
|
|
39270
39614
|
command: "studio.skills",
|
|
39271
39615
|
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.",
|
|
39272
39616
|
args: {}
|
|
39273
39617
|
});
|
|
39274
|
-
var skillsCommand =
|
|
39618
|
+
var skillsCommand = defineCommand183({
|
|
39275
39619
|
meta: {
|
|
39276
39620
|
name: "skills",
|
|
39277
39621
|
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"
|
|
@@ -39295,7 +39639,7 @@ var skillsCommand = defineCommand180({
|
|
|
39295
39639
|
});
|
|
39296
39640
|
|
|
39297
39641
|
// src/commands/studio/index.ts
|
|
39298
|
-
var studioCommand =
|
|
39642
|
+
var studioCommand = defineCommand184({
|
|
39299
39643
|
meta: {
|
|
39300
39644
|
name: "studio",
|
|
39301
39645
|
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.
|
|
@@ -39329,7 +39673,7 @@ Full guide: __tooling__/docs/tools/baker/studio.md`
|
|
|
39329
39673
|
generate: generateCommand,
|
|
39330
39674
|
animate: animateCommand,
|
|
39331
39675
|
get: getCommand4,
|
|
39332
|
-
list:
|
|
39676
|
+
list: listCommand16,
|
|
39333
39677
|
keep: keepCommand,
|
|
39334
39678
|
models: modelsCommand,
|
|
39335
39679
|
skills: skillsCommand,
|
|
@@ -39338,14 +39682,14 @@ Full guide: __tooling__/docs/tools/baker/studio.md`
|
|
|
39338
39682
|
});
|
|
39339
39683
|
|
|
39340
39684
|
// src/commands/tag-manager/index.ts
|
|
39341
|
-
import { defineCommand as
|
|
39685
|
+
import { defineCommand as defineCommand188 } from "citty";
|
|
39342
39686
|
|
|
39343
39687
|
// src/commands/tag-manager/draft.ts
|
|
39344
|
-
import { defineCommand as
|
|
39688
|
+
import { defineCommand as defineCommand185 } from "citty";
|
|
39345
39689
|
|
|
39346
39690
|
// src/commands/tag-manager/shared.ts
|
|
39347
39691
|
import { readFileSync as readFileSync13 } from "fs";
|
|
39348
|
-
function
|
|
39692
|
+
function failValidation5(message) {
|
|
39349
39693
|
writeJsonEnvelope({ ok: false, error: { code: "VALIDATION_ERROR", message } });
|
|
39350
39694
|
process.exit(1);
|
|
39351
39695
|
}
|
|
@@ -39353,7 +39697,7 @@ function requireTarget5(args, entity) {
|
|
|
39353
39697
|
const positional = Array.isArray(args._) ? args._[0] : void 0;
|
|
39354
39698
|
const target = args.id ?? args.target ?? positional;
|
|
39355
39699
|
if (typeof target !== "string" || target.length === 0) {
|
|
39356
|
-
|
|
39700
|
+
failValidation5(`pass the ${entity} id or path as the positional argument`);
|
|
39357
39701
|
}
|
|
39358
39702
|
return target;
|
|
39359
39703
|
}
|
|
@@ -39362,16 +39706,16 @@ function loadJsonArg2(args, flag = "json") {
|
|
|
39362
39706
|
const file = args.file;
|
|
39363
39707
|
const raw = typeof file === "string" && file.length > 0 ? readFileSync13(file, "utf8") : typeof inline === "string" && inline.length > 0 ? inline : void 0;
|
|
39364
39708
|
if (raw === void 0) {
|
|
39365
|
-
|
|
39709
|
+
failValidation5(`pass --${flag} with inline JSON or --file with a path to a JSON file`);
|
|
39366
39710
|
}
|
|
39367
39711
|
try {
|
|
39368
39712
|
const parsed = JSON.parse(raw);
|
|
39369
39713
|
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
39370
|
-
|
|
39714
|
+
failValidation5(`--${flag} must be a JSON object`);
|
|
39371
39715
|
}
|
|
39372
39716
|
return parsed;
|
|
39373
39717
|
} catch {
|
|
39374
|
-
return
|
|
39718
|
+
return failValidation5(`--${flag} is not valid JSON`);
|
|
39375
39719
|
}
|
|
39376
39720
|
}
|
|
39377
39721
|
var RETRYABLE_CODES2 = /* @__PURE__ */ new Set(["RATE_LIMITED", "INTERNAL_ERROR", "NETWORK_ERROR", "TIMEOUT"]);
|
|
@@ -39464,13 +39808,13 @@ registerSchema({
|
|
|
39464
39808
|
chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
|
|
39465
39809
|
}
|
|
39466
39810
|
});
|
|
39467
|
-
var draftCommand4 =
|
|
39811
|
+
var draftCommand4 = defineCommand185({
|
|
39468
39812
|
meta: {
|
|
39469
39813
|
name: "draft",
|
|
39470
39814
|
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."
|
|
39471
39815
|
},
|
|
39472
39816
|
subCommands: {
|
|
39473
|
-
list:
|
|
39817
|
+
list: defineCommand185({
|
|
39474
39818
|
meta: {
|
|
39475
39819
|
name: "list",
|
|
39476
39820
|
description: "Review everything staged on this chat (--json for the raw envelope)"
|
|
@@ -39483,7 +39827,7 @@ var draftCommand4 = defineCommand182({
|
|
|
39483
39827
|
await draftList2(args.json === true, args.chat);
|
|
39484
39828
|
}
|
|
39485
39829
|
}),
|
|
39486
|
-
show:
|
|
39830
|
+
show: defineCommand185({
|
|
39487
39831
|
meta: {
|
|
39488
39832
|
name: "show",
|
|
39489
39833
|
description: "Print the full staged payload for one change \u2014 the receipt to verify it looks right before publish (never truncated)."
|
|
@@ -39500,7 +39844,7 @@ var draftCommand4 = defineCommand182({
|
|
|
39500
39844
|
);
|
|
39501
39845
|
}
|
|
39502
39846
|
}),
|
|
39503
|
-
amend:
|
|
39847
|
+
amend: defineCommand185({
|
|
39504
39848
|
meta: {
|
|
39505
39849
|
name: "amend",
|
|
39506
39850
|
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."
|
|
@@ -39517,7 +39861,7 @@ var draftCommand4 = defineCommand182({
|
|
|
39517
39861
|
});
|
|
39518
39862
|
}
|
|
39519
39863
|
}),
|
|
39520
|
-
remove:
|
|
39864
|
+
remove: defineCommand185({
|
|
39521
39865
|
meta: { name: "remove", description: "Remove one staged change (cascades to anything depending on it)" },
|
|
39522
39866
|
args: { ref: { type: "positional", description: "Staged ref (gtm_temp_*) or target", required: false } },
|
|
39523
39867
|
run: async ({ args }) => {
|
|
@@ -39526,7 +39870,7 @@ var draftCommand4 = defineCommand182({
|
|
|
39526
39870
|
});
|
|
39527
39871
|
}
|
|
39528
39872
|
}),
|
|
39529
|
-
clear:
|
|
39873
|
+
clear: defineCommand185({
|
|
39530
39874
|
meta: { name: "clear", description: "Discard all Tag Manager changes staged on this chat" },
|
|
39531
39875
|
run: async () => {
|
|
39532
39876
|
await draftAction3("/api/tag-manager/draft/clear", {});
|
|
@@ -39536,7 +39880,7 @@ var draftCommand4 = defineCommand182({
|
|
|
39536
39880
|
});
|
|
39537
39881
|
|
|
39538
39882
|
// src/commands/tag-manager/read.ts
|
|
39539
|
-
import { defineCommand as
|
|
39883
|
+
import { defineCommand as defineCommand186 } from "citty";
|
|
39540
39884
|
registerSchema({
|
|
39541
39885
|
command: "tagManager.containers",
|
|
39542
39886
|
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.",
|
|
@@ -39577,7 +39921,7 @@ function containersHints(containers) {
|
|
|
39577
39921
|
}))
|
|
39578
39922
|
});
|
|
39579
39923
|
}
|
|
39580
|
-
var containersCommand =
|
|
39924
|
+
var containersCommand = defineCommand186({
|
|
39581
39925
|
meta: {
|
|
39582
39926
|
name: "containers",
|
|
39583
39927
|
description: `List Tag Manager containers reachable by this company's connection.
|
|
@@ -39594,7 +39938,7 @@ Start here:
|
|
|
39594
39938
|
}
|
|
39595
39939
|
}
|
|
39596
39940
|
});
|
|
39597
|
-
var readCommand =
|
|
39941
|
+
var readCommand = defineCommand186({
|
|
39598
39942
|
meta: {
|
|
39599
39943
|
name: "read",
|
|
39600
39944
|
description: `Read the current contents of the Tag Manager container \u2014 always do this before staging changes.
|
|
@@ -39636,7 +39980,7 @@ Examples:
|
|
|
39636
39980
|
});
|
|
39637
39981
|
|
|
39638
39982
|
// src/commands/tag-manager/write-commands.ts
|
|
39639
|
-
import { defineCommand as
|
|
39983
|
+
import { defineCommand as defineCommand187 } from "citty";
|
|
39640
39984
|
var CONTAINER_ARG_DESCRIPTION = "Numeric container id (optional only when one container is connected \u2014 run `baker tag-manager containers`)";
|
|
39641
39985
|
var ENTITIES = [
|
|
39642
39986
|
{
|
|
@@ -39692,10 +40036,10 @@ for (const { entity, noun, createHint } of ENTITIES) {
|
|
|
39692
40036
|
});
|
|
39693
40037
|
}
|
|
39694
40038
|
function entityCommand(entity, noun, example) {
|
|
39695
|
-
return
|
|
40039
|
+
return defineCommand187({
|
|
39696
40040
|
meta: { name: entity, description: `Stage ${noun} changes on this chat's Tag Manager draft` },
|
|
39697
40041
|
subCommands: {
|
|
39698
|
-
create:
|
|
40042
|
+
create: defineCommand187({
|
|
39699
40043
|
meta: {
|
|
39700
40044
|
name: "create",
|
|
39701
40045
|
description: `Stage a new ${noun}
|
|
@@ -39717,7 +40061,7 @@ Examples:
|
|
|
39717
40061
|
});
|
|
39718
40062
|
}
|
|
39719
40063
|
}),
|
|
39720
|
-
update:
|
|
40064
|
+
update: defineCommand187({
|
|
39721
40065
|
meta: {
|
|
39722
40066
|
name: "update",
|
|
39723
40067
|
description: `Stage an update to an existing ${noun} (pass its id or path)`
|
|
@@ -39737,7 +40081,7 @@ Examples:
|
|
|
39737
40081
|
});
|
|
39738
40082
|
}
|
|
39739
40083
|
}),
|
|
39740
|
-
delete:
|
|
40084
|
+
delete: defineCommand187({
|
|
39741
40085
|
meta: { name: "delete", description: `Stage the deletion of a ${noun} (pass its id or path)` },
|
|
39742
40086
|
args: {
|
|
39743
40087
|
id: { type: "positional", description: `${noun} id or path`, required: false },
|
|
@@ -39778,7 +40122,7 @@ function builtinTypes(args) {
|
|
|
39778
40122
|
}
|
|
39779
40123
|
return raw.split(",").map((entry) => entry.trim());
|
|
39780
40124
|
}
|
|
39781
|
-
var builtinCommand =
|
|
40125
|
+
var builtinCommand = defineCommand187({
|
|
39782
40126
|
meta: {
|
|
39783
40127
|
name: "builtin",
|
|
39784
40128
|
description: `Enable or disable built-in variables
|
|
@@ -39788,7 +40132,7 @@ Examples:
|
|
|
39788
40132
|
baker tag-manager builtin disable --types formId`
|
|
39789
40133
|
},
|
|
39790
40134
|
subCommands: {
|
|
39791
|
-
enable:
|
|
40135
|
+
enable: defineCommand187({
|
|
39792
40136
|
meta: { name: "enable", description: "Stage enabling built-in variables" },
|
|
39793
40137
|
args: {
|
|
39794
40138
|
types: { type: "string", description: "Comma-separated types", required: false },
|
|
@@ -39802,7 +40146,7 @@ Examples:
|
|
|
39802
40146
|
});
|
|
39803
40147
|
}
|
|
39804
40148
|
}),
|
|
39805
|
-
disable:
|
|
40149
|
+
disable: defineCommand187({
|
|
39806
40150
|
meta: { name: "disable", description: "Stage disabling built-in variables" },
|
|
39807
40151
|
args: {
|
|
39808
40152
|
types: { type: "string", description: "Comma-separated types", required: false },
|
|
@@ -39820,7 +40164,7 @@ Examples:
|
|
|
39820
40164
|
});
|
|
39821
40165
|
|
|
39822
40166
|
// src/commands/tag-manager/index.ts
|
|
39823
|
-
var tagManagerCommand =
|
|
40167
|
+
var tagManagerCommand = defineCommand188({
|
|
39824
40168
|
meta: {
|
|
39825
40169
|
name: "tag-manager",
|
|
39826
40170
|
description: `Read and change what lives inside the client's Google Tag Manager container \u2014 tags, triggers, variables, folders and built-in variables.
|
|
@@ -39857,10 +40201,10 @@ Full guide: __tooling__/docs/tools/baker/tag-manager.md`
|
|
|
39857
40201
|
});
|
|
39858
40202
|
|
|
39859
40203
|
// src/commands/tags/index.ts
|
|
39860
|
-
import { defineCommand as
|
|
40204
|
+
import { defineCommand as defineCommand189 } from "citty";
|
|
39861
40205
|
|
|
39862
40206
|
// src/commands/tags/shared.ts
|
|
39863
|
-
function
|
|
40207
|
+
function failApi4(err) {
|
|
39864
40208
|
if (err instanceof ApiError) {
|
|
39865
40209
|
writeJson({ ok: false, error: { code: err.code, message: err.message } });
|
|
39866
40210
|
process.exit(1);
|
|
@@ -39920,13 +40264,13 @@ async function listTags(json) {
|
|
|
39920
40264
|
process.stdout.write(`${response.tags.map(renderEffectiveEntry).join("\n")}
|
|
39921
40265
|
`);
|
|
39922
40266
|
} catch (err) {
|
|
39923
|
-
|
|
40267
|
+
failApi4(err);
|
|
39924
40268
|
}
|
|
39925
40269
|
}
|
|
39926
40270
|
var listArgs9 = {
|
|
39927
40271
|
json: { type: "boolean", description: "Print the raw JSON envelope instead of the readable list" }
|
|
39928
40272
|
};
|
|
39929
|
-
var
|
|
40273
|
+
var listCommand17 = defineCommand189({
|
|
39930
40274
|
meta: {
|
|
39931
40275
|
name: "list",
|
|
39932
40276
|
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"
|
|
@@ -39942,10 +40286,10 @@ async function listDraft3(chat) {
|
|
|
39942
40286
|
const response = await apiPost("/api/tags/draft", { chatId });
|
|
39943
40287
|
writeJson({ ok: true, data: response });
|
|
39944
40288
|
} catch (err) {
|
|
39945
|
-
|
|
40289
|
+
failApi4(err);
|
|
39946
40290
|
}
|
|
39947
40291
|
}
|
|
39948
|
-
var draftCommand5 =
|
|
40292
|
+
var draftCommand5 = defineCommand189({
|
|
39949
40293
|
meta: {
|
|
39950
40294
|
name: "draft",
|
|
39951
40295
|
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."
|
|
@@ -39955,7 +40299,7 @@ var draftCommand5 = defineCommand186({
|
|
|
39955
40299
|
await listDraft3(args.chat);
|
|
39956
40300
|
}
|
|
39957
40301
|
});
|
|
39958
|
-
var tagsCommand3 =
|
|
40302
|
+
var tagsCommand3 = defineCommand189({
|
|
39959
40303
|
meta: {
|
|
39960
40304
|
name: "tags",
|
|
39961
40305
|
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.
|
|
@@ -39972,7 +40316,7 @@ Examples:
|
|
|
39972
40316
|
Full guide: __tooling__/docs/tools/baker/tags.md`
|
|
39973
40317
|
},
|
|
39974
40318
|
subCommands: {
|
|
39975
|
-
list:
|
|
40319
|
+
list: listCommand17,
|
|
39976
40320
|
draft: draftCommand5
|
|
39977
40321
|
},
|
|
39978
40322
|
// Bare `baker tags` lists the effective tags. `args` stays so citty knows this
|
|
@@ -39984,10 +40328,10 @@ Full guide: __tooling__/docs/tools/baker/tags.md`
|
|
|
39984
40328
|
});
|
|
39985
40329
|
|
|
39986
40330
|
// src/commands/testimonials/index.ts
|
|
39987
|
-
import { defineCommand as
|
|
40331
|
+
import { defineCommand as defineCommand193 } from "citty";
|
|
39988
40332
|
|
|
39989
40333
|
// src/commands/testimonials/get.ts
|
|
39990
|
-
import { defineCommand as
|
|
40334
|
+
import { defineCommand as defineCommand190 } from "citty";
|
|
39991
40335
|
registerSchema({
|
|
39992
40336
|
command: "testimonials.get",
|
|
39993
40337
|
description: "Get a single testimonial by ID",
|
|
@@ -39995,7 +40339,7 @@ registerSchema({
|
|
|
39995
40339
|
id: { type: "string", description: "Testimonial ID", required: true }
|
|
39996
40340
|
}
|
|
39997
40341
|
});
|
|
39998
|
-
var getCommand5 =
|
|
40342
|
+
var getCommand5 = defineCommand190({
|
|
39999
40343
|
meta: { name: "get", description: "Get a single testimonial by ID. Example: baker testimonials get j571abc123" },
|
|
40000
40344
|
args: {
|
|
40001
40345
|
id: { type: "positional", description: "Testimonial ID", required: false },
|
|
@@ -40032,7 +40376,7 @@ var getCommand5 = defineCommand187({
|
|
|
40032
40376
|
});
|
|
40033
40377
|
|
|
40034
40378
|
// src/commands/testimonials/list.ts
|
|
40035
|
-
import { defineCommand as
|
|
40379
|
+
import { defineCommand as defineCommand191 } from "citty";
|
|
40036
40380
|
registerSchema({
|
|
40037
40381
|
command: "testimonials.list",
|
|
40038
40382
|
description: "List testimonials with optional filters.",
|
|
@@ -40062,7 +40406,7 @@ registerSchema({
|
|
|
40062
40406
|
limit: { type: "number", description: "Max results (default 50)", required: false, default: 50 }
|
|
40063
40407
|
}
|
|
40064
40408
|
});
|
|
40065
|
-
var
|
|
40409
|
+
var listCommand18 = defineCommand191({
|
|
40066
40410
|
meta: {
|
|
40067
40411
|
name: "list",
|
|
40068
40412
|
description: "List testimonials with optional filters. Example: baker testimonials list --source google --sentiment positive"
|
|
@@ -40111,7 +40455,7 @@ var listCommand17 = defineCommand188({
|
|
|
40111
40455
|
});
|
|
40112
40456
|
|
|
40113
40457
|
// src/commands/testimonials/search.ts
|
|
40114
|
-
import { defineCommand as
|
|
40458
|
+
import { defineCommand as defineCommand192 } from "citty";
|
|
40115
40459
|
function languageBiasHint(results, requestedLanguage) {
|
|
40116
40460
|
if (requestedLanguage) {
|
|
40117
40461
|
return null;
|
|
@@ -40189,7 +40533,7 @@ function buildSearchRequest(query, args) {
|
|
|
40189
40533
|
}
|
|
40190
40534
|
return body;
|
|
40191
40535
|
}
|
|
40192
|
-
var searchCommand3 =
|
|
40536
|
+
var searchCommand3 = defineCommand192({
|
|
40193
40537
|
meta: {
|
|
40194
40538
|
name: "search",
|
|
40195
40539
|
description: "Semantic search testimonials by text query. Uses hybrid BM25 + vector + reranking. Example: baker testimonials search 'great service' --rating-min 4"
|
|
@@ -40245,7 +40589,7 @@ var searchCommand3 = defineCommand189({
|
|
|
40245
40589
|
var tagsCommand4 = makeTagsCommand("testimonials", "testimonial", "/api/testimonials/tags");
|
|
40246
40590
|
|
|
40247
40591
|
// src/commands/testimonials/index.ts
|
|
40248
|
-
var testimonialsCommand =
|
|
40592
|
+
var testimonialsCommand = defineCommand193({
|
|
40249
40593
|
meta: {
|
|
40250
40594
|
name: "testimonials",
|
|
40251
40595
|
description: `Find and browse testimonials in Baker. Subcommands: search, get, list, tags.
|
|
@@ -40261,16 +40605,16 @@ Full guide: __tooling__/docs/tools/baker/testimonials.md`
|
|
|
40261
40605
|
subCommands: {
|
|
40262
40606
|
get: getCommand5,
|
|
40263
40607
|
search: searchCommand3,
|
|
40264
|
-
list:
|
|
40608
|
+
list: listCommand18,
|
|
40265
40609
|
tags: tagsCommand4
|
|
40266
40610
|
}
|
|
40267
40611
|
});
|
|
40268
40612
|
|
|
40269
40613
|
// src/commands/videos/index.ts
|
|
40270
|
-
import { defineCommand as
|
|
40614
|
+
import { defineCommand as defineCommand199 } from "citty";
|
|
40271
40615
|
|
|
40272
40616
|
// src/commands/videos/delete.ts
|
|
40273
|
-
import { defineCommand as
|
|
40617
|
+
import { defineCommand as defineCommand194 } from "citty";
|
|
40274
40618
|
registerSchema({
|
|
40275
40619
|
command: "videos.delete",
|
|
40276
40620
|
description: "Delete a video by ID",
|
|
@@ -40284,7 +40628,7 @@ registerSchema({
|
|
|
40284
40628
|
}
|
|
40285
40629
|
}
|
|
40286
40630
|
});
|
|
40287
|
-
var deleteCommand3 =
|
|
40631
|
+
var deleteCommand3 = defineCommand194({
|
|
40288
40632
|
meta: {
|
|
40289
40633
|
name: "delete",
|
|
40290
40634
|
description: "Delete a video by ID. Use --dry-run to preview. Example: baker videos delete j571abc123 --dry-run"
|
|
@@ -40325,7 +40669,7 @@ var deleteCommand3 = defineCommand191({
|
|
|
40325
40669
|
});
|
|
40326
40670
|
|
|
40327
40671
|
// src/commands/videos/get.ts
|
|
40328
|
-
import { defineCommand as
|
|
40672
|
+
import { defineCommand as defineCommand195 } from "citty";
|
|
40329
40673
|
registerSchema({
|
|
40330
40674
|
command: "videos.get",
|
|
40331
40675
|
description: "Get a single video by ID",
|
|
@@ -40333,7 +40677,7 @@ registerSchema({
|
|
|
40333
40677
|
id: { type: "string", description: "Video ID", required: true }
|
|
40334
40678
|
}
|
|
40335
40679
|
});
|
|
40336
|
-
var getCommand6 =
|
|
40680
|
+
var getCommand6 = defineCommand195({
|
|
40337
40681
|
meta: { name: "get", description: "Get a single video by ID. Example: baker videos get j571abc123" },
|
|
40338
40682
|
args: {
|
|
40339
40683
|
id: { type: "positional", description: "Video ID", required: false },
|
|
@@ -40370,7 +40714,7 @@ var getCommand6 = defineCommand192({
|
|
|
40370
40714
|
});
|
|
40371
40715
|
|
|
40372
40716
|
// src/commands/videos/group.ts
|
|
40373
|
-
import { defineCommand as
|
|
40717
|
+
import { defineCommand as defineCommand196 } from "citty";
|
|
40374
40718
|
registerSchema({
|
|
40375
40719
|
command: "videos.group",
|
|
40376
40720
|
description: "List every clip and image that arrived in the same set as this video (carousel slides, one page)",
|
|
@@ -40379,7 +40723,7 @@ registerSchema({
|
|
|
40379
40723
|
"group-key": { type: "string", description: "The set key directly, when you already have it", required: false }
|
|
40380
40724
|
}
|
|
40381
40725
|
});
|
|
40382
|
-
var groupCommand2 =
|
|
40726
|
+
var groupCommand2 = defineCommand196({
|
|
40383
40727
|
meta: {
|
|
40384
40728
|
name: "group",
|
|
40385
40729
|
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>"
|
|
@@ -40399,7 +40743,7 @@ var groupCommand2 = defineCommand193({
|
|
|
40399
40743
|
});
|
|
40400
40744
|
|
|
40401
40745
|
// src/commands/videos/search.ts
|
|
40402
|
-
import { defineCommand as
|
|
40746
|
+
import { defineCommand as defineCommand197 } from "citty";
|
|
40403
40747
|
registerSchema({
|
|
40404
40748
|
command: "videos.search",
|
|
40405
40749
|
description: "Search videos by text query. Only returns ready videos.",
|
|
@@ -40409,7 +40753,7 @@ registerSchema({
|
|
|
40409
40753
|
tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
|
|
40410
40754
|
}
|
|
40411
40755
|
});
|
|
40412
|
-
var searchCommand4 =
|
|
40756
|
+
var searchCommand4 = defineCommand197({
|
|
40413
40757
|
meta: {
|
|
40414
40758
|
name: "search",
|
|
40415
40759
|
description: "Semantic search videos by text query. Uses hybrid BM25 + vector + reranking. Example: baker videos search 'product demo' --tags tutorial"
|
|
@@ -40461,7 +40805,7 @@ var tagsCommand5 = makeTagsCommand("videos", "video", "/api/videos/tags");
|
|
|
40461
40805
|
// src/commands/videos/upload.ts
|
|
40462
40806
|
import { readFile as readFile24, stat as stat7 } from "fs/promises";
|
|
40463
40807
|
import { basename as basename2, extname as extname3 } from "path";
|
|
40464
|
-
import { defineCommand as
|
|
40808
|
+
import { defineCommand as defineCommand198 } from "citty";
|
|
40465
40809
|
var MIME_MAP = {
|
|
40466
40810
|
".mp4": "video/mp4",
|
|
40467
40811
|
".mov": "video/quicktime",
|
|
@@ -40500,7 +40844,7 @@ function detectContentType(filePath) {
|
|
|
40500
40844
|
}
|
|
40501
40845
|
return mime;
|
|
40502
40846
|
}
|
|
40503
|
-
var uploadCommand2 =
|
|
40847
|
+
var uploadCommand2 = defineCommand198({
|
|
40504
40848
|
meta: {
|
|
40505
40849
|
name: "upload",
|
|
40506
40850
|
description: "Upload a video file to Baker via Mux direct upload. Auto-detects content type. Example: baker videos upload ./demo.mp4"
|
|
@@ -40570,7 +40914,7 @@ var uploadCommand2 = defineCommand195({
|
|
|
40570
40914
|
});
|
|
40571
40915
|
|
|
40572
40916
|
// src/commands/videos/index.ts
|
|
40573
|
-
var videosCommand =
|
|
40917
|
+
var videosCommand = defineCommand199({
|
|
40574
40918
|
meta: {
|
|
40575
40919
|
name: "videos",
|
|
40576
40920
|
description: `Find and manage videos in Baker. Subcommands: search, get, upload, delete, tags.
|
|
@@ -40595,10 +40939,10 @@ Full guide: __tooling__/docs/tools/baker/videos.md`
|
|
|
40595
40939
|
});
|
|
40596
40940
|
|
|
40597
40941
|
// src/commands/winning-ads/index.ts
|
|
40598
|
-
import { defineCommand as
|
|
40942
|
+
import { defineCommand as defineCommand212 } from "citty";
|
|
40599
40943
|
|
|
40600
40944
|
// src/commands/winning-ads/advertisers.ts
|
|
40601
|
-
import { defineCommand as
|
|
40945
|
+
import { defineCommand as defineCommand200 } from "citty";
|
|
40602
40946
|
|
|
40603
40947
|
// src/commands/winning-ads/shared.ts
|
|
40604
40948
|
function splitList2(value) {
|
|
@@ -40651,7 +40995,7 @@ function advertiserNormalizer(record, full) {
|
|
|
40651
40995
|
last_synced_at: record.last_synced_at ?? null
|
|
40652
40996
|
};
|
|
40653
40997
|
}
|
|
40654
|
-
var advertisersCommand2 =
|
|
40998
|
+
var advertisersCommand2 = defineCommand200({
|
|
40655
40999
|
meta: {
|
|
40656
41000
|
name: "advertisers",
|
|
40657
41001
|
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'
|
|
@@ -40709,7 +41053,7 @@ var advertisersCommand2 = defineCommand197({
|
|
|
40709
41053
|
});
|
|
40710
41054
|
|
|
40711
41055
|
// src/commands/winning-ads/brief.ts
|
|
40712
|
-
import { defineCommand as
|
|
41056
|
+
import { defineCommand as defineCommand201 } from "citty";
|
|
40713
41057
|
registerSchema({
|
|
40714
41058
|
command: "winning-ads.brief",
|
|
40715
41059
|
description: "Generate a creative brief grounded in strategically-similar winning ads. Optionally describe the target creative with --dna (JSON) and steer with --notes.",
|
|
@@ -40755,7 +41099,7 @@ function parseDna(raw) {
|
|
|
40755
41099
|
}
|
|
40756
41100
|
return parsed;
|
|
40757
41101
|
}
|
|
40758
|
-
var briefCommand =
|
|
41102
|
+
var briefCommand = defineCommand201({
|
|
40759
41103
|
meta: {
|
|
40760
41104
|
name: "brief",
|
|
40761
41105
|
description: `Generate a creative brief from winning references. Example: baker winning-ads brief --dna '{"angle":"cost savings"}' --notes "B2B, LinkedIn video" --k 8`
|
|
@@ -40791,7 +41135,7 @@ var briefCommand = defineCommand198({
|
|
|
40791
41135
|
});
|
|
40792
41136
|
|
|
40793
41137
|
// src/commands/winning-ads/content.ts
|
|
40794
|
-
import { defineCommand as
|
|
41138
|
+
import { defineCommand as defineCommand202 } from "citty";
|
|
40795
41139
|
registerSchema({
|
|
40796
41140
|
command: "winning-ads.content",
|
|
40797
41141
|
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.",
|
|
@@ -40804,7 +41148,7 @@ registerSchema({
|
|
|
40804
41148
|
}
|
|
40805
41149
|
}
|
|
40806
41150
|
});
|
|
40807
|
-
var contentCommand =
|
|
41151
|
+
var contentCommand = defineCommand202({
|
|
40808
41152
|
meta: {
|
|
40809
41153
|
name: "content",
|
|
40810
41154
|
description: "Read the transcript + on-screen text + copy of one winning ad. Example: baker winning-ads content adg_123 --platform meta --full --output md"
|
|
@@ -40853,7 +41197,7 @@ var contentCommand = defineCommand199({
|
|
|
40853
41197
|
});
|
|
40854
41198
|
|
|
40855
41199
|
// src/commands/winning-ads/feed.ts
|
|
40856
|
-
import { defineCommand as
|
|
41200
|
+
import { defineCommand as defineCommand203 } from "citty";
|
|
40857
41201
|
function buildFeedParams(input) {
|
|
40858
41202
|
const params = {};
|
|
40859
41203
|
const advertiser = splitList2(input.advertiser);
|
|
@@ -40905,7 +41249,7 @@ registerSchema({
|
|
|
40905
41249
|
format: { type: "string", description: "Comma-separated formats to include (e.g. static,video)", required: false }
|
|
40906
41250
|
}
|
|
40907
41251
|
});
|
|
40908
|
-
var feedCommand =
|
|
41252
|
+
var feedCommand = defineCommand203({
|
|
40909
41253
|
meta: {
|
|
40910
41254
|
name: "feed",
|
|
40911
41255
|
description: "Winners across every brand you follow (browse, then trim per advertiser). Example: baker winning-ads feed --per-advertiser 5 --output md"
|
|
@@ -40990,7 +41334,7 @@ var feedCommand = defineCommand200({
|
|
|
40990
41334
|
});
|
|
40991
41335
|
|
|
40992
41336
|
// src/commands/winning-ads/follow.ts
|
|
40993
|
-
import { defineCommand as
|
|
41337
|
+
import { defineCommand as defineCommand204 } from "citty";
|
|
40994
41338
|
var PLATFORMS = ["meta", "linkedin"];
|
|
40995
41339
|
registerSchema({
|
|
40996
41340
|
command: "winning-ads.follow",
|
|
@@ -41005,7 +41349,7 @@ registerSchema({
|
|
|
41005
41349
|
label: { type: "string", description: "Optional display label (defaults to the resolved name)", required: false }
|
|
41006
41350
|
}
|
|
41007
41351
|
});
|
|
41008
|
-
var followCommand =
|
|
41352
|
+
var followCommand = defineCommand204({
|
|
41009
41353
|
meta: {
|
|
41010
41354
|
name: "follow",
|
|
41011
41355
|
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'
|
|
@@ -41052,7 +41396,7 @@ var followCommand = defineCommand201({
|
|
|
41052
41396
|
});
|
|
41053
41397
|
|
|
41054
41398
|
// src/commands/winning-ads/follow-competitors.ts
|
|
41055
|
-
import { defineCommand as
|
|
41399
|
+
import { defineCommand as defineCommand205 } from "citty";
|
|
41056
41400
|
var PLATFORMS2 = ["meta", "linkedin"];
|
|
41057
41401
|
var BATCH_TIMEOUT_MS = 3e5;
|
|
41058
41402
|
function buildFollowBatchBody(input) {
|
|
@@ -41085,7 +41429,7 @@ registerSchema({
|
|
|
41085
41429
|
}
|
|
41086
41430
|
}
|
|
41087
41431
|
});
|
|
41088
|
-
var followCompetitorsCommand =
|
|
41432
|
+
var followCompetitorsCommand = defineCommand205({
|
|
41089
41433
|
meta: {
|
|
41090
41434
|
name: "follow-competitors",
|
|
41091
41435
|
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"'
|
|
@@ -41160,7 +41504,7 @@ var followCompetitorsCommand = defineCommand202({
|
|
|
41160
41504
|
});
|
|
41161
41505
|
|
|
41162
41506
|
// src/commands/winning-ads/following.ts
|
|
41163
|
-
import { defineCommand as
|
|
41507
|
+
import { defineCommand as defineCommand206 } from "citty";
|
|
41164
41508
|
registerSchema({
|
|
41165
41509
|
command: "winning-ads.following",
|
|
41166
41510
|
description: "List the brands you follow in your ad-dna library, with each one's status (ready vs still adding) and cached ad counts.",
|
|
@@ -41193,7 +41537,7 @@ function followingNormalizer(record, full) {
|
|
|
41193
41537
|
platforms: Array.isArray(record.platforms) ? record.platforms : []
|
|
41194
41538
|
};
|
|
41195
41539
|
}
|
|
41196
|
-
var followingCommand =
|
|
41540
|
+
var followingCommand = defineCommand206({
|
|
41197
41541
|
meta: {
|
|
41198
41542
|
name: "following",
|
|
41199
41543
|
description: "List brands you follow, with status (ready / adding\u2026) and cached counts. Example: baker winning-ads following --output md"
|
|
@@ -41228,7 +41572,7 @@ var followingCommand = defineCommand203({
|
|
|
41228
41572
|
});
|
|
41229
41573
|
|
|
41230
41574
|
// src/commands/winning-ads/patterns.ts
|
|
41231
|
-
import { defineCommand as
|
|
41575
|
+
import { defineCommand as defineCommand207 } from "citty";
|
|
41232
41576
|
registerSchema({
|
|
41233
41577
|
command: "winning-ads.patterns",
|
|
41234
41578
|
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.",
|
|
@@ -41267,7 +41611,7 @@ function discriminatorRow(record) {
|
|
|
41267
41611
|
top_values_duds: Array.isArray(record.top_values_b) ? record.top_values_b.join(", ") : ""
|
|
41268
41612
|
};
|
|
41269
41613
|
}
|
|
41270
|
-
var patternsCommand =
|
|
41614
|
+
var patternsCommand = defineCommand207({
|
|
41271
41615
|
meta: {
|
|
41272
41616
|
name: "patterns",
|
|
41273
41617
|
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"
|
|
@@ -41323,7 +41667,7 @@ var patternsCommand = defineCommand204({
|
|
|
41323
41667
|
});
|
|
41324
41668
|
|
|
41325
41669
|
// src/commands/winning-ads/search.ts
|
|
41326
|
-
import { defineCommand as
|
|
41670
|
+
import { defineCommand as defineCommand208 } from "citty";
|
|
41327
41671
|
registerSchema({
|
|
41328
41672
|
command: "winning-ads.search",
|
|
41329
41673
|
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.",
|
|
@@ -41431,7 +41775,7 @@ function buildSearchBody2(args) {
|
|
|
41431
41775
|
}
|
|
41432
41776
|
return body;
|
|
41433
41777
|
}
|
|
41434
|
-
var searchCommand5 =
|
|
41778
|
+
var searchCommand5 = defineCommand208({
|
|
41435
41779
|
meta: {
|
|
41436
41780
|
name: "search",
|
|
41437
41781
|
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"
|
|
@@ -41546,7 +41890,7 @@ var searchCommand5 = defineCommand205({
|
|
|
41546
41890
|
});
|
|
41547
41891
|
|
|
41548
41892
|
// src/commands/winning-ads/seeds.ts
|
|
41549
|
-
import { defineCommand as
|
|
41893
|
+
import { defineCommand as defineCommand209 } from "citty";
|
|
41550
41894
|
function leanRow(r) {
|
|
41551
41895
|
return {
|
|
41552
41896
|
key: r.key,
|
|
@@ -41574,7 +41918,7 @@ function makeSeedCommand(opts) {
|
|
|
41574
41918
|
limit: { type: "number", description: "Max keys 1-100 (default 20)", required: false, default: 20 }
|
|
41575
41919
|
}
|
|
41576
41920
|
});
|
|
41577
|
-
return
|
|
41921
|
+
return defineCommand209({
|
|
41578
41922
|
meta: { name: opts.name, description: opts.description },
|
|
41579
41923
|
args: {
|
|
41580
41924
|
platform: { type: "string", description: "Single platform to segment on", required: false },
|
|
@@ -41623,7 +41967,7 @@ var formatsCommand = makeSeedCommand({
|
|
|
41623
41967
|
});
|
|
41624
41968
|
|
|
41625
41969
|
// src/commands/winning-ads/unfollow.ts
|
|
41626
|
-
import { defineCommand as
|
|
41970
|
+
import { defineCommand as defineCommand210 } from "citty";
|
|
41627
41971
|
registerSchema({
|
|
41628
41972
|
command: "winning-ads.unfollow",
|
|
41629
41973
|
description: "Stop following a brand \u2014 removes it from your ad-dna library by advertiser id.",
|
|
@@ -41631,7 +41975,7 @@ registerSchema({
|
|
|
41631
41975
|
advertiser: { type: "string", description: "Advertiser id to unfollow", required: true }
|
|
41632
41976
|
}
|
|
41633
41977
|
});
|
|
41634
|
-
var unfollowCommand =
|
|
41978
|
+
var unfollowCommand = defineCommand210({
|
|
41635
41979
|
meta: {
|
|
41636
41980
|
name: "unfollow",
|
|
41637
41981
|
description: "Stop following a brand by advertiser id. Example: baker winning-ads unfollow adv_123"
|
|
@@ -41652,7 +41996,7 @@ var unfollowCommand = defineCommand207({
|
|
|
41652
41996
|
});
|
|
41653
41997
|
|
|
41654
41998
|
// src/commands/winning-ads/winners.ts
|
|
41655
|
-
import { defineCommand as
|
|
41999
|
+
import { defineCommand as defineCommand211 } from "citty";
|
|
41656
42000
|
registerSchema({
|
|
41657
42001
|
command: "winning-ads.winners",
|
|
41658
42002
|
description: "Top winning ads for one advertiser id (from `advertisers` or `following`). Returns lean winner cards; add --full for DNA + longevity.",
|
|
@@ -41662,7 +42006,7 @@ registerSchema({
|
|
|
41662
42006
|
platform: { type: "string", description: "Filter to a single platform: meta|linkedin", required: false }
|
|
41663
42007
|
}
|
|
41664
42008
|
});
|
|
41665
|
-
var winnersCommand =
|
|
42009
|
+
var winnersCommand = defineCommand211({
|
|
41666
42010
|
meta: {
|
|
41667
42011
|
name: "winners",
|
|
41668
42012
|
description: "Top winning ads for a specific advertiser id. Example: baker winning-ads winners adv_123 --top 15 --output md"
|
|
@@ -41712,7 +42056,7 @@ var winnersCommand = defineCommand208({
|
|
|
41712
42056
|
});
|
|
41713
42057
|
|
|
41714
42058
|
// src/commands/winning-ads/index.ts
|
|
41715
|
-
var winningAdsCommand =
|
|
42059
|
+
var winningAdsCommand = defineCommand212({
|
|
41716
42060
|
meta: {
|
|
41717
42061
|
name: "winning-ads",
|
|
41718
42062
|
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.
|
|
@@ -41784,7 +42128,7 @@ function getCliVersion() {
|
|
|
41784
42128
|
}
|
|
41785
42129
|
|
|
41786
42130
|
// src/cli.ts
|
|
41787
|
-
var main =
|
|
42131
|
+
var main = defineCommand213({
|
|
41788
42132
|
meta: {
|
|
41789
42133
|
name: "baker",
|
|
41790
42134
|
version: getCliVersion(),
|
|
@@ -41799,6 +42143,7 @@ Introspection: Run 'baker schema <command>' to inspect argument schemas.`
|
|
|
41799
42143
|
subCommands: {
|
|
41800
42144
|
capabilities: capabilitiesCommand,
|
|
41801
42145
|
actions: actionsCommand,
|
|
42146
|
+
agents: agentsCommand,
|
|
41802
42147
|
"scheduled-actions": scheduledActionsCommand,
|
|
41803
42148
|
ads: adsCommand2,
|
|
41804
42149
|
brand: brandCommand,
|