@koda-sl/baker-cli 0.309.1 → 0.311.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 +9 -0
- package/dist/cli.js +802 -507
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -120,7 +120,7 @@ import {
|
|
|
120
120
|
} from "./chunk-UIQJZGBG.js";
|
|
121
121
|
|
|
122
122
|
// src/cli.ts
|
|
123
|
-
import { defineCommand as
|
|
123
|
+
import { defineCommand as defineCommand244, runMain } from "citty";
|
|
124
124
|
|
|
125
125
|
// src/cache-flag.ts
|
|
126
126
|
var NO_CACHE_ARG = {
|
|
@@ -8733,7 +8733,7 @@ Full guide: __tooling__/docs/tools/baker/actions.md`
|
|
|
8733
8733
|
});
|
|
8734
8734
|
|
|
8735
8735
|
// src/commands/ads/index.ts
|
|
8736
|
-
import { defineCommand as
|
|
8736
|
+
import { defineCommand as defineCommand95 } from "citty";
|
|
8737
8737
|
|
|
8738
8738
|
// src/commands/ads/google/index.ts
|
|
8739
8739
|
import { defineCommand as defineCommand32 } from "citty";
|
|
@@ -22038,7 +22038,7 @@ Full guide: __tooling__/docs/tools/baker/ads-linkedin.md`
|
|
|
22038
22038
|
});
|
|
22039
22039
|
|
|
22040
22040
|
// src/commands/ads/meta/index.ts
|
|
22041
|
-
import { defineCommand as
|
|
22041
|
+
import { defineCommand as defineCommand72 } from "citty";
|
|
22042
22042
|
|
|
22043
22043
|
// src/commands/ads/meta/account.ts
|
|
22044
22044
|
import { defineCommand as defineCommand54 } from "citty";
|
|
@@ -22176,11 +22176,92 @@ Examples:
|
|
|
22176
22176
|
// src/commands/ads/meta/ads.ts
|
|
22177
22177
|
import { defineCommand as defineCommand58 } from "citty";
|
|
22178
22178
|
|
|
22179
|
-
// src/
|
|
22180
|
-
|
|
22181
|
-
|
|
22182
|
-
|
|
22183
|
-
|
|
22179
|
+
// ../api/src/ads-meta/customConversions.ts
|
|
22180
|
+
var RULE_OPERATORS = {
|
|
22181
|
+
eq: "is",
|
|
22182
|
+
neq: "is not",
|
|
22183
|
+
contains: "contains",
|
|
22184
|
+
i_contains: "contains",
|
|
22185
|
+
not_contains: "does not contain",
|
|
22186
|
+
i_not_contains: "does not contain",
|
|
22187
|
+
starts_with: "starts with",
|
|
22188
|
+
i_starts_with: "starts with",
|
|
22189
|
+
ends_with: "ends with",
|
|
22190
|
+
i_ends_with: "ends with",
|
|
22191
|
+
gt: "is more than",
|
|
22192
|
+
gte: "is at least",
|
|
22193
|
+
lt: "is less than",
|
|
22194
|
+
lte: "is at most",
|
|
22195
|
+
regex_match: "matches",
|
|
22196
|
+
exists: "exists"
|
|
22197
|
+
};
|
|
22198
|
+
function isRecord2(value) {
|
|
22199
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
22200
|
+
}
|
|
22201
|
+
var DEFAULT_CUSTOM_CONVERSION_EVENT = "PageView";
|
|
22202
|
+
function buildCustomConversionRule(input) {
|
|
22203
|
+
return {
|
|
22204
|
+
and: [
|
|
22205
|
+
{ event: { eq: input.event ?? DEFAULT_CUSTOM_CONVERSION_EVENT } },
|
|
22206
|
+
{ URL: { i_contains: input.urlContains } }
|
|
22207
|
+
]
|
|
22208
|
+
};
|
|
22209
|
+
}
|
|
22210
|
+
function customConversionRuleRefusal(rule) {
|
|
22211
|
+
return ruleNodeRefusal(rule, "rule");
|
|
22212
|
+
}
|
|
22213
|
+
function branchRefusal(key, value, path48) {
|
|
22214
|
+
if (!Array.isArray(value) || value.length === 0) {
|
|
22215
|
+
return `${path48}.${key} must be a non-empty array of conditions \u2014 an empty one counts every event the pixel sends`;
|
|
22216
|
+
}
|
|
22217
|
+
for (const [index, child] of value.entries()) {
|
|
22218
|
+
const refusal = ruleNodeRefusal(child, `${path48}.${key}[${index}]`);
|
|
22219
|
+
if (refusal) {
|
|
22220
|
+
return refusal;
|
|
22221
|
+
}
|
|
22222
|
+
}
|
|
22223
|
+
return void 0;
|
|
22224
|
+
}
|
|
22225
|
+
function conditionRefusal(key, value, path48) {
|
|
22226
|
+
return key === "and" || key === "or" ? branchRefusal(key, value, path48) : leafRefusal(key, value, path48);
|
|
22227
|
+
}
|
|
22228
|
+
function ruleNodeRefusal(node, path48) {
|
|
22229
|
+
if (!isRecord2(node)) {
|
|
22230
|
+
return `${path48} must be an object like {"URL":{"i_contains":"/thank-you"}}`;
|
|
22231
|
+
}
|
|
22232
|
+
const entries = Object.entries(node);
|
|
22233
|
+
if (entries.length === 0) {
|
|
22234
|
+
return `${path48} is empty \u2014 a rule with no condition counts every event the pixel sends`;
|
|
22235
|
+
}
|
|
22236
|
+
if (entries.length > 1) {
|
|
22237
|
+
return `${path48} names ${entries.length} conditions side by side (${entries.map(([key]) => key).join(", ")}) \u2014 Meta reads one branch or one field test per object, so combine them with {"and":[\u2026]}`;
|
|
22238
|
+
}
|
|
22239
|
+
for (const [key, value] of entries) {
|
|
22240
|
+
const refusal = conditionRefusal(key, value, path48);
|
|
22241
|
+
if (refusal) {
|
|
22242
|
+
return refusal;
|
|
22243
|
+
}
|
|
22244
|
+
}
|
|
22245
|
+
return void 0;
|
|
22246
|
+
}
|
|
22247
|
+
function leafRefusal(field, condition, path48) {
|
|
22248
|
+
if (!isRecord2(condition)) {
|
|
22249
|
+
return `${path48}.${field} must be a test like {"i_contains":"/thank-you"}, not a bare value`;
|
|
22250
|
+
}
|
|
22251
|
+
const tests = Object.entries(condition);
|
|
22252
|
+
if (tests.length === 0) {
|
|
22253
|
+
return `${path48}.${field} names no test \u2014 use one of ${Object.keys(RULE_OPERATORS).join(", ")}`;
|
|
22254
|
+
}
|
|
22255
|
+
if (tests.length > 1) {
|
|
22256
|
+
return `${path48}.${field} names ${tests.length} operators at once (${tests.map(([operator]) => operator).join(", ")}) \u2014 test a field once per condition and combine them with {"and":[\u2026]}`;
|
|
22257
|
+
}
|
|
22258
|
+
for (const [operator] of tests) {
|
|
22259
|
+
if (!RULE_OPERATORS[operator]) {
|
|
22260
|
+
return `${path48}.${field} uses "${operator}", which is not a Meta rule operator \u2014 use one of ${Object.keys(RULE_OPERATORS).join(", ")} (URL matching is i_contains, not contains or includes)`;
|
|
22261
|
+
}
|
|
22262
|
+
}
|
|
22263
|
+
return void 0;
|
|
22264
|
+
}
|
|
22184
22265
|
|
|
22185
22266
|
// ../api/src/ads-meta/leadAds.ts
|
|
22186
22267
|
var META_LEAD_ADS_NOT_ENABLED_MESSAGE = "Reading Meta instant forms and their leads is not switched on for this company. Everything else on Meta keeps working. Tell the user this needs switching on by the Baker team, and carry on with the rest of the job.";
|
|
@@ -22223,6 +22304,17 @@ var META_LIMITS = {
|
|
|
22223
22304
|
/** Website/engagement audiences below this rarely serve. */
|
|
22224
22305
|
minLookalikeSourceRows: 100,
|
|
22225
22306
|
retentionDaysMax: 180
|
|
22307
|
+
},
|
|
22308
|
+
customConversion: {
|
|
22309
|
+
nameMax: 100,
|
|
22310
|
+
descriptionMax: 500,
|
|
22311
|
+
/**
|
|
22312
|
+
* Meta's hard cap per ad account. It matters because deleting a custom
|
|
22313
|
+
* conversion archives it rather than removing it, so a chat that creates
|
|
22314
|
+
* one per campaign spends slots that only a person, in Events Manager, can
|
|
22315
|
+
* think about reclaiming.
|
|
22316
|
+
*/
|
|
22317
|
+
perAccountMax: 100
|
|
22226
22318
|
}
|
|
22227
22319
|
};
|
|
22228
22320
|
var OBJECTIVES2 = [
|
|
@@ -23017,6 +23109,16 @@ var promotedObjectSchema = z31.object({
|
|
|
23017
23109
|
page_id: parentRefSchema3.optional(),
|
|
23018
23110
|
pixel_id: z31.string().regex(NUMERIC_ID_REGEX3).optional(),
|
|
23019
23111
|
custom_event_type: z31.enum(CUSTOM_EVENT_TYPES).optional(),
|
|
23112
|
+
/**
|
|
23113
|
+
* A Custom Conversion to optimize toward, instead of a raw pixel event.
|
|
23114
|
+
* Named alone by the caller: the stage reads the conversion off Meta and
|
|
23115
|
+
* fills `pixel_id`, `custom_event_type` and `pixel_rule` from it, so the
|
|
23116
|
+
* staged payload matches what Ads Manager stores and the review shows the
|
|
23117
|
+
* event the ad set will actually chase.
|
|
23118
|
+
*/
|
|
23119
|
+
custom_conversion_id: z31.union([z31.string().regex(NUMERIC_ID_REGEX3), tempRefSchema4]).optional(),
|
|
23120
|
+
/** The custom conversion's own filter, filled by the stage. Never written by hand. */
|
|
23121
|
+
pixel_rule: z31.string().optional(),
|
|
23020
23122
|
application_id: z31.string().regex(NUMERIC_ID_REGEX3).optional(),
|
|
23021
23123
|
object_store_url: z31.string().url().optional(),
|
|
23022
23124
|
product_catalog_id: z31.string().regex(NUMERIC_ID_REGEX3).optional(),
|
|
@@ -23106,6 +23208,9 @@ function validateAdSetPromotedObject(p, ctx) {
|
|
|
23106
23208
|
return;
|
|
23107
23209
|
}
|
|
23108
23210
|
const po = p.promoted_object;
|
|
23211
|
+
const namesConversion = Boolean(po?.custom_conversion_id);
|
|
23212
|
+
const hasPixel = Boolean(po?.pixel_id) || namesConversion;
|
|
23213
|
+
const hasEventType = Boolean(po?.custom_event_type) || namesConversion;
|
|
23109
23214
|
if (OPTIMIZATION_GOALS_REQUIRING_PAGE.includes(goal) && !po?.page_id) {
|
|
23110
23215
|
ctx.addIssue({
|
|
23111
23216
|
code: "custom",
|
|
@@ -23113,25 +23218,25 @@ function validateAdSetPromotedObject(p, ctx) {
|
|
|
23113
23218
|
message: `optimization_goal ${goal} needs promoted_object.page_id \u2014 pass --page-id with the Facebook Page the leads/likes belong to`
|
|
23114
23219
|
});
|
|
23115
23220
|
}
|
|
23116
|
-
if (OPTIMIZATION_GOALS_REQUIRING_PIXEL.includes(goal) && !
|
|
23221
|
+
if (OPTIMIZATION_GOALS_REQUIRING_PIXEL.includes(goal) && !hasPixel) {
|
|
23117
23222
|
ctx.addIssue({
|
|
23118
23223
|
code: "custom",
|
|
23119
23224
|
path: ["promoted_object", "pixel_id"],
|
|
23120
|
-
message: `optimization_goal ${goal} needs promoted_object.pixel_id \u2014 pass --pixel-id with the conversion pixel`
|
|
23225
|
+
message: `optimization_goal ${goal} needs promoted_object.pixel_id \u2014 pass --pixel-id with the conversion pixel, or --custom-conversion-id to optimize toward a custom conversion`
|
|
23121
23226
|
});
|
|
23122
23227
|
}
|
|
23123
|
-
if (OPTIMIZATION_GOALS_REQUIRING_CONVERSION_SOURCE.includes(goal) && !
|
|
23228
|
+
if (OPTIMIZATION_GOALS_REQUIRING_CONVERSION_SOURCE.includes(goal) && !hasPixel && !po?.application_id) {
|
|
23124
23229
|
ctx.addIssue({
|
|
23125
23230
|
code: "custom",
|
|
23126
23231
|
path: ["promoted_object", "pixel_id"],
|
|
23127
23232
|
message: `optimization_goal ${goal} needs a conversion source \u2014 pass promoted_object.pixel_id (web value optimization) or promoted_object.application_id (app value optimization)`
|
|
23128
23233
|
});
|
|
23129
23234
|
}
|
|
23130
|
-
if ((OPTIMIZATION_GOALS_REQUIRING_PIXEL.includes(goal) || OPTIMIZATION_GOALS_REQUIRING_CONVERSION_SOURCE.includes(goal)) && !
|
|
23235
|
+
if ((OPTIMIZATION_GOALS_REQUIRING_PIXEL.includes(goal) || OPTIMIZATION_GOALS_REQUIRING_CONVERSION_SOURCE.includes(goal)) && !hasEventType) {
|
|
23131
23236
|
ctx.addIssue({
|
|
23132
23237
|
code: "custom",
|
|
23133
23238
|
path: ["promoted_object", "custom_event_type"],
|
|
23134
|
-
message: `optimization_goal ${goal} needs promoted_object.custom_event_type \u2014 pass --custom-event-type (e.g. PURCHASE, LEAD)`
|
|
23239
|
+
message: `optimization_goal ${goal} needs promoted_object.custom_event_type \u2014 pass --custom-event-type (e.g. PURCHASE, LEAD), or --custom-conversion-id to optimize toward a custom conversion`
|
|
23135
23240
|
});
|
|
23136
23241
|
}
|
|
23137
23242
|
if (OPTIMIZATION_GOALS_REQUIRING_APP.includes(goal) && !po?.application_id) {
|
|
@@ -23534,6 +23639,22 @@ var customAudienceUpdateSchema = z31.object({
|
|
|
23534
23639
|
name: z31.string().min(1).max(META_LIMITS.audience.nameMax).optional(),
|
|
23535
23640
|
description: z31.string().max(500).optional()
|
|
23536
23641
|
}).refine((p) => Object.values(p).some((val) => val !== void 0), "update needs at least one field");
|
|
23642
|
+
var customConversionCreateSchema = z31.object({
|
|
23643
|
+
name: z31.string().min(1).max(META_LIMITS.customConversion.nameMax),
|
|
23644
|
+
description: z31.string().max(META_LIMITS.customConversion.descriptionMax).optional(),
|
|
23645
|
+
/** The pixel the conversion counts from — `event_source_id` on the wire. Baker never creates pixels, so this is always a real id. */
|
|
23646
|
+
pixel_id: z31.string().regex(NUMERIC_ID_REGEX3),
|
|
23647
|
+
custom_event_type: z31.enum(CUSTOM_EVENT_TYPES),
|
|
23648
|
+
/** Meta's filter JSON. Built by `buildCustomConversionRule` for the URL case. */
|
|
23649
|
+
rule: z31.record(z31.string(), z31.unknown()),
|
|
23650
|
+
/** What one conversion is worth, when the site cannot send a value with the event. */
|
|
23651
|
+
default_conversion_value: z31.number().min(0).optional()
|
|
23652
|
+
}).superRefine((p, ctx) => {
|
|
23653
|
+
const refusal = customConversionRuleRefusal(p.rule);
|
|
23654
|
+
if (refusal) {
|
|
23655
|
+
ctx.addIssue({ code: "custom", path: ["rule"], message: refusal });
|
|
23656
|
+
}
|
|
23657
|
+
});
|
|
23537
23658
|
var mediaUploadSchema = z31.object({
|
|
23538
23659
|
kind: z31.enum(MEDIA_KINDS),
|
|
23539
23660
|
bakerImageId: bakerMediaIdSchema2.optional(),
|
|
@@ -23559,6 +23680,7 @@ var META_DRAFT_OP_KINDS = [
|
|
|
23559
23680
|
"ad.update",
|
|
23560
23681
|
"customAudience.create",
|
|
23561
23682
|
"customAudience.update",
|
|
23683
|
+
"customConversion.create",
|
|
23562
23684
|
"media.upload"
|
|
23563
23685
|
];
|
|
23564
23686
|
var metaDraftOpKindSchema = z31.enum(META_DRAFT_OP_KINDS);
|
|
@@ -23581,6 +23703,7 @@ var metaDraftOpInputSchema = z31.discriminatedUnion("kind", [
|
|
|
23581
23703
|
updateOp4("ad.update", adUpdateSchema2),
|
|
23582
23704
|
createOp4("customAudience.create", customAudienceCreateSchema),
|
|
23583
23705
|
updateOp4("customAudience.update", customAudienceUpdateSchema),
|
|
23706
|
+
createOp4("customConversion.create", customConversionCreateSchema),
|
|
23584
23707
|
createOp4("media.upload", mediaUploadSchema)
|
|
23585
23708
|
]);
|
|
23586
23709
|
|
|
@@ -23698,7 +23821,11 @@ var metaDraftErrorResponseSchema = z32.object({
|
|
|
23698
23821
|
fields: z32.array(metaFieldErrorSchema).optional()
|
|
23699
23822
|
});
|
|
23700
23823
|
|
|
23824
|
+
// src/commands/ads/meta/write-commands.ts
|
|
23825
|
+
import { defineCommand as defineCommand57 } from "citty";
|
|
23826
|
+
|
|
23701
23827
|
// src/commands/ads/meta/write-shared.ts
|
|
23828
|
+
import { readFileSync as readFileSync9 } from "fs";
|
|
23702
23829
|
function bareAccountId2(args4) {
|
|
23703
23830
|
return resolveAccountIdArg(args4).replace(/^act_/, "");
|
|
23704
23831
|
}
|
|
@@ -23945,8 +24072,71 @@ function buildPromotedObject(args4) {
|
|
|
23945
24072
|
if (args4["page-id"]) out.page_id = String(args4["page-id"]);
|
|
23946
24073
|
if (args4["pixel-id"]) out.pixel_id = String(args4["pixel-id"]);
|
|
23947
24074
|
if (args4["custom-event-type"]) out.custom_event_type = upper(args4["custom-event-type"]);
|
|
24075
|
+
if (args4["custom-conversion-id"]) out.custom_conversion_id = String(args4["custom-conversion-id"]);
|
|
23948
24076
|
return out;
|
|
23949
24077
|
}
|
|
24078
|
+
function customConversionRuleFromFlags(args4) {
|
|
24079
|
+
const urlContains = args4["url-contains"];
|
|
24080
|
+
const ruleFile = args4["rule-file"];
|
|
24081
|
+
if (urlContains && ruleFile) {
|
|
24082
|
+
failWriteValidation3(
|
|
24083
|
+
"pass either --url-contains or --rule-file, not both \u2014 they are two ways to say the same thing"
|
|
24084
|
+
);
|
|
24085
|
+
}
|
|
24086
|
+
if (ruleFile) {
|
|
24087
|
+
return loadJsonFileArg3(ruleFile);
|
|
24088
|
+
}
|
|
24089
|
+
if (!urlContains) {
|
|
24090
|
+
failWriteValidation3(
|
|
24091
|
+
"a custom conversion needs a rule \u2014 pass --url-contains '/thank-you' (the common case), or --rule-file with Meta's filter JSON"
|
|
24092
|
+
);
|
|
24093
|
+
}
|
|
24094
|
+
return buildCustomConversionRule({
|
|
24095
|
+
event: args4.event ? String(args4.event) : void 0,
|
|
24096
|
+
urlContains: String(urlContains)
|
|
24097
|
+
});
|
|
24098
|
+
}
|
|
24099
|
+
var customConversionsCreateCommand = defineCommand57({
|
|
24100
|
+
meta: {
|
|
24101
|
+
name: "create",
|
|
24102
|
+
description: `Stage a new Custom Conversion \u2014 a pixel event narrowed by a rule, which an ad set can then optimize toward. ${STAGED_NOTE2}
|
|
24103
|
+
Meta caps an account at 100 and its delete only archives one, so a duplicate is permanent: check \`baker ads meta custom-conversions\` first.
|
|
24104
|
+
Chain an ad set to it in the same chat with --custom-conversion-id meta_temp_*.
|
|
24105
|
+
Example: baker ads meta custom-conversions create --name "Lead formulario" --pixel-id 645971030024859 --custom-event-type LEAD --url-contains "/gracias"`
|
|
24106
|
+
},
|
|
24107
|
+
args: {
|
|
24108
|
+
...accountArgs2,
|
|
24109
|
+
name: { type: "string", description: "What the marketer will see in Events Manager and in reports" },
|
|
24110
|
+
"pixel-id": { type: "string", description: "The pixel it counts from \u2014 from `baker ads meta pixels`" },
|
|
24111
|
+
"custom-event-type": {
|
|
24112
|
+
type: "string",
|
|
24113
|
+
description: "Event category Meta files it under: LEAD|PURCHASE|COMPLETE_REGISTRATION|CONTACT|\u2026"
|
|
24114
|
+
},
|
|
24115
|
+
"url-contains": {
|
|
24116
|
+
type: "string",
|
|
24117
|
+
description: "Count the event when the URL contains this, e.g. '/gracias'. The common case."
|
|
24118
|
+
},
|
|
24119
|
+
event: { type: "string", description: "Pixel event the URL narrows (default PageView)" },
|
|
24120
|
+
"rule-file": { type: "string", description: "JSON file with Meta's raw filter, instead of --url-contains" },
|
|
24121
|
+
description: { type: "string", description: "Free-text note shown in Events Manager" },
|
|
24122
|
+
value: { type: "string", description: "Default value of one conversion, when the site sends no value" }
|
|
24123
|
+
},
|
|
24124
|
+
run: async ({ args: args4 }) => {
|
|
24125
|
+
const accountId = bareAccountId2(args4);
|
|
24126
|
+
await stageOp2({
|
|
24127
|
+
kind: "customConversion.create",
|
|
24128
|
+
accountId,
|
|
24129
|
+
payload: {
|
|
24130
|
+
name: args4.name,
|
|
24131
|
+
description: args4.description,
|
|
24132
|
+
pixel_id: args4["pixel-id"] ? String(args4["pixel-id"]) : void 0,
|
|
24133
|
+
custom_event_type: upper(args4["custom-event-type"]),
|
|
24134
|
+
rule: customConversionRuleFromFlags(args4),
|
|
24135
|
+
default_conversion_value: numberFlag(args4.value, "--value")
|
|
24136
|
+
}
|
|
24137
|
+
});
|
|
24138
|
+
}
|
|
24139
|
+
});
|
|
23950
24140
|
var adSetWriteArgs = {
|
|
23951
24141
|
...accountArgs2,
|
|
23952
24142
|
name: { type: "string", description: "Ad set name" },
|
|
@@ -23972,6 +24162,10 @@ var adSetWriteArgs = {
|
|
|
23972
24162
|
},
|
|
23973
24163
|
"pixel-id": { type: "string", description: "promoted_object.pixel_id shortcut" },
|
|
23974
24164
|
"custom-event-type": { type: "string", description: "promoted_object.custom_event_type (PURCHASE|LEAD|\u2026)" },
|
|
24165
|
+
"custom-conversion-id": {
|
|
24166
|
+
type: "string",
|
|
24167
|
+
description: "Optimize toward a Custom Conversion \u2014 the id from `baker ads meta custom-conversions`. Use it instead of --pixel-id/--custom-event-type, not alongside: Baker reads the conversion off Meta and fills its pixel, event category and rule."
|
|
24168
|
+
},
|
|
23975
24169
|
file: { type: "string", description: "JSON file with the full payload; flags override" }
|
|
23976
24170
|
};
|
|
23977
24171
|
var adSetsCreateCommand = defineCommand57({
|
|
@@ -23980,6 +24174,7 @@ var adSetsCreateCommand = defineCommand57({
|
|
|
23980
24174
|
description: `Stage a new ad set. ${STAGED_NOTE2}
|
|
23981
24175
|
Chain to a campaign with --campaign (real id or meta_temp_* ref).
|
|
23982
24176
|
Lead-form goals (LEAD_GENERATION, QUALITY_LEAD) and PAGE_LIKES need --page-id (the Facebook Page the leads/likes belong to).
|
|
24177
|
+
Conversion goals take EITHER --pixel-id + --custom-event-type (a standard event) OR --custom-conversion-id (the marketer's own conversion, from 'baker ads meta custom-conversions').
|
|
23983
24178
|
Example: baker ads meta adsets create --campaign meta_temp_ab12 --name "US 25-54" --optimization-goal LINK_CLICKS --billing-event IMPRESSIONS --daily-budget 50 --targeting-file t.json`
|
|
23984
24179
|
},
|
|
23985
24180
|
args: { campaign: { type: "string", description: "Parent campaign id or meta_temp_* ref" }, ...adSetWriteArgs },
|
|
@@ -24765,8 +24960,106 @@ Examples:
|
|
|
24765
24960
|
default: "list"
|
|
24766
24961
|
});
|
|
24767
24962
|
|
|
24768
|
-
// src/commands/ads/meta/
|
|
24963
|
+
// src/commands/ads/meta/custom-conversions.ts
|
|
24769
24964
|
import { defineCommand as defineCommand64 } from "citty";
|
|
24965
|
+
function compactCustomConversion(row) {
|
|
24966
|
+
return {
|
|
24967
|
+
id: row.id,
|
|
24968
|
+
name: row.name,
|
|
24969
|
+
custom_event_type: row.custom_event_type,
|
|
24970
|
+
counts: row.rule_summary,
|
|
24971
|
+
pixel_id: row.pixel?.id,
|
|
24972
|
+
last_fired_time: row.last_fired_time,
|
|
24973
|
+
...row.is_archived ? { archived: true } : {},
|
|
24974
|
+
...row.is_unavailable ? { unavailable: true } : {}
|
|
24975
|
+
};
|
|
24976
|
+
}
|
|
24977
|
+
function customConversionHints(rows) {
|
|
24978
|
+
if (rows.length === 0) {
|
|
24979
|
+
return [
|
|
24980
|
+
"This account has no custom conversions. Optimize toward a standard pixel event instead (`--pixel-id` + `--custom-event-type`), or ask the user to create one in Events Manager."
|
|
24981
|
+
];
|
|
24982
|
+
}
|
|
24983
|
+
const hints2 = [
|
|
24984
|
+
"To optimize an ad set toward one: `baker ads meta adsets create \u2026 --optimization-goal OFFSITE_CONVERSIONS --custom-conversion-id <id>`. Baker fills the pixel and the event category from the conversion \u2014 do not also pass --pixel-id or --custom-event-type."
|
|
24985
|
+
];
|
|
24986
|
+
const neverFired = rows.filter((row) => !row.is_archived && !row.last_fired_time);
|
|
24987
|
+
if (neverFired.length > 0) {
|
|
24988
|
+
hints2.push(
|
|
24989
|
+
`${neverFired.length === 1 ? "This conversion has" : `${neverFired.length} of these have`} never fired (${neverFired.map((row) => row.name ?? row.id).join(
|
|
24990
|
+
", "
|
|
24991
|
+
)}). Meta cannot optimize toward an event it has never seen, so an ad set pointed at one delivers without learning \u2014 check the rule matches a page the site actually serves before spending on it.`
|
|
24992
|
+
);
|
|
24993
|
+
}
|
|
24994
|
+
return hints2;
|
|
24995
|
+
}
|
|
24996
|
+
registerSchema({
|
|
24997
|
+
command: "ads.meta.custom-conversions",
|
|
24998
|
+
description: "List the Custom Conversions defined on a Meta ad account \u2014 the measurement objects a marketer sets up in Events Manager (a pixel event narrowed by a rule, e.g. 'PageView on /thank-you'). Start here whenever the user talks about their own conversions rather than a standard event: an ad set optimizes toward one with `adsets create --custom-conversion-id <id>`.",
|
|
24999
|
+
args: {
|
|
25000
|
+
"account-id": { type: "string", description: "Meta ad account ID (act_123)", required: false },
|
|
25001
|
+
full: { type: "boolean", description: "Include the raw rule JSON, retention and creation times", required: false },
|
|
25002
|
+
limit: { type: "string", description: "Max rows", required: false },
|
|
25003
|
+
"no-cache": { type: "boolean", description: "Bypass the cache", required: false },
|
|
25004
|
+
output: { type: "string", description: "json|csv", required: false, default: "json" }
|
|
25005
|
+
}
|
|
25006
|
+
});
|
|
25007
|
+
var listArgs9 = {
|
|
25008
|
+
"account-id": { type: "string", description: "Meta ad account ID" },
|
|
25009
|
+
full: { type: "boolean", description: "Include the raw rule JSON, retention and creation times" },
|
|
25010
|
+
limit: { type: "string", description: "Max rows" },
|
|
25011
|
+
"no-cache": NO_CACHE_ARG,
|
|
25012
|
+
output: { type: "string", description: "Output format", default: "json" }
|
|
25013
|
+
};
|
|
25014
|
+
var listCommand9 = defineCommand64({
|
|
25015
|
+
meta: {
|
|
25016
|
+
name: "list",
|
|
25017
|
+
description: "List custom conversions. Runs by default when no subcommand is given. Example: baker ads meta custom-conversions --account-id act_123"
|
|
25018
|
+
},
|
|
25019
|
+
args: listArgs9,
|
|
25020
|
+
run: async ({ args: args4 }) => {
|
|
25021
|
+
const accountId = resolveAccountIdArg(args4);
|
|
25022
|
+
try {
|
|
25023
|
+
const params = { "account-id": accountId };
|
|
25024
|
+
if (args4.limit) params.limit = args4.limit;
|
|
25025
|
+
if (args4["no-cache"]) params["skip-cache"] = "true";
|
|
25026
|
+
const rows = await apiGet("/api/ads/meta/custom-conversions", params);
|
|
25027
|
+
const data = args4.full ? rows.map((row) => ({ ...row })) : rows.map((row) => ({ ...compactCustomConversion(row) }));
|
|
25028
|
+
const fmt = csvOrJson(args4);
|
|
25029
|
+
if (fmt !== "json") {
|
|
25030
|
+
writeAdsOutput(data, fmt);
|
|
25031
|
+
return;
|
|
25032
|
+
}
|
|
25033
|
+
writeJsonEnvelope({ ok: true, data, hints: customConversionHints(rows) });
|
|
25034
|
+
} catch (err) {
|
|
25035
|
+
handleMetaError(err);
|
|
25036
|
+
}
|
|
25037
|
+
}
|
|
25038
|
+
});
|
|
25039
|
+
var customConversionsCommand = defineCommand64({
|
|
25040
|
+
meta: {
|
|
25041
|
+
name: "custom-conversions",
|
|
25042
|
+
description: `List the Custom Conversions on an ad account, or stage a new one \u2014 a pixel event narrowed by a rule, set up in Events Manager.
|
|
25043
|
+
Use this whenever the user says "my conversions" rather than naming a standard event: the id here is what an ad set optimizes toward.
|
|
25044
|
+
|
|
25045
|
+
Examples:
|
|
25046
|
+
baker ads meta custom-conversions --account-id act_123
|
|
25047
|
+
baker ads meta custom-conversions --account-id act_123 --full # raw rule JSON
|
|
25048
|
+
baker ads meta custom-conversions create --name "Lead formulario" --pixel-id 9988 --custom-event-type LEAD --url-contains "/gracias"`
|
|
25049
|
+
},
|
|
25050
|
+
subCommands: {
|
|
25051
|
+
list: listCommand9,
|
|
25052
|
+
create: customConversionsCreateCommand
|
|
25053
|
+
},
|
|
25054
|
+
// `args` stays even though the parent has no `run`: citty scans rawArgs for
|
|
25055
|
+
// the subcommand name using THIS command's arg defs. `default` (not `run`)
|
|
25056
|
+
// dispatches the bare invocation.
|
|
25057
|
+
args: listArgs9,
|
|
25058
|
+
default: "list"
|
|
25059
|
+
});
|
|
25060
|
+
|
|
25061
|
+
// src/commands/ads/meta/draft.ts
|
|
25062
|
+
import { defineCommand as defineCommand65 } from "citty";
|
|
24770
25063
|
async function listDraft2(chat) {
|
|
24771
25064
|
try {
|
|
24772
25065
|
const chatId = resolveChatId(chat);
|
|
@@ -24776,7 +25069,7 @@ async function listDraft2(chat) {
|
|
|
24776
25069
|
handleMetaError(err);
|
|
24777
25070
|
}
|
|
24778
25071
|
}
|
|
24779
|
-
var
|
|
25072
|
+
var listCommand10 = defineCommand65({
|
|
24780
25073
|
meta: {
|
|
24781
25074
|
name: "list",
|
|
24782
25075
|
description: "Show every Meta write op staged in this chat, its dependencies, and post-publish results. Publishing reaches the real ad account, so review this before you finish. Example: baker ads meta draft"
|
|
@@ -24786,7 +25079,7 @@ var listCommand9 = defineCommand64({
|
|
|
24786
25079
|
await listDraft2(args4.chat);
|
|
24787
25080
|
}
|
|
24788
25081
|
});
|
|
24789
|
-
var showCommand2 =
|
|
25082
|
+
var showCommand2 = defineCommand65({
|
|
24790
25083
|
meta: {
|
|
24791
25084
|
name: "show",
|
|
24792
25085
|
description: "Print the full staged payload for one op \u2014 the receipt to verify a change looks right before publish (never truncated). Example: baker ads meta draft show meta_temp_abc123"
|
|
@@ -24808,7 +25101,7 @@ var showCommand2 = defineCommand64({
|
|
|
24808
25101
|
}
|
|
24809
25102
|
}
|
|
24810
25103
|
});
|
|
24811
|
-
var removeCommand3 =
|
|
25104
|
+
var removeCommand3 = defineCommand65({
|
|
24812
25105
|
meta: {
|
|
24813
25106
|
name: "remove",
|
|
24814
25107
|
description: "Drop one staged Meta op. Removing a create cascades to everything that depends on it. Example: baker ads meta draft remove meta_temp_abc123"
|
|
@@ -24829,7 +25122,7 @@ var removeCommand3 = defineCommand64({
|
|
|
24829
25122
|
}
|
|
24830
25123
|
}
|
|
24831
25124
|
});
|
|
24832
|
-
var clearCommand3 =
|
|
25125
|
+
var clearCommand3 = defineCommand65({
|
|
24833
25126
|
meta: {
|
|
24834
25127
|
name: "clear",
|
|
24835
25128
|
description: "Discard ALL staged Meta ops in this chat's draft \u2014 nothing will apply on publish. Example: baker ads meta draft clear"
|
|
@@ -24846,7 +25139,7 @@ var clearCommand3 = defineCommand64({
|
|
|
24846
25139
|
}
|
|
24847
25140
|
}
|
|
24848
25141
|
});
|
|
24849
|
-
var metaDraftCommand =
|
|
25142
|
+
var metaDraftCommand = defineCommand65({
|
|
24850
25143
|
meta: {
|
|
24851
25144
|
name: "draft",
|
|
24852
25145
|
description: "Review and edit the Meta write ops staged in this chat BEFORE publish. Subcommands: list (default), show, remove, clear. Ops never hit Meta until the chat is published. `list` and `show` take --chat <id> to read an earlier chat's changes instead."
|
|
@@ -24854,7 +25147,7 @@ var metaDraftCommand = defineCommand64({
|
|
|
24854
25147
|
// Declared on the parent too: `default: "list"` dispatches the bare `draft --chat <id>` form, and
|
|
24855
25148
|
// citty prints help for a flag the parent does not know instead of forwarding it.
|
|
24856
25149
|
args: { chat: CHAT_READ_ARG },
|
|
24857
|
-
subCommands: { list:
|
|
25150
|
+
subCommands: { list: listCommand10, show: showCommand2, remove: removeCommand3, clear: clearCommand3 },
|
|
24858
25151
|
// `default` (not `run`) dispatches the bare invocation: citty falls through to `run`
|
|
24859
25152
|
// after dispatching a subcommand, so a `run` here would list the draft a second time
|
|
24860
25153
|
// on every `draft list` / `draft remove` / `draft clear`.
|
|
@@ -24862,7 +25155,7 @@ var metaDraftCommand = defineCommand64({
|
|
|
24862
25155
|
});
|
|
24863
25156
|
|
|
24864
25157
|
// src/commands/ads/meta/insights.ts
|
|
24865
|
-
import { defineCommand as
|
|
25158
|
+
import { defineCommand as defineCommand66 } from "citty";
|
|
24866
25159
|
|
|
24867
25160
|
// src/commands/ads/meta/placement-delivery.ts
|
|
24868
25161
|
var MIN_IMPRESSIONS = 20;
|
|
@@ -25147,7 +25440,7 @@ function sortRowsBySpendDesc(rows) {
|
|
|
25147
25440
|
return sb - sa;
|
|
25148
25441
|
});
|
|
25149
25442
|
}
|
|
25150
|
-
var insightsCommand =
|
|
25443
|
+
var insightsCommand = defineCommand66({
|
|
25151
25444
|
meta: {
|
|
25152
25445
|
name: "insights",
|
|
25153
25446
|
description: `Performance reporting \u2014 the main Meta tool for AI agents.
|
|
@@ -25255,7 +25548,7 @@ Async is automatic for heavy queries; pass --async to force it, or --no-async to
|
|
|
25255
25548
|
});
|
|
25256
25549
|
|
|
25257
25550
|
// src/commands/ads/meta/leads.ts
|
|
25258
|
-
import { defineCommand as
|
|
25551
|
+
import { defineCommand as defineCommand67 } from "citty";
|
|
25259
25552
|
registerSchema({
|
|
25260
25553
|
command: "ads.meta.lead-forms",
|
|
25261
25554
|
description: "List the instant (lead) forms on a Facebook Page, with how many leads each has collected. Start here: a lead is fetched by form id, and `baker ads meta pages` gives the page id.",
|
|
@@ -25330,7 +25623,7 @@ function leadPageHints(page, full) {
|
|
|
25330
25623
|
}
|
|
25331
25624
|
return hints2;
|
|
25332
25625
|
}
|
|
25333
|
-
var leadFormsCommand2 =
|
|
25626
|
+
var leadFormsCommand2 = defineCommand67({
|
|
25334
25627
|
meta: {
|
|
25335
25628
|
name: "lead-forms",
|
|
25336
25629
|
description: `List the instant (lead) forms on a Facebook Page, with each form's lead count. A lead is read by form id, so start here \u2014 get the Page id from \`baker ads meta pages\`.
|
|
@@ -25365,7 +25658,7 @@ Examples:
|
|
|
25365
25658
|
}
|
|
25366
25659
|
}
|
|
25367
25660
|
});
|
|
25368
|
-
var leadsCommand2 =
|
|
25661
|
+
var leadsCommand2 = defineCommand67({
|
|
25369
25662
|
meta: {
|
|
25370
25663
|
name: "leads",
|
|
25371
25664
|
description: `Read the leads an instant form collected. Every question comes back; email and phone answers are MASKED unless you pass --full, so you can report on what a form is collecting without moving contact details around.
|
|
@@ -25423,8 +25716,8 @@ Results are PAGED. A response carrying \`nextCursor\` is not the whole set \u201
|
|
|
25423
25716
|
});
|
|
25424
25717
|
|
|
25425
25718
|
// src/commands/ads/meta/media.ts
|
|
25426
|
-
import { defineCommand as
|
|
25427
|
-
var metaMediaCommand =
|
|
25719
|
+
import { defineCommand as defineCommand68 } from "citty";
|
|
25720
|
+
var metaMediaCommand = defineCommand68({
|
|
25428
25721
|
meta: {
|
|
25429
25722
|
name: "media",
|
|
25430
25723
|
description: "Stage Baker library media uploads to Meta so creatives can reference them. Subcommand: upload. Publishes an ad-image hash or video id a creative binds via --image-ref/--video-ref."
|
|
@@ -25433,7 +25726,7 @@ var metaMediaCommand = defineCommand67({
|
|
|
25433
25726
|
});
|
|
25434
25727
|
|
|
25435
25728
|
// src/commands/ads/meta/pages.ts
|
|
25436
|
-
import { defineCommand as
|
|
25729
|
+
import { defineCommand as defineCommand69 } from "citty";
|
|
25437
25730
|
function advertisablePages(data) {
|
|
25438
25731
|
return data.filter((p) => Array.isArray(p.tasks) && p.tasks.includes("ADVERTISE"));
|
|
25439
25732
|
}
|
|
@@ -25451,7 +25744,7 @@ function pageSelectionHints(data) {
|
|
|
25451
25744
|
}
|
|
25452
25745
|
return [];
|
|
25453
25746
|
}
|
|
25454
|
-
var pagesCommand =
|
|
25747
|
+
var pagesCommand = defineCommand69({
|
|
25455
25748
|
meta: {
|
|
25456
25749
|
name: "pages",
|
|
25457
25750
|
description: `List the Facebook Pages the connected user manages. Every Meta ad publishes from a Page, so use this to identify the Page an ad should run from. The 'tasks' field shows what the user can do on each Page (ADVERTISE means it can back ads). If exactly one Page can ADVERTISE, use it; if more than one can, confirm with the user which Page to use; if none can, ask the user to grant Advertise access \u2014 a wrong or non-advertising Page publishes under the wrong brand identity.
|
|
@@ -25482,8 +25775,8 @@ Examples:
|
|
|
25482
25775
|
});
|
|
25483
25776
|
|
|
25484
25777
|
// src/commands/ads/meta/pixels.ts
|
|
25485
|
-
import { defineCommand as
|
|
25486
|
-
var pixelsCommand =
|
|
25778
|
+
import { defineCommand as defineCommand70 } from "citty";
|
|
25779
|
+
var pixelsCommand = defineCommand70({
|
|
25487
25780
|
meta: {
|
|
25488
25781
|
name: "pixels",
|
|
25489
25782
|
description: `List Meta Pixels for an ad account, or fetch firing stats for one pixel.
|
|
@@ -25565,7 +25858,7 @@ function emit(data, args4, warnings = []) {
|
|
|
25565
25858
|
|
|
25566
25859
|
// src/commands/ads/meta/preview.ts
|
|
25567
25860
|
import { writeFileSync as writeFileSync2 } from "fs";
|
|
25568
|
-
import { defineCommand as
|
|
25861
|
+
import { defineCommand as defineCommand71 } from "citty";
|
|
25569
25862
|
var VALID_AD_FORMATS = [
|
|
25570
25863
|
"DESKTOP_FEED_STANDARD",
|
|
25571
25864
|
"MOBILE_FEED_STANDARD",
|
|
@@ -25627,7 +25920,7 @@ function listPlacements() {
|
|
|
25627
25920
|
const instagram = Object.keys(INSTAGRAM_PREVIEW_FORMATS).join(", ");
|
|
25628
25921
|
return `facebook \u2014 ${facebook}; instagram \u2014 ${instagram}`;
|
|
25629
25922
|
}
|
|
25630
|
-
var previewCommand2 =
|
|
25923
|
+
var previewCommand2 = defineCommand71({
|
|
25631
25924
|
meta: {
|
|
25632
25925
|
name: "preview",
|
|
25633
25926
|
description: `Generate a Meta-hosted preview iframe for a creative or ad. Returns iframe HTML which you
|
|
@@ -25706,7 +25999,7 @@ Examples:
|
|
|
25706
25999
|
});
|
|
25707
26000
|
|
|
25708
26001
|
// src/commands/ads/meta/index.ts
|
|
25709
|
-
var metaCommand =
|
|
26002
|
+
var metaCommand = defineCommand72({
|
|
25710
26003
|
meta: {
|
|
25711
26004
|
name: "meta",
|
|
25712
26005
|
description: `Meta Marketing API \u2014 AI-first command surface (Facebook + Instagram ads).
|
|
@@ -25729,6 +26022,7 @@ Drill in:
|
|
|
25729
26022
|
baker ads meta account --account-id act_123 \u2014 currency, balance, business
|
|
25730
26023
|
baker ads meta creatives --creative-id 9988 \u2014 single creative detail
|
|
25731
26024
|
baker ads meta audiences --account-id act_123
|
|
26025
|
+
baker ads meta custom-conversions --account-id act_123 \u2014 the marketer's own conversions ("my conversions")
|
|
25732
26026
|
baker ads meta pixels --account-id act_123 \u2014 pixel list
|
|
25733
26027
|
baker ads meta pixels --pixel-id 9988 --stats --days 7 \u2014 firing health
|
|
25734
26028
|
|
|
@@ -25757,6 +26051,7 @@ Full guide: __tooling__/docs/tools/baker/ads-meta.md`
|
|
|
25757
26051
|
ads: adsListCommand,
|
|
25758
26052
|
creatives: creativesCommand2,
|
|
25759
26053
|
audiences: audiencesCommand3,
|
|
26054
|
+
"custom-conversions": customConversionsCommand,
|
|
25760
26055
|
pixels: pixelsCommand,
|
|
25761
26056
|
activities: activitiesCommand,
|
|
25762
26057
|
insights: insightsCommand,
|
|
@@ -25767,10 +26062,10 @@ Full guide: __tooling__/docs/tools/baker/ads-meta.md`
|
|
|
25767
26062
|
});
|
|
25768
26063
|
|
|
25769
26064
|
// src/commands/ads/x/index.ts
|
|
25770
|
-
import { defineCommand as
|
|
26065
|
+
import { defineCommand as defineCommand94 } from "citty";
|
|
25771
26066
|
|
|
25772
26067
|
// src/commands/ads/x/accounts.ts
|
|
25773
|
-
import { defineCommand as
|
|
26068
|
+
import { defineCommand as defineCommand73 } from "citty";
|
|
25774
26069
|
|
|
25775
26070
|
// src/commands/ads/x/output.ts
|
|
25776
26071
|
var ACCOUNTS_CACHE_TTL_MS = 60 * 60 * 1e3;
|
|
@@ -25895,7 +26190,7 @@ function handleAccountsError2(err) {
|
|
|
25895
26190
|
writeAdsJson({ ok: false, error: { code: "NETWORK_ERROR", message: "Unexpected error" } });
|
|
25896
26191
|
process.exit(1);
|
|
25897
26192
|
}
|
|
25898
|
-
var accountsCommand4 =
|
|
26193
|
+
var accountsCommand4 = defineCommand73({
|
|
25899
26194
|
meta: {
|
|
25900
26195
|
name: "accounts",
|
|
25901
26196
|
description: `List accessible X Ads accounts. Returns account IDs needed for all other commands.
|
|
@@ -25935,7 +26230,7 @@ Examples:
|
|
|
25935
26230
|
});
|
|
25936
26231
|
|
|
25937
26232
|
// src/commands/ads/x/active-entities.ts
|
|
25938
|
-
import { defineCommand as
|
|
26233
|
+
import { defineCommand as defineCommand74 } from "citty";
|
|
25939
26234
|
|
|
25940
26235
|
// src/commands/ads/x/error-parser.ts
|
|
25941
26236
|
function mapXErrorCode(message) {
|
|
@@ -26019,7 +26314,7 @@ function parseCsv2(v) {
|
|
|
26019
26314
|
const parts = v.split(",").map((s) => s.trim()).filter(Boolean);
|
|
26020
26315
|
return parts.length > 0 ? parts : void 0;
|
|
26021
26316
|
}
|
|
26022
|
-
var activeEntitiesCommand =
|
|
26317
|
+
var activeEntitiesCommand = defineCommand74({
|
|
26023
26318
|
meta: {
|
|
26024
26319
|
name: "active-entities",
|
|
26025
26320
|
description: `List entities with metric activity in a time range.
|
|
@@ -26077,7 +26372,7 @@ Examples:
|
|
|
26077
26372
|
});
|
|
26078
26373
|
|
|
26079
26374
|
// src/commands/ads/x/audiences.ts
|
|
26080
|
-
import { defineCommand as
|
|
26375
|
+
import { defineCommand as defineCommand75 } from "citty";
|
|
26081
26376
|
registerSchema({
|
|
26082
26377
|
command: "ads.x.audiences",
|
|
26083
26378
|
description: "List custom audiences for an X Ads account. Returns id, name, audience_size, audience_type, targetable status. Audiences need 100+ active users in the past 90 days to be targetable.",
|
|
@@ -26087,7 +26382,7 @@ registerSchema({
|
|
|
26087
26382
|
output: { type: "string", description: "Format: json|csv|md", required: false, default: "json" }
|
|
26088
26383
|
}
|
|
26089
26384
|
});
|
|
26090
|
-
var audiencesCommand4 =
|
|
26385
|
+
var audiencesCommand4 = defineCommand75({
|
|
26091
26386
|
meta: {
|
|
26092
26387
|
name: "audiences",
|
|
26093
26388
|
description: `List X Ads custom audiences.
|
|
@@ -26136,10 +26431,10 @@ Examples:
|
|
|
26136
26431
|
});
|
|
26137
26432
|
|
|
26138
26433
|
// src/commands/ads/x/campaigns.ts
|
|
26139
|
-
import { defineCommand as
|
|
26434
|
+
import { defineCommand as defineCommand77 } from "citty";
|
|
26140
26435
|
|
|
26141
26436
|
// src/commands/ads/x/campaign-writes.ts
|
|
26142
|
-
import { defineCommand as
|
|
26437
|
+
import { defineCommand as defineCommand76 } from "citty";
|
|
26143
26438
|
|
|
26144
26439
|
// src/commands/ads/x/write-shared.ts
|
|
26145
26440
|
function failWriteValidation4(message) {
|
|
@@ -26294,7 +26589,7 @@ registerSchema({
|
|
|
26294
26589
|
"budget-optimization": { type: "string", description: "CAMPAIGN | LINE_ITEM", required: false }
|
|
26295
26590
|
}
|
|
26296
26591
|
});
|
|
26297
|
-
var campaignsCreateCommand3 =
|
|
26592
|
+
var campaignsCreateCommand3 = defineCommand76({
|
|
26298
26593
|
meta: {
|
|
26299
26594
|
name: "create",
|
|
26300
26595
|
description: `Stage a new campaign (applies when the chat is published).
|
|
@@ -26339,7 +26634,7 @@ registerSchema({
|
|
|
26339
26634
|
"budget-optimization": { type: "string", description: "CAMPAIGN | LINE_ITEM", required: false }
|
|
26340
26635
|
}
|
|
26341
26636
|
});
|
|
26342
|
-
var campaignsUpdateCommand3 =
|
|
26637
|
+
var campaignsUpdateCommand3 = defineCommand76({
|
|
26343
26638
|
meta: {
|
|
26344
26639
|
name: "update",
|
|
26345
26640
|
description: `Stage a change to a campaign.
|
|
@@ -26381,7 +26676,7 @@ function statusCommand4(name, status) {
|
|
|
26381
26676
|
"account-id": { type: "string", description: "X Ads account ID", required: false }
|
|
26382
26677
|
}
|
|
26383
26678
|
});
|
|
26384
|
-
return
|
|
26679
|
+
return defineCommand76({
|
|
26385
26680
|
meta: {
|
|
26386
26681
|
name,
|
|
26387
26682
|
description: `Stage ${name === "pause" ? "pausing" : "resuming"} campaigns.
|
|
@@ -26471,7 +26766,7 @@ registerSchema({
|
|
|
26471
26766
|
output: { type: "string", description: "Format: json|csv|md", required: false, default: "json" }
|
|
26472
26767
|
}
|
|
26473
26768
|
});
|
|
26474
|
-
var
|
|
26769
|
+
var listArgs10 = {
|
|
26475
26770
|
"account-id": { type: "string", description: "X Ads account ID" },
|
|
26476
26771
|
"funding-instrument-ids": { type: "string", description: "CSV of funding instrument IDs" },
|
|
26477
26772
|
"campaign-ids": { type: "string", description: "CSV of campaign IDs" },
|
|
@@ -26479,7 +26774,7 @@ var listArgs9 = {
|
|
|
26479
26774
|
"no-cache": { type: "boolean", description: "Skip cache" },
|
|
26480
26775
|
output: { type: "string", description: "Format: json|csv|md", default: "json" }
|
|
26481
26776
|
};
|
|
26482
|
-
var campaignsListCommand2 =
|
|
26777
|
+
var campaignsListCommand2 = defineCommand77({
|
|
26483
26778
|
meta: {
|
|
26484
26779
|
name: "campaigns",
|
|
26485
26780
|
description: `List X Ads campaigns. Returns budget, schedule, funding instrument, status.
|
|
@@ -26519,7 +26814,7 @@ Examples:
|
|
|
26519
26814
|
});
|
|
26520
26815
|
}
|
|
26521
26816
|
});
|
|
26522
|
-
var campaignsCommand4 =
|
|
26817
|
+
var campaignsCommand4 = defineCommand77({
|
|
26523
26818
|
meta: {
|
|
26524
26819
|
name: "campaigns",
|
|
26525
26820
|
description: `X Ads campaigns \u2014 read them, or stage a change that applies when the chat is published.
|
|
@@ -26541,12 +26836,12 @@ Examples:
|
|
|
26541
26836
|
},
|
|
26542
26837
|
// A parent must never declare `run`: citty falls through to it AFTER the
|
|
26543
26838
|
// matched subcommand, so every write would also trigger a full live list.
|
|
26544
|
-
args:
|
|
26839
|
+
args: listArgs10,
|
|
26545
26840
|
default: "list"
|
|
26546
26841
|
});
|
|
26547
26842
|
|
|
26548
26843
|
// src/commands/ads/x/cards.ts
|
|
26549
|
-
import { defineCommand as
|
|
26844
|
+
import { defineCommand as defineCommand78 } from "citty";
|
|
26550
26845
|
registerSchema({
|
|
26551
26846
|
command: "ads.x.cards",
|
|
26552
26847
|
description: "List website cards, video cards, and carousels for an X Ads account.",
|
|
@@ -26556,7 +26851,7 @@ registerSchema({
|
|
|
26556
26851
|
output: { type: "string", description: "Format: json|csv|md", required: false, default: "json" }
|
|
26557
26852
|
}
|
|
26558
26853
|
});
|
|
26559
|
-
var cardsCommand =
|
|
26854
|
+
var cardsCommand = defineCommand78({
|
|
26560
26855
|
meta: {
|
|
26561
26856
|
name: "cards",
|
|
26562
26857
|
description: `List X Ads cards (rich creatives).
|
|
@@ -26606,7 +26901,7 @@ Examples:
|
|
|
26606
26901
|
|
|
26607
26902
|
// src/commands/ads/x/draft.ts
|
|
26608
26903
|
import { readFileSync as readFileSync10 } from "fs";
|
|
26609
|
-
import { defineCommand as
|
|
26904
|
+
import { defineCommand as defineCommand79 } from "citty";
|
|
26610
26905
|
|
|
26611
26906
|
// src/commands/ads/x/draft-status.ts
|
|
26612
26907
|
var OPERATION_LABELS3 = {
|
|
@@ -26739,7 +27034,7 @@ async function listDraft3(json, chat) {
|
|
|
26739
27034
|
handleDraftError(err);
|
|
26740
27035
|
}
|
|
26741
27036
|
}
|
|
26742
|
-
var
|
|
27037
|
+
var listCommand11 = defineCommand79({
|
|
26743
27038
|
meta: {
|
|
26744
27039
|
name: "list",
|
|
26745
27040
|
description: "Review everything staged as a Campaign \u25B8 Ad group \u25B8 Ad tree. Example: baker ads x draft"
|
|
@@ -26760,7 +27055,7 @@ registerSchema({
|
|
|
26760
27055
|
chat: { type: "string", description: "Read another chat's draft instead of this one", required: false }
|
|
26761
27056
|
}
|
|
26762
27057
|
});
|
|
26763
|
-
var showCommand3 =
|
|
27058
|
+
var showCommand3 = defineCommand79({
|
|
26764
27059
|
meta: {
|
|
26765
27060
|
name: "show",
|
|
26766
27061
|
description: "Show one staged op in full. Example: baker ads x draft show x_temp_abc123"
|
|
@@ -26790,7 +27085,7 @@ registerSchema({
|
|
|
26790
27085
|
patch: { type: "string", description: "JSON object, or @path to a file holding one", required: true }
|
|
26791
27086
|
}
|
|
26792
27087
|
});
|
|
26793
|
-
var amendCommand2 =
|
|
27088
|
+
var amendCommand2 = defineCommand79({
|
|
26794
27089
|
meta: {
|
|
26795
27090
|
name: "amend",
|
|
26796
27091
|
description: `Change a staged op in place.
|
|
@@ -26831,7 +27126,7 @@ registerSchema({
|
|
|
26831
27126
|
description: "Drop one staged X op. Removing a create cascades to everything staged that depends on it.",
|
|
26832
27127
|
args: { ref: { type: "string", description: "Op ref or target id", required: true } }
|
|
26833
27128
|
});
|
|
26834
|
-
var removeCommand4 =
|
|
27129
|
+
var removeCommand4 = defineCommand79({
|
|
26835
27130
|
meta: {
|
|
26836
27131
|
name: "remove",
|
|
26837
27132
|
description: "Drop one staged op (cascades to its dependents). Example: baker ads x draft remove x_temp_abc123"
|
|
@@ -26855,7 +27150,7 @@ registerSchema({
|
|
|
26855
27150
|
description: "Drop every staged X op on this chat. Nothing reached X, so nothing needs reversing.",
|
|
26856
27151
|
args: {}
|
|
26857
27152
|
});
|
|
26858
|
-
var clearCommand4 =
|
|
27153
|
+
var clearCommand4 = defineCommand79({
|
|
26859
27154
|
meta: { name: "clear", description: "Drop every staged X op on this chat. Example: baker ads x draft clear" },
|
|
26860
27155
|
args: {},
|
|
26861
27156
|
run: async () => {
|
|
@@ -26868,7 +27163,7 @@ var clearCommand4 = defineCommand78({
|
|
|
26868
27163
|
}
|
|
26869
27164
|
}
|
|
26870
27165
|
});
|
|
26871
|
-
var draftCommand3 =
|
|
27166
|
+
var draftCommand3 = defineCommand79({
|
|
26872
27167
|
meta: {
|
|
26873
27168
|
name: "draft",
|
|
26874
27169
|
description: `Review and edit the X Ads changes staged on this chat.
|
|
@@ -26884,7 +27179,7 @@ Examples:
|
|
|
26884
27179
|
baker ads x draft clear`
|
|
26885
27180
|
},
|
|
26886
27181
|
subCommands: {
|
|
26887
|
-
list:
|
|
27182
|
+
list: listCommand11,
|
|
26888
27183
|
show: showCommand3,
|
|
26889
27184
|
amend: amendCommand2,
|
|
26890
27185
|
remove: removeCommand4,
|
|
@@ -26897,7 +27192,7 @@ Examples:
|
|
|
26897
27192
|
});
|
|
26898
27193
|
|
|
26899
27194
|
// src/commands/ads/x/funding.ts
|
|
26900
|
-
import { defineCommand as
|
|
27195
|
+
import { defineCommand as defineCommand80 } from "citty";
|
|
26901
27196
|
registerSchema({
|
|
26902
27197
|
command: "ads.x.funding",
|
|
26903
27198
|
description: "List funding instruments for an X Ads account. Returns id, type, currency, credit_limit_local_micro, funded_amount_local_micro, status. Falls back to BAKER_X_ADS_ACCOUNT_ID env var.",
|
|
@@ -26907,7 +27202,7 @@ registerSchema({
|
|
|
26907
27202
|
output: { type: "string", description: "Format: json|csv|md", required: false, default: "json" }
|
|
26908
27203
|
}
|
|
26909
27204
|
});
|
|
26910
|
-
var fundingCommand =
|
|
27205
|
+
var fundingCommand = defineCommand80({
|
|
26911
27206
|
meta: {
|
|
26912
27207
|
name: "funding",
|
|
26913
27208
|
description: `List funding instruments for an X Ads account.
|
|
@@ -26956,10 +27251,10 @@ Examples:
|
|
|
26956
27251
|
});
|
|
26957
27252
|
|
|
26958
27253
|
// src/commands/ads/x/line-items.ts
|
|
26959
|
-
import { defineCommand as
|
|
27254
|
+
import { defineCommand as defineCommand82 } from "citty";
|
|
26960
27255
|
|
|
26961
27256
|
// src/commands/ads/x/line-item-writes.ts
|
|
26962
|
-
import { defineCommand as
|
|
27257
|
+
import { defineCommand as defineCommand81 } from "citty";
|
|
26963
27258
|
registerSchema({
|
|
26964
27259
|
command: "ads.x.lineItems.create",
|
|
26965
27260
|
description: `Stage a new X ad group under a campaign. Objective, product type and campaign are fixed at create \u2014 X refuses to change any of them afterwards, so get them right here.
|
|
@@ -26988,7 +27283,7 @@ Objectives: ${OBJECTIVES.join(", ")}.`,
|
|
|
26988
27283
|
"end-time": { type: "string", description: "ISO 8601 end", required: false }
|
|
26989
27284
|
}
|
|
26990
27285
|
});
|
|
26991
|
-
var lineItemsCreateCommand =
|
|
27286
|
+
var lineItemsCreateCommand = defineCommand81({
|
|
26992
27287
|
meta: {
|
|
26993
27288
|
name: "create",
|
|
26994
27289
|
description: `Stage a new ad group (applies when the chat is published).
|
|
@@ -27051,7 +27346,7 @@ registerSchema({
|
|
|
27051
27346
|
"end-time": { type: "string", description: "ISO 8601 end", required: false }
|
|
27052
27347
|
}
|
|
27053
27348
|
});
|
|
27054
|
-
var lineItemsUpdateCommand =
|
|
27349
|
+
var lineItemsUpdateCommand = defineCommand81({
|
|
27055
27350
|
meta: {
|
|
27056
27351
|
name: "update",
|
|
27057
27352
|
description: `Stage a change to an ad group.
|
|
@@ -27102,7 +27397,7 @@ function statusCommand5(name, status) {
|
|
|
27102
27397
|
"account-id": { type: "string", description: "X Ads account ID", required: false }
|
|
27103
27398
|
}
|
|
27104
27399
|
});
|
|
27105
|
-
return
|
|
27400
|
+
return defineCommand81({
|
|
27106
27401
|
meta: {
|
|
27107
27402
|
name,
|
|
27108
27403
|
description: `Stage ${name === "pause" ? "pausing" : "resuming"} ad groups.
|
|
@@ -27142,7 +27437,7 @@ registerSchema({
|
|
|
27142
27437
|
"no-cache": { type: "boolean", description: "Skip cache", required: false }
|
|
27143
27438
|
}
|
|
27144
27439
|
});
|
|
27145
|
-
var lineItemsListCommand =
|
|
27440
|
+
var lineItemsListCommand = defineCommand82({
|
|
27146
27441
|
meta: {
|
|
27147
27442
|
name: "line-items",
|
|
27148
27443
|
description: `List X Ads line items (ad groups).
|
|
@@ -27181,7 +27476,7 @@ Examples:
|
|
|
27181
27476
|
});
|
|
27182
27477
|
}
|
|
27183
27478
|
});
|
|
27184
|
-
var lineItemsCommand =
|
|
27479
|
+
var lineItemsCommand = defineCommand82({
|
|
27185
27480
|
meta: {
|
|
27186
27481
|
name: "line-items",
|
|
27187
27482
|
description: `X Ads ad groups (X calls them line items) \u2014 read them, or stage a change that applies when the chat is published.
|
|
@@ -27214,7 +27509,7 @@ Examples:
|
|
|
27214
27509
|
});
|
|
27215
27510
|
|
|
27216
27511
|
// src/commands/ads/x/media.ts
|
|
27217
|
-
import { defineCommand as
|
|
27512
|
+
import { defineCommand as defineCommand83 } from "citty";
|
|
27218
27513
|
registerSchema({
|
|
27219
27514
|
command: "ads.x.media",
|
|
27220
27515
|
description: "List media assets in the X Ads media library (images, GIFs, videos). Filter by media-type (IMAGE, GIF, VIDEO).",
|
|
@@ -27225,7 +27520,7 @@ registerSchema({
|
|
|
27225
27520
|
output: { type: "string", description: "Format: json|csv|md", required: false, default: "json" }
|
|
27226
27521
|
}
|
|
27227
27522
|
});
|
|
27228
|
-
var mediaCommand =
|
|
27523
|
+
var mediaCommand = defineCommand83({
|
|
27229
27524
|
meta: {
|
|
27230
27525
|
name: "media",
|
|
27231
27526
|
description: `List media assets in the X Ads media library.
|
|
@@ -27277,10 +27572,10 @@ Examples:
|
|
|
27277
27572
|
});
|
|
27278
27573
|
|
|
27279
27574
|
// src/commands/ads/x/promoted-tweets.ts
|
|
27280
|
-
import { defineCommand as
|
|
27575
|
+
import { defineCommand as defineCommand85 } from "citty";
|
|
27281
27576
|
|
|
27282
27577
|
// src/commands/ads/x/promoted-tweet-writes.ts
|
|
27283
|
-
import { defineCommand as
|
|
27578
|
+
import { defineCommand as defineCommand84 } from "citty";
|
|
27284
27579
|
registerSchema({
|
|
27285
27580
|
command: "ads.x.promotedTweets.create",
|
|
27286
27581
|
description: "Stage promoting one or more existing posts in an X ad group. Takes post (tweet) ids \u2014 the numeric id from the post's URL, not a base36 ads id.",
|
|
@@ -27294,7 +27589,7 @@ registerSchema({
|
|
|
27294
27589
|
"tweet-ids": { type: "string", description: "CSV of post ids", required: true }
|
|
27295
27590
|
}
|
|
27296
27591
|
});
|
|
27297
|
-
var promotedTweetsCreateCommand =
|
|
27592
|
+
var promotedTweetsCreateCommand = defineCommand84({
|
|
27298
27593
|
meta: {
|
|
27299
27594
|
name: "create",
|
|
27300
27595
|
description: `Stage promoting posts in an ad group (applies when the chat is published).
|
|
@@ -27324,7 +27619,7 @@ registerSchema({
|
|
|
27324
27619
|
"account-id": { type: "string", description: "X Ads account ID", required: false }
|
|
27325
27620
|
}
|
|
27326
27621
|
});
|
|
27327
|
-
var promotedTweetsRemoveCommand =
|
|
27622
|
+
var promotedTweetsRemoveCommand = defineCommand84({
|
|
27328
27623
|
meta: {
|
|
27329
27624
|
name: "remove",
|
|
27330
27625
|
description: `Stage removing promoted posts. Cannot be undone.
|
|
@@ -27364,7 +27659,7 @@ Types: ${TARGETING_TYPES.join(", ")}. Operators: ${TARGETING_OPERATORS.join(" (i
|
|
|
27364
27659
|
operator: { type: "string", description: "EQ to include (default), NE to exclude", required: false }
|
|
27365
27660
|
}
|
|
27366
27661
|
});
|
|
27367
|
-
var targetingCriteriaCreateCommand =
|
|
27662
|
+
var targetingCriteriaCreateCommand = defineCommand84({
|
|
27368
27663
|
meta: {
|
|
27369
27664
|
name: "create",
|
|
27370
27665
|
description: `Stage one targeting criterion on an ad group.
|
|
@@ -27402,7 +27697,7 @@ registerSchema({
|
|
|
27402
27697
|
"account-id": { type: "string", description: "X Ads account ID", required: false }
|
|
27403
27698
|
}
|
|
27404
27699
|
});
|
|
27405
|
-
var targetingCriteriaRemoveCommand =
|
|
27700
|
+
var targetingCriteriaRemoveCommand = defineCommand84({
|
|
27406
27701
|
meta: {
|
|
27407
27702
|
name: "remove",
|
|
27408
27703
|
description: `Stage removing targeting criteria.
|
|
@@ -27438,7 +27733,7 @@ registerSchema({
|
|
|
27438
27733
|
"no-cache": { type: "boolean", description: "Skip cache", required: false }
|
|
27439
27734
|
}
|
|
27440
27735
|
});
|
|
27441
|
-
var promotedTweetsListCommand =
|
|
27736
|
+
var promotedTweetsListCommand = defineCommand85({
|
|
27442
27737
|
meta: {
|
|
27443
27738
|
name: "promoted-tweets",
|
|
27444
27739
|
description: `List X Ads promoted tweets.
|
|
@@ -27490,7 +27785,7 @@ Examples:
|
|
|
27490
27785
|
}
|
|
27491
27786
|
}
|
|
27492
27787
|
});
|
|
27493
|
-
var promotedTweetsCommand =
|
|
27788
|
+
var promotedTweetsCommand = defineCommand85({
|
|
27494
27789
|
meta: {
|
|
27495
27790
|
name: "promoted-tweets",
|
|
27496
27791
|
description: `Promoted posts \u2014 the association between a post and an ad group, which X Ads Manager calls an ad.
|
|
@@ -27520,11 +27815,11 @@ Examples:
|
|
|
27520
27815
|
});
|
|
27521
27816
|
|
|
27522
27817
|
// src/commands/ads/x/stats/index.ts
|
|
27523
|
-
import { defineCommand as
|
|
27818
|
+
import { defineCommand as defineCommand90 } from "citty";
|
|
27524
27819
|
|
|
27525
27820
|
// src/commands/ads/x/stats/job.ts
|
|
27526
27821
|
import { gunzipSync } from "zlib";
|
|
27527
|
-
import { defineCommand as
|
|
27822
|
+
import { defineCommand as defineCommand86 } from "citty";
|
|
27528
27823
|
var POLL_INTERVAL_MS2 = 1e4;
|
|
27529
27824
|
var DEADLINE_MS = 12 * 60 * 1e3;
|
|
27530
27825
|
var RESULT_CACHE_TTL_MS = 6 * 60 * 60 * 1e3;
|
|
@@ -27594,7 +27889,7 @@ async function pollUntilDone(accountId, jobId) {
|
|
|
27594
27889
|
function buildCacheKey(body) {
|
|
27595
27890
|
return `stats-job:${JSON.stringify(body)}`;
|
|
27596
27891
|
}
|
|
27597
|
-
var statsJobCommand =
|
|
27892
|
+
var statsJobCommand = defineCommand86({
|
|
27598
27893
|
meta: {
|
|
27599
27894
|
name: "job",
|
|
27600
27895
|
description: `Async X Ads stats job, sync from the CLI's perspective. Creates \u2192 polls \u2192 downloads \u2192 returns.
|
|
@@ -27699,7 +27994,7 @@ For fine-grained control (don't wait, poll yourself), use:
|
|
|
27699
27994
|
});
|
|
27700
27995
|
|
|
27701
27996
|
// src/commands/ads/x/stats/job-create.ts
|
|
27702
|
-
import { defineCommand as
|
|
27997
|
+
import { defineCommand as defineCommand87 } from "citty";
|
|
27703
27998
|
registerSchema({
|
|
27704
27999
|
command: "ads.x.statsJobCreate",
|
|
27705
28000
|
description: "Create an asynchronous X Ads stats job (range up to 90 days non-segmented, 45 days segmented). Returns a job id; poll with `stats job-status`. Times must be ISO 8601 hour-aligned.",
|
|
@@ -27722,7 +28017,7 @@ function parseCsv4(v) {
|
|
|
27722
28017
|
const parts = v.split(",").map((s) => s.trim()).filter(Boolean);
|
|
27723
28018
|
return parts.length > 0 ? parts : void 0;
|
|
27724
28019
|
}
|
|
27725
|
-
var statsJobCreateCommand =
|
|
28020
|
+
var statsJobCreateCommand = defineCommand87({
|
|
27726
28021
|
meta: {
|
|
27727
28022
|
name: "job-create",
|
|
27728
28023
|
description: `Create an async X Ads stats job (up to 90 days, supports segmentation).
|
|
@@ -27785,7 +28080,7 @@ Examples:
|
|
|
27785
28080
|
});
|
|
27786
28081
|
|
|
27787
28082
|
// src/commands/ads/x/stats/job-status.ts
|
|
27788
|
-
import { defineCommand as
|
|
28083
|
+
import { defineCommand as defineCommand88 } from "citty";
|
|
27789
28084
|
registerSchema({
|
|
27790
28085
|
command: "ads.x.statsJobStatus",
|
|
27791
28086
|
description: "Check the status of one or more X Ads stats jobs. Returns status (PROCESSING|SUCCESS|FAILED) and a downloadable url when SUCCESS. Pass --job-id or --job-ids (CSV).",
|
|
@@ -27795,7 +28090,7 @@ registerSchema({
|
|
|
27795
28090
|
"job-ids": { type: "string", description: "CSV of job IDs", required: false }
|
|
27796
28091
|
}
|
|
27797
28092
|
});
|
|
27798
|
-
var statsJobStatusCommand =
|
|
28093
|
+
var statsJobStatusCommand = defineCommand88({
|
|
27799
28094
|
meta: {
|
|
27800
28095
|
name: "job-status",
|
|
27801
28096
|
description: `Poll the status of an async X Ads stats job.
|
|
@@ -27836,7 +28131,7 @@ Examples:
|
|
|
27836
28131
|
});
|
|
27837
28132
|
|
|
27838
28133
|
// src/commands/ads/x/stats/sync.ts
|
|
27839
|
-
import { defineCommand as
|
|
28134
|
+
import { defineCommand as defineCommand89 } from "citty";
|
|
27840
28135
|
|
|
27841
28136
|
// src/commands/ads/x/presets.ts
|
|
27842
28137
|
var X_STATS_PRESETS = [
|
|
@@ -28030,7 +28325,7 @@ async function runSync(args4, accountId, q) {
|
|
|
28030
28325
|
process.exit(1);
|
|
28031
28326
|
}
|
|
28032
28327
|
}
|
|
28033
|
-
var statsSyncCommand =
|
|
28328
|
+
var statsSyncCommand = defineCommand89({
|
|
28034
28329
|
meta: {
|
|
28035
28330
|
name: "sync",
|
|
28036
28331
|
description: `Synchronous X Ads analytics (max 7-day window).
|
|
@@ -28075,7 +28370,7 @@ Examples:
|
|
|
28075
28370
|
});
|
|
28076
28371
|
|
|
28077
28372
|
// src/commands/ads/x/stats/index.ts
|
|
28078
|
-
var statsCommand =
|
|
28373
|
+
var statsCommand = defineCommand90({
|
|
28079
28374
|
meta: {
|
|
28080
28375
|
name: "stats",
|
|
28081
28376
|
description: `X Ads analytics. Sync (\u22647 days, no segmentation) or async jobs (\u226490 days, segmentable).
|
|
@@ -28103,7 +28398,7 @@ Examples:
|
|
|
28103
28398
|
});
|
|
28104
28399
|
|
|
28105
28400
|
// src/commands/ads/x/targeting-constants.ts
|
|
28106
|
-
import { defineCommand as
|
|
28401
|
+
import { defineCommand as defineCommand91 } from "citty";
|
|
28107
28402
|
var ALLOWED_CONSTANTS = [
|
|
28108
28403
|
"locations",
|
|
28109
28404
|
"interests",
|
|
@@ -28136,7 +28431,7 @@ registerSchema({
|
|
|
28136
28431
|
"no-cache": { type: "boolean", description: "Skip cache", required: false }
|
|
28137
28432
|
}
|
|
28138
28433
|
});
|
|
28139
|
-
var targetingConstantsCommand =
|
|
28434
|
+
var targetingConstantsCommand = defineCommand91({
|
|
28140
28435
|
meta: {
|
|
28141
28436
|
name: "targeting-constants",
|
|
28142
28437
|
description: `Lookup X Ads targeting constants.
|
|
@@ -28203,7 +28498,7 @@ Examples:
|
|
|
28203
28498
|
});
|
|
28204
28499
|
|
|
28205
28500
|
// src/commands/ads/x/targeting-criteria.ts
|
|
28206
|
-
import { defineCommand as
|
|
28501
|
+
import { defineCommand as defineCommand92 } from "citty";
|
|
28207
28502
|
registerSchema({
|
|
28208
28503
|
command: "ads.x.targetingCriteria",
|
|
28209
28504
|
description: "List targeting criteria attached to line items in an X Ads account. Returns targeting_type, targeting_value, name, operator_type per criterion. Filter by line-item-ids.",
|
|
@@ -28213,7 +28508,7 @@ registerSchema({
|
|
|
28213
28508
|
"no-cache": { type: "boolean", description: "Skip cache", required: false }
|
|
28214
28509
|
}
|
|
28215
28510
|
});
|
|
28216
|
-
var targetingCriteriaListCommand =
|
|
28511
|
+
var targetingCriteriaListCommand = defineCommand92({
|
|
28217
28512
|
meta: {
|
|
28218
28513
|
name: "targeting-criteria",
|
|
28219
28514
|
description: `List targeting criteria attached to line items.
|
|
@@ -28262,7 +28557,7 @@ Examples:
|
|
|
28262
28557
|
}
|
|
28263
28558
|
}
|
|
28264
28559
|
});
|
|
28265
|
-
var targetingCriteriaCommand =
|
|
28560
|
+
var targetingCriteriaCommand = defineCommand92({
|
|
28266
28561
|
meta: {
|
|
28267
28562
|
name: "targeting-criteria",
|
|
28268
28563
|
description: `Targeting attached to ad groups \u2014 read it, or stage a change.
|
|
@@ -28290,7 +28585,7 @@ Examples:
|
|
|
28290
28585
|
});
|
|
28291
28586
|
|
|
28292
28587
|
// src/commands/ads/x/tweets.ts
|
|
28293
|
-
import { defineCommand as
|
|
28588
|
+
import { defineCommand as defineCommand93 } from "citty";
|
|
28294
28589
|
function cacheKeyFor(accountId, args4) {
|
|
28295
28590
|
const today = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
|
|
28296
28591
|
return `tweets:${accountId}:${today}:${args4["tweet-type"] ?? ""}:${args4["timeline-type"] ?? ""}:${args4["user-id"] ?? ""}`;
|
|
@@ -28334,7 +28629,7 @@ A NULLCAST post ("promoted-only") never appears on the profile timeline and exis
|
|
|
28334
28629
|
output: { type: "string", description: "Format: json|csv|md", required: false }
|
|
28335
28630
|
}
|
|
28336
28631
|
});
|
|
28337
|
-
var tweetsCommand =
|
|
28632
|
+
var tweetsCommand = defineCommand93({
|
|
28338
28633
|
meta: {
|
|
28339
28634
|
name: "tweets",
|
|
28340
28635
|
description: `The account's own posts, with the id needed to promote one.
|
|
@@ -28386,7 +28681,7 @@ Examples:
|
|
|
28386
28681
|
});
|
|
28387
28682
|
|
|
28388
28683
|
// src/commands/ads/x/index.ts
|
|
28389
|
-
var xCommand =
|
|
28684
|
+
var xCommand = defineCommand94({
|
|
28390
28685
|
meta: {
|
|
28391
28686
|
name: "x",
|
|
28392
28687
|
description: `X (Twitter) Ads commands. Read campaigns, line items, promoted tweets, creatives, audiences, and analytics.
|
|
@@ -28427,7 +28722,7 @@ Full guide: __tooling__/docs/tools/baker/ads-x.md`
|
|
|
28427
28722
|
});
|
|
28428
28723
|
|
|
28429
28724
|
// src/commands/ads/index.ts
|
|
28430
|
-
var adsCommand2 =
|
|
28725
|
+
var adsCommand2 = defineCommand95({
|
|
28431
28726
|
meta: {
|
|
28432
28727
|
name: "ads",
|
|
28433
28728
|
description: `Ad platform commands. Each platform exposes its own native command surface \u2014 no forced parity.
|
|
@@ -29225,7 +29520,7 @@ var ingestResponseSchema = z34.strictObject({
|
|
|
29225
29520
|
var ingestEnvelopeSchema = z34.object({ ok: z34.literal(true), data: ingestResponseSchema });
|
|
29226
29521
|
|
|
29227
29522
|
// src/commands/analytics/index.ts
|
|
29228
|
-
import { defineCommand as
|
|
29523
|
+
import { defineCommand as defineCommand98 } from "citty";
|
|
29229
29524
|
|
|
29230
29525
|
// src/commands/flows/shared.ts
|
|
29231
29526
|
import { existsSync as existsSync3, readdirSync as readdirSync2, readFileSync as readFileSync11, writeFileSync as writeFileSync3 } from "fs";
|
|
@@ -30183,7 +30478,7 @@ function formatHint(data, format) {
|
|
|
30183
30478
|
}
|
|
30184
30479
|
|
|
30185
30480
|
// src/commands/analytics/sends.ts
|
|
30186
|
-
import { defineCommand as
|
|
30481
|
+
import { defineCommand as defineCommand96 } from "citty";
|
|
30187
30482
|
var SET_FLAGS = ["--source-event", "--platform", "--tag", "--event"];
|
|
30188
30483
|
function parseSendsArgs(raw, argv, now = Date.now()) {
|
|
30189
30484
|
const set = parseSetFlags(raw, argv, now);
|
|
@@ -30381,7 +30676,7 @@ var args = {
|
|
|
30381
30676
|
},
|
|
30382
30677
|
id: {
|
|
30383
30678
|
type: "string",
|
|
30384
|
-
description: "The send's id, when changing one that exists (`sends[].id
|
|
30679
|
+
description: "The send's id, when changing one that exists (`sends[].id` for a live one, `staged.set[].id` for one staged in this chat, like s1). Left out, a new id is minted and a NEW send is staged \u2014 so re-running a --set you already ran is refused, naming the send it would duplicate",
|
|
30385
30680
|
required: false
|
|
30386
30681
|
},
|
|
30387
30682
|
remove: {
|
|
@@ -30405,7 +30700,7 @@ registerSchema({
|
|
|
30405
30700
|
description: "Read where this company's system events are sent, or stage a change",
|
|
30406
30701
|
args
|
|
30407
30702
|
});
|
|
30408
|
-
var sendsCommand =
|
|
30703
|
+
var sendsCommand = defineCommand96({
|
|
30409
30704
|
meta: {
|
|
30410
30705
|
name: "sends",
|
|
30411
30706
|
description: `Where this company's SYSTEM EVENTS are sent \u2014 Meta, Google Ads, LinkedIn, X, Google Analytics \u2014 and what happened to each upload. A send belongs to an event one of the client's own systems raises, by key: page:deal_won from HubSpot \u2192 Meta Purchase means every "deal_won" HubSpot reports is uploaded to Meta with who the person is, the click that brought them and the amount forwarded automatically. There is nothing to map. What happens on a page or in a Form is never sent from here \u2014 the page's pixels and the Form's own side effects do that \u2014 and a send is never set on a funnel step: the step reads the sends of the events behind its ways in.
|
|
@@ -30743,7 +31038,7 @@ var sourcesResponseSchema = z35.strictObject({
|
|
|
30743
31038
|
});
|
|
30744
31039
|
|
|
30745
31040
|
// src/commands/analytics/sources.ts
|
|
30746
|
-
import { defineCommand as
|
|
31041
|
+
import { defineCommand as defineCommand97 } from "citty";
|
|
30747
31042
|
|
|
30748
31043
|
// src/commands/hubspot/refusal.ts
|
|
30749
31044
|
var CONTINUE = "Do not abort the wider task: say which part you could not read, skip it, and finish everything else. If the `request_connection` tool is not available to you, point them at the dashboard, Brain -> Integrations -> Tools -> HubSpot.";
|
|
@@ -31059,7 +31354,7 @@ function handleError2(err) {
|
|
|
31059
31354
|
});
|
|
31060
31355
|
process.exit(1);
|
|
31061
31356
|
}
|
|
31062
|
-
var sourcesCommand =
|
|
31357
|
+
var sourcesCommand = defineCommand97({
|
|
31063
31358
|
meta: {
|
|
31064
31359
|
name: "sources",
|
|
31065
31360
|
description: 'Where events reach Baker from a server, and what each one reads. Two doors. **The client\'s own server**: `--server` prints one address for their developers \u2014 made once, the same for ever, counting at once, Baker\'s own `POST /v1/events` format (`baker analytics sending-events` has the contract, `X-Baker-Mode: test` rehearses). **HubSpot events**: HubSpot keeps each change to a watched property in a journal Baker reads every half minute \u2014 Baker\'s app subscribes the account to that one property with the condition as HubSpot\'s own filter, so an account with a million contacts costs nothing to watch \u2014 on every plan, nothing to set up in HubSpot. The trigger is *when a contact\'s* property satisfies a condition \u2014 the same conditions a Form\'s filters take: `--property lifecyclestage --value customer` (a dropdown; `--value lead --value customer` for either), `--property deal_value --operator greaterThan --value 1000`, `--property email --operator endsWith --value @acme.com`, `--property closed_at --operator isAfter --value 2026-01-01`, `--property phone --operator isEmpty`. Several conditions combine the way a Form\'s filter does \u2014 `--conditions \'{"logic":"And","conditions":[{"property":"lifecyclestage","values":["customer"]},{"property":"country","values":["Spain"]}]}\'` (AND / OR, groups one level deep, 10 conditions at most) in place of --property/--operator/--value, on --create-hubspot, --set-trigger and --preview; the event fires when a change to any named property makes the whole combination hold. `baker hubspot contacts properties` lists every property with its kind, the operators that kind takes and a dropdown\'s values; `baker hubspot contacts fields` every property a row can read. `--preview --property \u2026 [--operator \u2026] --value \u2026 [--field \u2026] [--contact <id or email>]` says how many contacts satisfy it today (NOT counted \u2014 only contacts that come to satisfy it from now on are) and reads one real contact so every row can be checked against real data; then `--create-hubspot --property \u2026 --value \u2026 --name "Deal won" --field email={{work_email}} --field value={{deal_value}} --field currency=EUR` makes the event, rows over the defaults (email, phone, the contact id, name, address, hs_google_click_id, hs_facebook_click_id). `--set-trigger --source <id> --property \u2026 --operator \u2026 --value \u2026` changes what an event watches later (rows kept, counting from now on). Every row is a template \u2014 text with {{property}} mentions, one thing per mention; `--map --source <id> --field \u2026` replaces the whole row set later, `--amount-property <number property> --currency EUR` is the short spelling for the amount rows. Each event is an ordinary event named after the source, carrying `baker_source`, listed by `feed --source <name>`, counted with `conversions` under `page:<name>`, and sent to the ad platforms with `sends`. `--pause`, `--resume`, `--remove` by --source. `--create --name <tool>` still makes an address for a tool that cannot be told what to send; its first send is a masked sample counted as nothing until `--map` confirms the rows.'
|
|
@@ -31349,7 +31644,7 @@ function presetCommand(options) {
|
|
|
31349
31644
|
description: options.description,
|
|
31350
31645
|
args: { ...SHARED_ARGS, ...options.extraArgs ?? {} }
|
|
31351
31646
|
});
|
|
31352
|
-
return
|
|
31647
|
+
return defineCommand98({
|
|
31353
31648
|
meta: { name: options.name, description: options.description },
|
|
31354
31649
|
args: { ...SHARED_ARGS, ...options.extraArgs ?? {} },
|
|
31355
31650
|
run: async ({ args: args4 }) => {
|
|
@@ -31610,7 +31905,7 @@ var devicesCommand = presetCommand({
|
|
|
31610
31905
|
deviceGrain: args4.grain ? String(args4.grain) : void 0
|
|
31611
31906
|
})
|
|
31612
31907
|
});
|
|
31613
|
-
var presetsCommand =
|
|
31908
|
+
var presetsCommand = defineCommand98({
|
|
31614
31909
|
meta: { name: "presets", description: "List the available reports and what each answers." },
|
|
31615
31910
|
run: () => {
|
|
31616
31911
|
writeJsonEnvelope({ ok: true, data: ANALYTICS_PRESET_INFO });
|
|
@@ -31645,7 +31940,7 @@ var mapCommand = (() => {
|
|
|
31645
31940
|
description: "Stage how this company's campaign URLs spell each ad dimension, applied on publish",
|
|
31646
31941
|
args: args4
|
|
31647
31942
|
});
|
|
31648
|
-
return
|
|
31943
|
+
return defineCommand98({
|
|
31649
31944
|
meta: {
|
|
31650
31945
|
name: "map",
|
|
31651
31946
|
description: "Teach Baker how this company's campaign URLs spell each ad dimension on one platform \u2014 `--platform google --set kw=keyword`. Run it with no flags to see the whole mapping, including what this chat has already staged. STAGED, not applied: the answers are reviewed in the chat and take effect when it is published, so nothing you map here changes a report or what the edge stores until then; discarding the chat takes them all back. Mappings are always per platform, because the platforms do not describe the same world: `builtIn` in the response is what that platform is already understood to send, so you do not spend a turn mapping `keyword` to keyword. Each --set is checked against the client's OWN ad account \u2014 `evidence` in the response says whether their tracking template really fills that name with what you claimed. Read it: `contradicted` means the account disagrees, and mapping it your way would produce a report that is wrong and looks plausible. Renaming a parameter Baker already captured fixes the history too, because roles are applied when a report is read; naming one it never read only starts collecting it from the publish onward, since no value was stored. You do NOT need to have seen a parameter to map it: a name nobody has sent yet is a valid --set, which is how a tracking template gets configured before the campaign that uses it runs. To drop an answer, --remove takes it back to whatever Baker knows by itself, and --set <name>=ignore says it is not campaign information at all so it stops being listed."
|
|
@@ -31680,7 +31975,7 @@ var trackingCommand = (() => {
|
|
|
31680
31975
|
description: "Check whether a platform's ad URLs carry the campaign, ad group and ad a report needs",
|
|
31681
31976
|
args: args4
|
|
31682
31977
|
});
|
|
31683
|
-
return
|
|
31978
|
+
return defineCommand98({
|
|
31684
31979
|
meta: {
|
|
31685
31980
|
name: "tracking",
|
|
31686
31981
|
description: `Check whether this company's ad URLs carry the dimensions any budget decision needs \u2014 the campaign, the ad group, the ad, and the keyword where the platform has one.
|
|
@@ -31833,7 +32128,7 @@ var conversionsCommand3 = (() => {
|
|
|
31833
32128
|
description: "Read or change what this company counts as a conversion on its pages. Also `--flow <slug>` for one Form's own endings as event keys, whether or not any of them has fired.",
|
|
31834
32129
|
args: args4
|
|
31835
32130
|
});
|
|
31836
|
-
return
|
|
32131
|
+
return defineCommand98({
|
|
31837
32132
|
meta: {
|
|
31838
32133
|
name: "conversions",
|
|
31839
32134
|
description: "What this company counts as a conversion \u2014 the numerator of every conversion rate on Measure. A page event (a Form ending, a data-baker-* event) and an event one of the client's systems sends (a HubSpot event made with `baker analytics sources --create-hubspot`, an order the server posts) both count; a system's event is credited to the last landing its person viewed. A HubSpot event is `page:<its name>` here \u2014 `--event 'page:Deal won' --name 'Deal won'`. Run with no flags first: an empty `definitions` list means every conversion number in every other report is zero \u2014 not because nobody converted, but because nothing is marked as converting, and Baker never guesses. Add `--candidates` to see everything these pages actually do (every Form step, every data-baker-* event, every outbound destination) with counts and whether it is already counted; that list is where an event key comes from, so never invent one. Then `--event <key> --name 'Booked a call'` to count it. Inside a chat a change is STAGED: the person sees it under Sources in the chat's changes, on the event's own row and it applies when they publish, retroactively \u2014 the whole history is rescored, so a company that has been running for a month gets a month of correct numbers. A read shows a proposal marked `staged`. Call an event by its name when you talk to the person, never by its key. Two events given the SAME --name are one row and one number. `--remove <key>` stops counting one. `--flow <slug>` answers the other direction \u2014 what one Form counts, with every ending it has already spelled as an event key, read from the Form itself so it works before a single visitor has seen it. Run it whenever you create or edit a Form: a Form nobody named an outcome for is published converting nobody, and no report says so."
|
|
@@ -31917,7 +32212,7 @@ var arrivalsCommand = (() => {
|
|
|
31917
32212
|
description: "What a client's own server posted to POST /v1/events in the last 48 hours, and why any of it was refused",
|
|
31918
32213
|
args: args4
|
|
31919
32214
|
});
|
|
31920
|
-
return
|
|
32215
|
+
return defineCommand98({
|
|
31921
32216
|
meta: {
|
|
31922
32217
|
name: "arrivals",
|
|
31923
32218
|
description: `Every request a client's own server posted to POST /v1/events in the last 48 hours \u2014 accepted, refused or rehearsed. The one place a server-side integration can be debugged.
|
|
@@ -31959,7 +32254,7 @@ var sendingEventsCommand = (() => {
|
|
|
31959
32254
|
description: "The POST /v1/events contract as Markdown, for whoever is writing the integration",
|
|
31960
32255
|
args: {}
|
|
31961
32256
|
});
|
|
31962
|
-
return
|
|
32257
|
+
return defineCommand98({
|
|
31963
32258
|
meta: {
|
|
31964
32259
|
name: "sending-events",
|
|
31965
32260
|
description: `The complete contract for sending events into Baker from a client's own systems \u2014 a CRM marking a deal won, a back office recording a refund \u2014 as Markdown you can hand straight to whoever writes the integration.
|
|
@@ -31992,7 +32287,7 @@ var websiteTagCommand = (() => {
|
|
|
31992
32287
|
}
|
|
31993
32288
|
}
|
|
31994
32289
|
});
|
|
31995
|
-
return
|
|
32290
|
+
return defineCommand98({
|
|
31996
32291
|
meta: {
|
|
31997
32292
|
name: "website-tag",
|
|
31998
32293
|
description: `The one script tag that measures a website Baker does not publish \u2014 the client's own site, their shop, their booking page \u2014 with this company's site key already in it, plus the whole install as Markdown.
|
|
@@ -32043,7 +32338,7 @@ var sitesCommand = (() => {
|
|
|
32043
32338
|
remove: { type: "string", required: false, description: "Website address to stop accepting measurement from" }
|
|
32044
32339
|
}
|
|
32045
32340
|
});
|
|
32046
|
-
return
|
|
32341
|
+
return defineCommand98({
|
|
32047
32342
|
meta: {
|
|
32048
32343
|
name: "sites",
|
|
32049
32344
|
description: `Which websites this company's measurement tag is accepted from \u2014 and the command that changes it.
|
|
@@ -32083,7 +32378,7 @@ Examples:
|
|
|
32083
32378
|
}
|
|
32084
32379
|
});
|
|
32085
32380
|
})();
|
|
32086
|
-
var analyticsCommand2 =
|
|
32381
|
+
var analyticsCommand2 = defineCommand98({
|
|
32087
32382
|
meta: {
|
|
32088
32383
|
name: "analytics",
|
|
32089
32384
|
description: `Baker's own web analytics for this company's published pages. No connection to set up \u2014 data starts the moment a page is published.
|
|
@@ -32162,10 +32457,10 @@ Full guide: __tooling__/docs/tools/baker/analytics.md`
|
|
|
32162
32457
|
});
|
|
32163
32458
|
|
|
32164
32459
|
// src/commands/avatars/index.ts
|
|
32165
|
-
import { defineCommand as
|
|
32460
|
+
import { defineCommand as defineCommand104 } from "citty";
|
|
32166
32461
|
|
|
32167
32462
|
// src/commands/avatars/create.ts
|
|
32168
|
-
import { defineCommand as
|
|
32463
|
+
import { defineCommand as defineCommand99 } from "citty";
|
|
32169
32464
|
|
|
32170
32465
|
// src/commands/avatars/casting.ts
|
|
32171
32466
|
var CAST_FLAG_RULE = "Cast with `--avatar <handle>` on `baker studio generate`, `baker studio animate` and `baker canvas scaffold-ad`. Do NOT hand-roll it by pasting `subjectDescription` into the prompt or by passing the sheet through `--reference` \u2014 both render something that merely resembles them. `--avatar` is also the ONLY thing that carries their ACCENT and delivery into a clip. An avatar has no pinned voice by design (ADR 0005): the video model renders the voice, and the region on their profile is the only thing steering it \u2014 without the flag the clip is performed flat, in whatever accent the model picks on its own.";
|
|
@@ -32496,7 +32791,7 @@ registerSchema({
|
|
|
32496
32791
|
}
|
|
32497
32792
|
}
|
|
32498
32793
|
});
|
|
32499
|
-
var createCommand2 =
|
|
32794
|
+
var createCommand2 = defineCommand99({
|
|
32500
32795
|
meta: {
|
|
32501
32796
|
name: "create",
|
|
32502
32797
|
description: 'Cast a new avatar (reusable AI presenter). Example: baker avatars create --name "Marta" --subject "woman in her early 40s, shoulder-length dark hair, light olive skin, warm open face" --persona "friendly product expert". Returns while the identity sheet is still building.'
|
|
@@ -32608,7 +32903,7 @@ var createCommand2 = defineCommand98({
|
|
|
32608
32903
|
});
|
|
32609
32904
|
|
|
32610
32905
|
// src/commands/avatars/delete.ts
|
|
32611
|
-
import { defineCommand as
|
|
32906
|
+
import { defineCommand as defineCommand100 } from "citty";
|
|
32612
32907
|
registerSchema({
|
|
32613
32908
|
command: "avatars.delete",
|
|
32614
32909
|
description: "Remove an avatar. Prefer --archive: it retires the avatar so it stops showing in the roster and must not be cast again, while past work and @handle mentions still resolve. Without --archive the avatar is gone for good and the mention resolves nowhere. Confirm with the user first \u2014 this is their cast, and it is not yours to retire. --dry-run previews.",
|
|
@@ -32623,7 +32918,7 @@ registerSchema({
|
|
|
32623
32918
|
"dry-run": { type: "boolean", description: "Preview without removing anything", required: false, default: false }
|
|
32624
32919
|
}
|
|
32625
32920
|
});
|
|
32626
|
-
var deleteCommand =
|
|
32921
|
+
var deleteCommand = defineCommand100({
|
|
32627
32922
|
meta: {
|
|
32628
32923
|
name: "delete",
|
|
32629
32924
|
description: "Remove an avatar. Prefer --archive (retire, past work still resolves) over a hard delete. Example: baker avatars delete marta --archive --dry-run"
|
|
@@ -32657,7 +32952,7 @@ var deleteCommand = defineCommand99({
|
|
|
32657
32952
|
});
|
|
32658
32953
|
|
|
32659
32954
|
// src/commands/avatars/get.ts
|
|
32660
|
-
import { defineCommand as
|
|
32955
|
+
import { defineCommand as defineCommand101 } from "citty";
|
|
32661
32956
|
|
|
32662
32957
|
// src/commands/avatars/wait.ts
|
|
32663
32958
|
var WAIT_TIMEOUT_MS = 9e4;
|
|
@@ -32694,7 +32989,7 @@ registerSchema({
|
|
|
32694
32989
|
}
|
|
32695
32990
|
}
|
|
32696
32991
|
});
|
|
32697
|
-
var getCommand2 =
|
|
32992
|
+
var getCommand2 = defineCommand101({
|
|
32698
32993
|
meta: {
|
|
32699
32994
|
name: "get",
|
|
32700
32995
|
description: "Read one avatar by handle: status, identity sheet URL for --reference, and the subject description to reuse verbatim. Example: baker avatars get marta --full"
|
|
@@ -32747,7 +33042,7 @@ var getCommand2 = defineCommand100({
|
|
|
32747
33042
|
});
|
|
32748
33043
|
|
|
32749
33044
|
// src/commands/avatars/list.ts
|
|
32750
|
-
import { defineCommand as
|
|
33045
|
+
import { defineCommand as defineCommand102 } from "citty";
|
|
32751
33046
|
var STATUSES = ["generating", "ready", "error", "archived"];
|
|
32752
33047
|
registerSchema({
|
|
32753
33048
|
command: "avatars.list",
|
|
@@ -32762,7 +33057,7 @@ registerSchema({
|
|
|
32762
33057
|
limit: { type: "number", description: "Max avatars to return (1-100)", required: false }
|
|
32763
33058
|
}
|
|
32764
33059
|
});
|
|
32765
|
-
var
|
|
33060
|
+
var listCommand12 = defineCommand102({
|
|
32766
33061
|
meta: {
|
|
32767
33062
|
name: "list",
|
|
32768
33063
|
description: "List the company's avatars (reusable AI presenters). Only `ready` ones can be cast. Example: baker avatars list --status ready --output md"
|
|
@@ -32800,7 +33095,7 @@ var listCommand11 = defineCommand101({
|
|
|
32800
33095
|
});
|
|
32801
33096
|
|
|
32802
33097
|
// src/commands/avatars/update.ts
|
|
32803
|
-
import { defineCommand as
|
|
33098
|
+
import { defineCommand as defineCommand103 } from "citty";
|
|
32804
33099
|
function readUpdateArgs(args4) {
|
|
32805
33100
|
const handle = (args4.handle || args4["avatar-handle"])?.trim();
|
|
32806
33101
|
if (!handle) {
|
|
@@ -32862,7 +33157,7 @@ registerSchema({
|
|
|
32862
33157
|
}
|
|
32863
33158
|
}
|
|
32864
33159
|
});
|
|
32865
|
-
var updateCommand2 =
|
|
33160
|
+
var updateCommand2 = defineCommand103({
|
|
32866
33161
|
meta: {
|
|
32867
33162
|
name: "update",
|
|
32868
33163
|
description: 'Edit an avatar; profile flags merge over what is stored. Example: baker avatars update marta --subject "woman in her early 50s, silver bob" --regenerate-sheet'
|
|
@@ -32922,7 +33217,7 @@ var updateCommand2 = defineCommand102({
|
|
|
32922
33217
|
});
|
|
32923
33218
|
|
|
32924
33219
|
// src/commands/avatars/index.ts
|
|
32925
|
-
var avatarsCommand =
|
|
33220
|
+
var avatarsCommand = defineCommand104({
|
|
32926
33221
|
meta: {
|
|
32927
33222
|
name: "avatars",
|
|
32928
33223
|
description: `Reusable AI presenters this company can cast into images and video. An avatar holds one settled identity, so the same face can carry a whole campaign. Subcommands: list, get, create, update, delete.
|
|
@@ -32943,7 +33238,7 @@ Examples:
|
|
|
32943
33238
|
Full guide: __tooling__/docs/tools/baker/avatars.md`
|
|
32944
33239
|
},
|
|
32945
33240
|
subCommands: {
|
|
32946
|
-
list:
|
|
33241
|
+
list: listCommand12,
|
|
32947
33242
|
get: getCommand2,
|
|
32948
33243
|
create: createCommand2,
|
|
32949
33244
|
update: updateCommand2,
|
|
@@ -32952,12 +33247,12 @@ Full guide: __tooling__/docs/tools/baker/avatars.md`
|
|
|
32952
33247
|
});
|
|
32953
33248
|
|
|
32954
33249
|
// src/commands/brand/index.ts
|
|
32955
|
-
import { defineCommand as
|
|
33250
|
+
import { defineCommand as defineCommand106 } from "citty";
|
|
32956
33251
|
|
|
32957
33252
|
// src/commands/brand/fonts.ts
|
|
32958
33253
|
import { mkdir, readdir, readFile as readFile2, writeFile } from "fs/promises";
|
|
32959
33254
|
import path2 from "path";
|
|
32960
|
-
import { defineCommand as
|
|
33255
|
+
import { defineCommand as defineCommand105 } from "citty";
|
|
32961
33256
|
|
|
32962
33257
|
// src/engine/brand/fonts.ts
|
|
32963
33258
|
import { posix } from "path";
|
|
@@ -33801,7 +34096,7 @@ async function unresolvedAction(css, unresolved) {
|
|
|
33801
34096
|
}
|
|
33802
34097
|
return `Run \`baker brand fonts fetch "${unresolved[0]}"\` to self-host it, which writes the @font-face for you. For a face no catalogue carries, add an @font-face pointing at a file in ${FONTS_DIR}.`;
|
|
33803
34098
|
}
|
|
33804
|
-
var fontsCheckCommand =
|
|
34099
|
+
var fontsCheckCommand = defineCommand105({
|
|
33805
34100
|
meta: {
|
|
33806
34101
|
name: "check",
|
|
33807
34102
|
description: "Verify the brand's fonts really exist. First: every --font-* family in src/styles/global.css must be provided by a local @font-face, or it renders as a fallback on every page \u2014 a Google @import does not provide one here, the build drops it before the page loads. Then, for families still requested from Google, ask Google what it actually serves \u2014 a weight nobody serves is silently synthesized."
|
|
@@ -33853,7 +34148,7 @@ var fontsCheckCommand = defineCommand104({
|
|
|
33853
34148
|
});
|
|
33854
34149
|
}
|
|
33855
34150
|
});
|
|
33856
|
-
var fontsFetchCommand =
|
|
34151
|
+
var fontsFetchCommand = defineCommand105({
|
|
33857
34152
|
meta: {
|
|
33858
34153
|
name: "fetch",
|
|
33859
34154
|
description: "Download a font from Google Fonts or Fontsource into src/brand/fonts/ and write its @font-face into src/styles/global.css above @theme, so the family actually loads. Use when a brand font should be self-hosted rather than requested from a third party on every page load."
|
|
@@ -33954,7 +34249,7 @@ async function astroSources() {
|
|
|
33954
34249
|
}
|
|
33955
34250
|
return out;
|
|
33956
34251
|
}
|
|
33957
|
-
var fontsAdoptCommand =
|
|
34252
|
+
var fontsAdoptCommand = defineCommand105({
|
|
33958
34253
|
meta: {
|
|
33959
34254
|
name: "adopt",
|
|
33960
34255
|
description: "Move brand faces a page already self-hosts into src/styles/global.css, so every page loads them instead of just that one. Use when `check` reports a family as not loaded but the font files are already in src/brand/fonts/ \u2014 downloading it again would hand that page a different build of the same face."
|
|
@@ -34034,7 +34329,7 @@ var fontsAdoptCommand = defineCommand104({
|
|
|
34034
34329
|
});
|
|
34035
34330
|
}
|
|
34036
34331
|
});
|
|
34037
|
-
var fontsCommand =
|
|
34332
|
+
var fontsCommand = defineCommand105({
|
|
34038
34333
|
meta: {
|
|
34039
34334
|
name: "fonts",
|
|
34040
34335
|
description: `Verify and self-host the brand's typefaces.
|
|
@@ -34054,7 +34349,7 @@ Subcommands:
|
|
|
34054
34349
|
});
|
|
34055
34350
|
|
|
34056
34351
|
// src/commands/brand/index.ts
|
|
34057
|
-
var brandCommand =
|
|
34352
|
+
var brandCommand = defineCommand106({
|
|
34058
34353
|
meta: {
|
|
34059
34354
|
name: "brand",
|
|
34060
34355
|
description: `Brand asset verification for src/brand/.
|
|
@@ -34070,11 +34365,11 @@ Subcommands:
|
|
|
34070
34365
|
});
|
|
34071
34366
|
|
|
34072
34367
|
// src/commands/canvas/index.ts
|
|
34073
|
-
import { defineCommand as
|
|
34368
|
+
import { defineCommand as defineCommand118 } from "citty";
|
|
34074
34369
|
|
|
34075
34370
|
// src/commands/canvas/catalog.ts
|
|
34076
|
-
import { defineCommand as
|
|
34077
|
-
var catalogCommand =
|
|
34371
|
+
import { defineCommand as defineCommand107 } from "citty";
|
|
34372
|
+
var catalogCommand = defineCommand107({
|
|
34078
34373
|
meta: {
|
|
34079
34374
|
name: "catalog",
|
|
34080
34375
|
description: "Print the agent-facing node catalog (JSON Schema). Includes every registered node grouped by category."
|
|
@@ -34089,7 +34384,7 @@ var catalogCommand = defineCommand106({
|
|
|
34089
34384
|
// src/commands/canvas/critique.ts
|
|
34090
34385
|
import { readFile as readFile3 } from "fs/promises";
|
|
34091
34386
|
import path3 from "path";
|
|
34092
|
-
import { defineCommand as
|
|
34387
|
+
import { defineCommand as defineCommand108 } from "citty";
|
|
34093
34388
|
|
|
34094
34389
|
// src/engine/scaffold/lib/critique.ts
|
|
34095
34390
|
var VIBE_CUE = /\b(light|lighting|golden|moody|warm|cool|tone|grade|contrast|shadow|glow|rim|backlit|neon|soft)\b/i;
|
|
@@ -34209,7 +34504,7 @@ function critiqueCanvas(canvas) {
|
|
|
34209
34504
|
}
|
|
34210
34505
|
|
|
34211
34506
|
// src/commands/canvas/critique.ts
|
|
34212
|
-
var critiqueCommand =
|
|
34507
|
+
var critiqueCommand = defineCommand108({
|
|
34213
34508
|
meta: {
|
|
34214
34509
|
name: "critique",
|
|
34215
34510
|
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."
|
|
@@ -34251,9 +34546,9 @@ import { execFile } from "child_process";
|
|
|
34251
34546
|
import { readdir as readdir2, readFile as readFile4, stat } from "fs/promises";
|
|
34252
34547
|
import path4 from "path";
|
|
34253
34548
|
import { promisify } from "util";
|
|
34254
|
-
import { defineCommand as
|
|
34549
|
+
import { defineCommand as defineCommand109 } from "citty";
|
|
34255
34550
|
var execFileAsync = promisify(execFile);
|
|
34256
|
-
var inspectCommand =
|
|
34551
|
+
var inspectCommand = defineCommand109({
|
|
34257
34552
|
meta: {
|
|
34258
34553
|
name: "inspect",
|
|
34259
34554
|
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."
|
|
@@ -34361,12 +34656,12 @@ async function probeDuration(filePath) {
|
|
|
34361
34656
|
|
|
34362
34657
|
// src/commands/canvas/rerun.ts
|
|
34363
34658
|
import path17 from "path";
|
|
34364
|
-
import { defineCommand as
|
|
34659
|
+
import { defineCommand as defineCommand111 } from "citty";
|
|
34365
34660
|
|
|
34366
34661
|
// src/commands/canvas/run.ts
|
|
34367
34662
|
import { readFile as readFile12 } from "fs/promises";
|
|
34368
34663
|
import path16 from "path";
|
|
34369
|
-
import { defineCommand as
|
|
34664
|
+
import { defineCommand as defineCommand110 } from "citty";
|
|
34370
34665
|
|
|
34371
34666
|
// src/commands/canvas/normalize-paths.ts
|
|
34372
34667
|
import { existsSync as existsSync4, realpathSync } from "fs";
|
|
@@ -39281,7 +39576,7 @@ function unreviewedNotes(state) {
|
|
|
39281
39576
|
}
|
|
39282
39577
|
|
|
39283
39578
|
// src/commands/canvas/run.ts
|
|
39284
|
-
var runCommand =
|
|
39579
|
+
var runCommand = defineCommand110({
|
|
39285
39580
|
meta: { name: "run", description: "Validate and execute a canvas JSON file." },
|
|
39286
39581
|
args: {
|
|
39287
39582
|
file: { type: "positional", required: true, description: "Path to canvas JSON" },
|
|
@@ -39746,7 +40041,7 @@ async function postInitialRunRecord(client, payload) {
|
|
|
39746
40041
|
|
|
39747
40042
|
// src/commands/canvas/rerun.ts
|
|
39748
40043
|
var SLUG_PATTERN = /^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/;
|
|
39749
|
-
var rerunCommand =
|
|
40044
|
+
var rerunCommand = defineCommand111({
|
|
39750
40045
|
meta: {
|
|
39751
40046
|
name: "rerun",
|
|
39752
40047
|
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."
|
|
@@ -39843,7 +40138,7 @@ async function fetchManifest(url) {
|
|
|
39843
40138
|
// src/commands/canvas/scaffold-static-ad.ts
|
|
39844
40139
|
import { access, mkdir as mkdir6, readFile as readFile14, writeFile as writeFile8 } from "fs/promises";
|
|
39845
40140
|
import path21 from "path";
|
|
39846
|
-
import { defineCommand as
|
|
40141
|
+
import { defineCommand as defineCommand113 } from "citty";
|
|
39847
40142
|
|
|
39848
40143
|
// src/engine/scaffold/staticAd.ts
|
|
39849
40144
|
import { z as z38 } from "zod";
|
|
@@ -40199,7 +40494,7 @@ function isValidScaffoldSlug(slug) {
|
|
|
40199
40494
|
// src/commands/canvas/sync-definition.ts
|
|
40200
40495
|
import { readdir as readdir7, readFile as readFile13, stat as stat3 } from "fs/promises";
|
|
40201
40496
|
import path20 from "path";
|
|
40202
|
-
import { defineCommand as
|
|
40497
|
+
import { defineCommand as defineCommand112 } from "citty";
|
|
40203
40498
|
|
|
40204
40499
|
// src/commands/canvas/definition-graph.ts
|
|
40205
40500
|
var MAX_NODES = 300;
|
|
@@ -40312,7 +40607,7 @@ async function resolveCanvasPath(inputPath) {
|
|
|
40312
40607
|
const chosen = (slug ? canvases.find((name) => name === `${slug}.canvas.json`) : void 0) ?? canvases[0];
|
|
40313
40608
|
return chosen ? path20.join(dir, chosen) : null;
|
|
40314
40609
|
}
|
|
40315
|
-
var syncDefinitionCommand =
|
|
40610
|
+
var syncDefinitionCommand = defineCommand112({
|
|
40316
40611
|
meta: {
|
|
40317
40612
|
name: "sync-definition",
|
|
40318
40613
|
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."
|
|
@@ -40542,7 +40837,7 @@ async function runVisionPasses(canvas) {
|
|
|
40542
40837
|
return fail3("read_outputs", e instanceof Error ? e.message : String(e));
|
|
40543
40838
|
}
|
|
40544
40839
|
}
|
|
40545
|
-
var scaffoldStaticAdCommand =
|
|
40840
|
+
var scaffoldStaticAdCommand = defineCommand113({
|
|
40546
40841
|
meta: {
|
|
40547
40842
|
name: "scaffold-static-ad",
|
|
40548
40843
|
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."
|
|
@@ -40767,7 +41062,7 @@ function clientLogoRefusal(decision, domain) {
|
|
|
40767
41062
|
// src/commands/canvas/scaffold-ad.ts
|
|
40768
41063
|
import { copyFile, cp, mkdir as mkdir7, readFile as readFile16, stat as stat4, writeFile as writeFile9 } from "fs/promises";
|
|
40769
41064
|
import path24 from "path";
|
|
40770
|
-
import { defineCommand as
|
|
41065
|
+
import { defineCommand as defineCommand114 } from "citty";
|
|
40771
41066
|
|
|
40772
41067
|
// src/engine/scaffold/ad-spec.ts
|
|
40773
41068
|
import { z as z39 } from "zod";
|
|
@@ -41577,7 +41872,7 @@ registerSchema({
|
|
|
41577
41872
|
}
|
|
41578
41873
|
}
|
|
41579
41874
|
});
|
|
41580
|
-
var scaffoldAdCommand =
|
|
41875
|
+
var scaffoldAdCommand = defineCommand114({
|
|
41581
41876
|
meta: {
|
|
41582
41877
|
name: "scaffold-ad",
|
|
41583
41878
|
description: 'Build a captioned vertical ad from a written spec, with no reference video to copy.\n\nA spec is a list of BEATS. One beat = one line the voice says + one shot on screen while it is said. That pairing is what keeps the ad honest: the caption card IS the line, so it can never end mid-sentence, and the picture can never drift from the read.\n\nTwo rules the spec enforces for you, both learned the expensive way:\n \u2022 `say` is ONE clause with its own punctuation. Two sentences in a beat is rejected.\n \u2022 Nobody in shot is speaking unless you set `on_camera` on that beat. A person visibly talking under a voice that is not theirs reads as bad dubbing.\n\nExample spec:\n { "beats": [\n { "say": "Mientras t\xFA sigues pagando la luz a precio de oro,", "show": "Aerial over Spanish rooftops at golden hour." },\n { "say": "Haz clic en el enlace y reserva tu estudio gratuito.", "show": "A couple walking home at sunset." } ] }\n\nWho is in it:\n `cast: { avatar: "marta" }` grounds every beat on that avatar\'s face \u2014 cast one with `baker avatars`.\n Without a cast, each beat invents its own person and the ad reads as a stock-footage collage.\n\nHow it ends: with a `brand`, the last beat closes on a flat brand plate carrying the mark and the CTA.\n\nThen: baker canvas run <the canvas it writes>'
|
|
@@ -42014,7 +42309,7 @@ async function fetchClientLogo() {
|
|
|
42014
42309
|
import { access as access2, cp as cp2, mkdir as mkdir8, readFile as readFile19, rm as rm7, writeFile as writeFile10 } from "fs/promises";
|
|
42015
42310
|
import { tmpdir as tmpdir3 } from "os";
|
|
42016
42311
|
import path26 from "path";
|
|
42017
|
-
import { defineCommand as
|
|
42312
|
+
import { defineCommand as defineCommand115 } from "citty";
|
|
42018
42313
|
|
|
42019
42314
|
// src/engine/scaffold/lib/model-router.ts
|
|
42020
42315
|
var SEEDANCE = "bytedance/seedance-2.0";
|
|
@@ -42459,7 +42754,7 @@ async function runAnalysisPasses(deconstructCanvas, selectModel) {
|
|
|
42459
42754
|
return fail4("deconstruct", e instanceof Error ? e.message : String(e));
|
|
42460
42755
|
}
|
|
42461
42756
|
}
|
|
42462
|
-
var scaffoldVideoCommand =
|
|
42757
|
+
var scaffoldVideoCommand = defineCommand115({
|
|
42463
42758
|
meta: {
|
|
42464
42759
|
name: "scaffold-video",
|
|
42465
42760
|
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`."
|
|
@@ -42769,7 +43064,7 @@ var scaffoldVideoCommand = defineCommand114({
|
|
|
42769
43064
|
// src/commands/canvas/set-prompt.ts
|
|
42770
43065
|
import { readFile as readFile20, writeFile as writeFile11 } from "fs/promises";
|
|
42771
43066
|
import path27 from "path";
|
|
42772
|
-
import { defineCommand as
|
|
43067
|
+
import { defineCommand as defineCommand116 } from "citty";
|
|
42773
43068
|
function setNodePrompt(canvas, nodeId, text2) {
|
|
42774
43069
|
const nodes = canvas?.nodes;
|
|
42775
43070
|
if (!Array.isArray(nodes)) throw new Error("canvas has no nodes array");
|
|
@@ -42784,7 +43079,7 @@ function setNodePrompt(canvas, nodeId, text2) {
|
|
|
42784
43079
|
newNodes[idx] = newNode;
|
|
42785
43080
|
return { ...canvas, nodes: newNodes };
|
|
42786
43081
|
}
|
|
42787
|
-
var setPromptCommand =
|
|
43082
|
+
var setPromptCommand = defineCommand116({
|
|
42788
43083
|
meta: {
|
|
42789
43084
|
name: "set-prompt",
|
|
42790
43085
|
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."
|
|
@@ -42844,8 +43139,8 @@ var setPromptCommand = defineCommand115({
|
|
|
42844
43139
|
// src/commands/canvas/validate.ts
|
|
42845
43140
|
import { readFile as readFile21 } from "fs/promises";
|
|
42846
43141
|
import path28 from "path";
|
|
42847
|
-
import { defineCommand as
|
|
42848
|
-
var validateCommand =
|
|
43142
|
+
import { defineCommand as defineCommand117 } from "citty";
|
|
43143
|
+
var validateCommand = defineCommand117({
|
|
42849
43144
|
meta: {
|
|
42850
43145
|
name: "validate",
|
|
42851
43146
|
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)."
|
|
@@ -42918,7 +43213,7 @@ var validateCommand = defineCommand116({
|
|
|
42918
43213
|
});
|
|
42919
43214
|
|
|
42920
43215
|
// src/commands/canvas/index.ts
|
|
42921
|
-
var canvasCommand =
|
|
43216
|
+
var canvasCommand = defineCommand118({
|
|
42922
43217
|
meta: {
|
|
42923
43218
|
name: "canvas",
|
|
42924
43219
|
description: `Run Baker creative canvas JSON files locally. Local nodes execute in-process; remote nodes POST to the Convex backend gateway.
|
|
@@ -42954,7 +43249,7 @@ Full guide: __tooling__/docs/tools/baker/canvas.md`
|
|
|
42954
43249
|
});
|
|
42955
43250
|
|
|
42956
43251
|
// src/commands/capabilities/index.ts
|
|
42957
|
-
import { defineCommand as
|
|
43252
|
+
import { defineCommand as defineCommand119 } from "citty";
|
|
42958
43253
|
registerSchema({
|
|
42959
43254
|
command: "capabilities",
|
|
42960
43255
|
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.",
|
|
@@ -43009,7 +43304,7 @@ function capabilityHints(surfaces, tools = []) {
|
|
|
43009
43304
|
}
|
|
43010
43305
|
return hints2;
|
|
43011
43306
|
}
|
|
43012
|
-
var runCapabilities =
|
|
43307
|
+
var runCapabilities = defineCommand119({
|
|
43013
43308
|
meta: {
|
|
43014
43309
|
name: "capabilities",
|
|
43015
43310
|
description: `What Baker can and cannot do for this company, before any work starts.
|
|
@@ -43067,7 +43362,7 @@ Full guide: __tooling__/docs/tools/baker/capabilities.md`
|
|
|
43067
43362
|
var capabilitiesCommand = runCapabilities;
|
|
43068
43363
|
|
|
43069
43364
|
// src/commands/chats/index.ts
|
|
43070
|
-
import { defineCommand as
|
|
43365
|
+
import { defineCommand as defineCommand120 } from "citty";
|
|
43071
43366
|
var STATUS_GROUPS = ["active", "archived", "all"];
|
|
43072
43367
|
var REPO_SURFACES = ["knowledge", "company", "brand", "landings", "flows", "creatives"];
|
|
43073
43368
|
function parseBoundedInt(raw, name, min, max) {
|
|
@@ -43089,7 +43384,7 @@ registerSchema({
|
|
|
43089
43384
|
full: { type: "boolean", description: "Include each Session's full change list", required: false, default: false }
|
|
43090
43385
|
}
|
|
43091
43386
|
});
|
|
43092
|
-
var
|
|
43387
|
+
var listCommand13 = defineCommand120({
|
|
43093
43388
|
meta: { name: "list", description: "List other Sessions on this account, newest first." },
|
|
43094
43389
|
args: {
|
|
43095
43390
|
status: { type: "string", description: "Filter: active|archived|all (default: all)", required: false },
|
|
@@ -43144,7 +43439,7 @@ registerSchema({
|
|
|
43144
43439
|
}
|
|
43145
43440
|
}
|
|
43146
43441
|
});
|
|
43147
|
-
var viewCommand =
|
|
43442
|
+
var viewCommand = defineCommand120({
|
|
43148
43443
|
meta: {
|
|
43149
43444
|
name: "view",
|
|
43150
43445
|
description: "Inspect one Session's full effects \u2014 git content + actions/tags/ads, kickoff, commits."
|
|
@@ -43188,7 +43483,7 @@ registerSchema({
|
|
|
43188
43483
|
}
|
|
43189
43484
|
}
|
|
43190
43485
|
});
|
|
43191
|
-
var transcriptCommand =
|
|
43486
|
+
var transcriptCommand = defineCommand120({
|
|
43192
43487
|
meta: { name: "transcript", description: "Read another Session's conversation." },
|
|
43193
43488
|
args: {
|
|
43194
43489
|
id: { type: "positional", description: "The Session id", required: true },
|
|
@@ -43240,7 +43535,7 @@ registerSchema({
|
|
|
43240
43535
|
}
|
|
43241
43536
|
}
|
|
43242
43537
|
});
|
|
43243
|
-
var diffCommand =
|
|
43538
|
+
var diffCommand = defineCommand120({
|
|
43244
43539
|
meta: { name: "diff", description: "See a published Session's real file-level changes." },
|
|
43245
43540
|
args: {
|
|
43246
43541
|
id: { type: "positional", description: "The Session id", required: true },
|
|
@@ -43284,14 +43579,14 @@ var diffCommand = defineCommand119({
|
|
|
43284
43579
|
}
|
|
43285
43580
|
}
|
|
43286
43581
|
});
|
|
43287
|
-
var chatsCommand =
|
|
43582
|
+
var chatsCommand = defineCommand120({
|
|
43288
43583
|
meta: {
|
|
43289
43584
|
name: "chats",
|
|
43290
43585
|
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.
|
|
43291
43586
|
Full guide: __tooling__/docs/tools/baker/chats.md`
|
|
43292
43587
|
},
|
|
43293
43588
|
subCommands: {
|
|
43294
|
-
list:
|
|
43589
|
+
list: listCommand13,
|
|
43295
43590
|
view: viewCommand,
|
|
43296
43591
|
transcript: transcriptCommand,
|
|
43297
43592
|
diff: diffCommand
|
|
@@ -43299,10 +43594,10 @@ Full guide: __tooling__/docs/tools/baker/chats.md`
|
|
|
43299
43594
|
});
|
|
43300
43595
|
|
|
43301
43596
|
// src/commands/creatives/index.ts
|
|
43302
|
-
import { defineCommand as
|
|
43597
|
+
import { defineCommand as defineCommand122 } from "citty";
|
|
43303
43598
|
|
|
43304
43599
|
// src/commands/creatives/publish.ts
|
|
43305
|
-
import { defineCommand as
|
|
43600
|
+
import { defineCommand as defineCommand121 } from "citty";
|
|
43306
43601
|
|
|
43307
43602
|
// src/commands/images/api.ts
|
|
43308
43603
|
import { readFile as readFile22 } from "fs/promises";
|
|
@@ -43449,7 +43744,7 @@ async function publishCreative(args4, deps = defaultImageApiDeps) {
|
|
|
43449
43744
|
chatId: chatIdFromEnv2()
|
|
43450
43745
|
});
|
|
43451
43746
|
}
|
|
43452
|
-
var publishCommand =
|
|
43747
|
+
var publishCommand = defineCommand121({
|
|
43453
43748
|
meta: {
|
|
43454
43749
|
name: "publish",
|
|
43455
43750
|
description: "Publish a final static creative image to Baker Creatives and print the creative reference JSON."
|
|
@@ -43507,7 +43802,7 @@ var publishCommand = defineCommand120({
|
|
|
43507
43802
|
});
|
|
43508
43803
|
|
|
43509
43804
|
// src/commands/creatives/index.ts
|
|
43510
|
-
var creativesCommand3 =
|
|
43805
|
+
var creativesCommand3 = defineCommand122({
|
|
43511
43806
|
meta: {
|
|
43512
43807
|
name: "creatives",
|
|
43513
43808
|
description: `Publish static ad creatives as first-class Baker outputs.
|
|
@@ -43524,7 +43819,7 @@ Full guide: __tooling__/docs/tools/baker/creatives.md`
|
|
|
43524
43819
|
});
|
|
43525
43820
|
|
|
43526
43821
|
// src/commands/experiment/index.ts
|
|
43527
|
-
import { defineCommand as
|
|
43822
|
+
import { defineCommand as defineCommand123 } from "citty";
|
|
43528
43823
|
|
|
43529
43824
|
// src/commands/experiment/composition.ts
|
|
43530
43825
|
import { readdir as readdir11, readFile as readFile24 } from "fs/promises";
|
|
@@ -44832,7 +45127,7 @@ registerSchema({
|
|
|
44832
45127
|
baseline: BASELINE_ARG
|
|
44833
45128
|
}
|
|
44834
45129
|
});
|
|
44835
|
-
var planCommand =
|
|
45130
|
+
var planCommand = defineCommand123({
|
|
44836
45131
|
meta: {
|
|
44837
45132
|
name: "plan",
|
|
44838
45133
|
description: "Start here, BEFORE building the alternative page. Says which event the test would be read on, which events the page's visitors actually go on to do (by key, with the conversion name each is counted under), how long it might take at this page's traffic, and what a 14, 28, 56 or 90-day window could settle. The duration is a guide, never a finish line \u2014 a test ends when the numbers are clear, and a page with no traffic yet can still be tested (`warning` says what it was sized on). What IS refused is a test that could not be measured: a goal this page has demonstrably never produced."
|
|
@@ -44877,7 +45172,7 @@ registerSchema({
|
|
|
44877
45172
|
baseline: BASELINE_ARG
|
|
44878
45173
|
}
|
|
44879
45174
|
});
|
|
44880
|
-
var startCommand =
|
|
45175
|
+
var startCommand = defineCommand123({
|
|
44881
45176
|
meta: {
|
|
44882
45177
|
name: "start",
|
|
44883
45178
|
description: "Stage a test between the page and its new variant. Visitors are split between the two versions at the edge, so there is no flicker and nothing for an ad blocker to suppress. Nothing goes live until the session is published \u2014 the person publishing is the review of the new variant. Re-runs `plan` first and refuses on the same grounds."
|
|
@@ -44955,7 +45250,7 @@ registerSchema({
|
|
|
44955
45250
|
full: { type: "boolean", description: "Include the posteriors behind the verdict", required: false }
|
|
44956
45251
|
}
|
|
44957
45252
|
});
|
|
44958
|
-
var statusCommand6 =
|
|
45253
|
+
var statusCommand6 = defineCommand123({
|
|
44959
45254
|
meta: {
|
|
44960
45255
|
name: "status",
|
|
44961
45256
|
description: "The verdict on each test. Read `verdict` and nothing else to decide: keep_running | winner | no_difference | invalid | stopped_early_harmful. `summary` is one sentence you can show the client, and `secondary` lists every other conversion the company counts on the same two arms \u2014 context, never a second decision. The numbers under `--full` are for printing, never for deciding \u2014 a test that says keep_running has not finished, however good its numbers look."
|
|
@@ -44990,7 +45285,7 @@ registerSchema({
|
|
|
44990
45285
|
limit: { type: "string", description: "At most this many, newest first (default all)", required: false }
|
|
44991
45286
|
}
|
|
44992
45287
|
});
|
|
44993
|
-
var historyCommand =
|
|
45288
|
+
var historyCommand = defineCommand123({
|
|
44994
45289
|
meta: {
|
|
44995
45290
|
name: "history",
|
|
44996
45291
|
description: "What was tested before and what it taught. Finished tests only, newest first: the claim, what was different, what the numbers said, what was kept and whether that went against them, and the `learning` somebody wrote down. Read it \u2014 `--landing <slug>` for one page \u2014 BEFORE proposing a test: a refuted idea proposed again spends the page's traffic to return the same answer, and a supported one is what the next test should build on. `plan` hands the same entries back as `pastTests` for the page it sizes."
|
|
@@ -45054,7 +45349,7 @@ function finishHints(data, given) {
|
|
|
45054
45349
|
]
|
|
45055
45350
|
];
|
|
45056
45351
|
}
|
|
45057
|
-
var finishCommand =
|
|
45352
|
+
var finishCommand = defineCommand123({
|
|
45058
45353
|
meta: {
|
|
45059
45354
|
name: "finish",
|
|
45060
45355
|
description: "End a test now and send all its traffic to the version you name. Takes effect within seconds \u2014 nothing to publish. Read `baker experiment status` first: `winner` says which version the numbers favour, `keep_running` means they have not spoken yet and ending records `inconclusive`. Keeping the variant owes a `fold`. A test staged in this session and not yet published is simply taken back off it."
|
|
@@ -45108,7 +45403,7 @@ registerSchema({
|
|
|
45108
45403
|
description: "Call a test off \u2014 take a staged one back off the session, or end a live one keeping the original",
|
|
45109
45404
|
args: { id: ID_ARG }
|
|
45110
45405
|
});
|
|
45111
|
-
var cancelCommand =
|
|
45406
|
+
var cancelCommand = defineCommand123({
|
|
45112
45407
|
meta: {
|
|
45113
45408
|
name: "cancel",
|
|
45114
45409
|
description: "Call a test off. A test staged in this session and not yet published is simply taken back off it \u2014 nothing was split. A test that is live is ended now with everyone sent back to the original: what the numbers had said is recorded as it stood (usually `inconclusive`), and the variant page stays in the workspace, unserved. `finish --keep` is the same act with the choice of version; this is the shortcut for \u201Cstop, keep the page as it is\u201D."
|
|
@@ -45165,7 +45460,7 @@ registerSchema({
|
|
|
45165
45460
|
learning: LEARNING_ARG
|
|
45166
45461
|
}
|
|
45167
45462
|
});
|
|
45168
|
-
var updateCommand3 =
|
|
45463
|
+
var updateCommand3 = defineCommand123({
|
|
45169
45464
|
meta: {
|
|
45170
45465
|
name: "update",
|
|
45171
45466
|
description: "Change what a test says about itself. The observation (`--because`), the change in the client's words (`--change`) and the evidence cited (`--evidence`) can change at any time \u2014 they describe the test, and a write-up corrected after the fact is still the write-up of the same test. On a FINISHED test, `--learning` writes down what it taught. What the test MEASURES \u2014 `--goal`, `--lift`, `--expect` \u2014 can only change while it is still staged in this session: once visitors have been split, moving the goal or the finish line is how a result gets argued into existence. To measure something else on a live test, `finish` it and start a new one."
|
|
@@ -45207,7 +45502,7 @@ registerSchema({
|
|
|
45207
45502
|
description: "Switch a test's split off \u2014 everyone sees the original until it is resumed",
|
|
45208
45503
|
args: { id: ID_ARG }
|
|
45209
45504
|
});
|
|
45210
|
-
var pauseCommand =
|
|
45505
|
+
var pauseCommand = defineCommand123({
|
|
45211
45506
|
meta: {
|
|
45212
45507
|
name: "pause",
|
|
45213
45508
|
description: "Switch the split off now. Everyone sees the original; visitors already assigned keep their side, so resuming continues the same test rather than starting a new one. Use it when the new variant has to come down for a while \u2014 a broken price, a campaign that needs the original \u2014 without throwing the test away."
|
|
@@ -45233,7 +45528,7 @@ registerSchema({
|
|
|
45233
45528
|
description: "Switch a paused test's split back on",
|
|
45234
45529
|
args: { id: ID_ARG }
|
|
45235
45530
|
});
|
|
45236
|
-
var resumeCommand =
|
|
45531
|
+
var resumeCommand = defineCommand123({
|
|
45237
45532
|
meta: {
|
|
45238
45533
|
name: "resume",
|
|
45239
45534
|
description: "Switch a paused test's split back on. Visitors already assigned see the same side they saw before."
|
|
@@ -45259,7 +45554,7 @@ registerSchema({
|
|
|
45259
45554
|
id: { type: "string", description: "One test, by its id. Omit to fold every test that owes one", required: false }
|
|
45260
45555
|
}
|
|
45261
45556
|
});
|
|
45262
|
-
var foldCommand =
|
|
45557
|
+
var foldCommand = defineCommand123({
|
|
45263
45558
|
meta: {
|
|
45264
45559
|
name: "fold",
|
|
45265
45560
|
description: "Finish the job a finished test started: move the winning version into the page's own folder, archive the version that lost, and delete the extra page. Until this runs, the page is served by a rewrite at the edge while its own source says something else \u2014 so the repo does not say what the URL serves, and the page cannot be tested again. Start here: run it with no arguments after any test ends, then publish."
|
|
@@ -45311,7 +45606,7 @@ var foldCommand = defineCommand122({
|
|
|
45311
45606
|
}
|
|
45312
45607
|
}
|
|
45313
45608
|
});
|
|
45314
|
-
var experimentCommand =
|
|
45609
|
+
var experimentCommand = defineCommand123({
|
|
45315
45610
|
meta: {
|
|
45316
45611
|
name: "experiment",
|
|
45317
45612
|
description: "Run an A/B test between a landing page and a new variant of it, and be told which one is better. Always `plan` first: most pages do not get enough traffic to settle most questions, and a test that cannot conclude still produces a number somebody will act on. Nothing ends a test on its own \u2014 `finish` does, when you or the client decide."
|
|
@@ -45354,11 +45649,11 @@ async function readStartContext(landing, variant) {
|
|
|
45354
45649
|
}
|
|
45355
45650
|
|
|
45356
45651
|
// src/commands/flows/index.ts
|
|
45357
|
-
import { defineCommand as
|
|
45652
|
+
import { defineCommand as defineCommand128 } from "citty";
|
|
45358
45653
|
|
|
45359
45654
|
// src/commands/flows/add.ts
|
|
45360
45655
|
import { randomUUID } from "crypto";
|
|
45361
|
-
import { defineCommand as
|
|
45656
|
+
import { defineCommand as defineCommand124 } from "citty";
|
|
45362
45657
|
function unknownType(kind, type) {
|
|
45363
45658
|
writeJson({
|
|
45364
45659
|
ok: false,
|
|
@@ -45398,7 +45693,7 @@ registerSchema({
|
|
|
45398
45693
|
parent: { type: "string", description: "Parent node id. Omit to append to the root's children.", required: false }
|
|
45399
45694
|
}
|
|
45400
45695
|
});
|
|
45401
|
-
var addNodeCommand =
|
|
45696
|
+
var addNodeCommand = defineCommand124({
|
|
45402
45697
|
meta: {
|
|
45403
45698
|
name: "add-node",
|
|
45404
45699
|
description: 'Add a step to a form, with the skeleton its type requires. Example: baker flows add-node contact --type customForm --name "Contact Info"'
|
|
@@ -45498,7 +45793,7 @@ registerSchema({
|
|
|
45498
45793
|
}
|
|
45499
45794
|
}
|
|
45500
45795
|
});
|
|
45501
|
-
var addSideEffectCommand =
|
|
45796
|
+
var addSideEffectCommand = defineCommand124({
|
|
45502
45797
|
meta: {
|
|
45503
45798
|
name: "add-side-effect",
|
|
45504
45799
|
description: "Add a side effect to a step, with the skeleton its type requires. Example: baker flows add-side-effect contact --node <id> --type googleSpreadsheet"
|
|
@@ -45587,7 +45882,7 @@ var addSideEffectCommand = defineCommand123({
|
|
|
45587
45882
|
|
|
45588
45883
|
// src/commands/flows/map.ts
|
|
45589
45884
|
import { readFileSync as readFileSync14 } from "fs";
|
|
45590
|
-
import { defineCommand as
|
|
45885
|
+
import { defineCommand as defineCommand125 } from "citty";
|
|
45591
45886
|
|
|
45592
45887
|
// src/commands/flows/value-expression.ts
|
|
45593
45888
|
import { existsSync as existsSync6, readFileSync as readFileSync13 } from "fs";
|
|
@@ -46393,7 +46688,7 @@ async function mapOptions(args4, fromFile, into) {
|
|
|
46393
46688
|
] : []
|
|
46394
46689
|
};
|
|
46395
46690
|
}
|
|
46396
|
-
var mapCommand2 =
|
|
46691
|
+
var mapCommand2 = defineCommand125({
|
|
46397
46692
|
meta: {
|
|
46398
46693
|
name: "map",
|
|
46399
46694
|
description: "Map form fields onto any value a side effect sends \u2014 never hand-write a mapping. Start here: baker flows map contact --from map.json --write"
|
|
@@ -46493,7 +46788,7 @@ var mapCommand2 = defineCommand124({
|
|
|
46493
46788
|
});
|
|
46494
46789
|
|
|
46495
46790
|
// src/commands/flows/normalize.ts
|
|
46496
|
-
import { defineCommand as
|
|
46791
|
+
import { defineCommand as defineCommand126 } from "citty";
|
|
46497
46792
|
var OPTIONAL_STRINGS = ["oauthProviderId"];
|
|
46498
46793
|
var ARRAY_FIELDS = [
|
|
46499
46794
|
"fieldMapping",
|
|
@@ -46562,7 +46857,7 @@ registerSchema({
|
|
|
46562
46857
|
}
|
|
46563
46858
|
}
|
|
46564
46859
|
});
|
|
46565
|
-
var normalizeCommand =
|
|
46860
|
+
var normalizeCommand = defineCommand126({
|
|
46566
46861
|
meta: {
|
|
46567
46862
|
name: "normalize",
|
|
46568
46863
|
description: "Repair the shapes a form file is allowed to get slightly wrong. Example: baker flows normalize contact --write"
|
|
@@ -46593,7 +46888,7 @@ var normalizeCommand = defineCommand125({
|
|
|
46593
46888
|
});
|
|
46594
46889
|
|
|
46595
46890
|
// src/commands/flows/schema.ts
|
|
46596
|
-
import { defineCommand as
|
|
46891
|
+
import { defineCommand as defineCommand127 } from "citty";
|
|
46597
46892
|
registerSchema({
|
|
46598
46893
|
command: "flows.schema",
|
|
46599
46894
|
description: "The shape of one node or side-effect type: a pasteable skeleton, who fills each part, and the reference file with the craft. Start here before authoring anything in a form's _data.json.",
|
|
@@ -46618,7 +46913,7 @@ function triggerHints(triggers) {
|
|
|
46618
46913
|
`A side effect on this step carries \`triggerId: "${triggers.completion}"\`, and \`baker flows add-side-effect\` writes it for you. The trigger belongs to the STEP, not to the side-effect type: one that does not match is valid, ships, and never runs.` + (others.length > 0 ? ` Other moments this step raises: ${others.join(", ")}.` : "")
|
|
46619
46914
|
];
|
|
46620
46915
|
}
|
|
46621
|
-
var schemaCommand =
|
|
46916
|
+
var schemaCommand = defineCommand127({
|
|
46622
46917
|
meta: {
|
|
46623
46918
|
name: "schema",
|
|
46624
46919
|
description: "Show a node or side-effect type's shape. Start here: baker flows schema node customForm \xB7 baker flows schema side-effect googleSpreadsheet \xB7 baker flows schema (lists both)"
|
|
@@ -46755,7 +47050,7 @@ function displayName(slug) {
|
|
|
46755
47050
|
const name = tree.displayName;
|
|
46756
47051
|
return typeof name === "string" && name.trim() ? name.trim() : slug;
|
|
46757
47052
|
}
|
|
46758
|
-
var
|
|
47053
|
+
var listCommand14 = defineCommand128({
|
|
46759
47054
|
meta: {
|
|
46760
47055
|
name: "list",
|
|
46761
47056
|
description: "List Forms in this workspace with the count of confidential fields still needing setup. Example: baker flows list"
|
|
@@ -46782,7 +47077,7 @@ var listCommand13 = defineCommand127({
|
|
|
46782
47077
|
});
|
|
46783
47078
|
}
|
|
46784
47079
|
});
|
|
46785
|
-
var showCommand4 =
|
|
47080
|
+
var showCommand4 = defineCommand128({
|
|
46786
47081
|
meta: {
|
|
46787
47082
|
name: "show",
|
|
46788
47083
|
description: "Show a Form's confidential fields and their configuration status (never secret values). Example: baker flows show contact"
|
|
@@ -46819,7 +47114,7 @@ var showCommand4 = defineCommand127({
|
|
|
46819
47114
|
});
|
|
46820
47115
|
}
|
|
46821
47116
|
});
|
|
46822
|
-
var flowsCommand =
|
|
47117
|
+
var flowsCommand = defineCommand128({
|
|
46823
47118
|
meta: {
|
|
46824
47119
|
name: "flows",
|
|
46825
47120
|
description: `Read and shape this workspace's Forms (flows).
|
|
@@ -46838,7 +47133,7 @@ Examples:
|
|
|
46838
47133
|
Full guide: __tooling__/docs/tools/baker/flows.md`
|
|
46839
47134
|
},
|
|
46840
47135
|
subCommands: {
|
|
46841
|
-
list:
|
|
47136
|
+
list: listCommand14,
|
|
46842
47137
|
show: showCommand4,
|
|
46843
47138
|
schema: schemaCommand,
|
|
46844
47139
|
"add-node": addNodeCommand,
|
|
@@ -46853,7 +47148,7 @@ Full guide: __tooling__/docs/tools/baker/flows.md`
|
|
|
46853
47148
|
});
|
|
46854
47149
|
|
|
46855
47150
|
// src/commands/funnel/index.ts
|
|
46856
|
-
import { defineCommand as
|
|
47151
|
+
import { defineCommand as defineCommand129 } from "citty";
|
|
46857
47152
|
|
|
46858
47153
|
// ../api/src/funnel/vocabulary.ts
|
|
46859
47154
|
var FUNNEL_STEP_CLASSES = [
|
|
@@ -47457,7 +47752,7 @@ registerSchema({
|
|
|
47457
47752
|
description: "Read the company's funnel, or draw one",
|
|
47458
47753
|
args: args3
|
|
47459
47754
|
});
|
|
47460
|
-
var funnelCommand2 =
|
|
47755
|
+
var funnelCommand2 = defineCommand129({
|
|
47461
47756
|
meta: {
|
|
47462
47757
|
name: "funnel",
|
|
47463
47758
|
description: 'Start here: run with no flags to see the funnel this company has, with the last 30 days of PEOPLE counted beside every step \u2014 `people` reached it, `atLeast` got at least that far, `before` got as far as the step before, `share` is the ratio, and `worstStep` names where the most people are lost. Every company has one from the day it exists: Visited (any landing) \u2192 Became a lead \u2192 Became a customer, the last two with no way in until somebody gives them one. Then `--moments` for everything a trigger can name (every event the company\'s Forms, pages and systems actually produced, its sources, its landings), and `--step \'<json>\'` to add or change ONE step in the client\'s own words \u2014 it replaces the step with that key, so restate its `after` and the triggers it keeps. A step is reached by three kinds of thing and nothing else: an event by its own key (`{"id":"t1","kind":"event","eventKey":"<from moments.events or moments.sources>"}`), one landing being viewed (`{"id":"t2","kind":"landing","landingId":"<from moments.landings>"}`) or any landing (`{"id":"t3","kind":"any_landing"}`). Nothing has to be named first. Pick every trigger from `--moments`, never from memory. A step with no `triggers` advances NOBODY and reports zero forever without warning \u2014 that is what the hints keep pointing at. There is no default door: a Form is only counted where a trigger names it. Keep it true: a chat that adds a Form, a Source or an event that moves people forward places it on its step in the same chat. Each step comes back with `sends[]`, read-only: where the people who reach it are sent and what happened, read off the system events behind its ways in. A send is set on the event with `baker analytics sends`, never on a step, and once published it spends ad budget \u2014 a failed one is named in the hints. Everything here is STAGED: it becomes the company\'s funnel in one piece when the chat is published \u2014 the client sees it on the canvas in this chat and can edit it there too \u2014 and the previous version stays on file so what was already measured under it is not lost.'
|
|
@@ -47497,10 +47792,10 @@ function handleError4(err) {
|
|
|
47497
47792
|
}
|
|
47498
47793
|
|
|
47499
47794
|
// src/commands/ga4/index.ts
|
|
47500
|
-
import { defineCommand as
|
|
47795
|
+
import { defineCommand as defineCommand136 } from "citty";
|
|
47501
47796
|
|
|
47502
47797
|
// src/commands/ga4/audit.ts
|
|
47503
|
-
import { defineCommand as
|
|
47798
|
+
import { defineCommand as defineCommand130 } from "citty";
|
|
47504
47799
|
|
|
47505
47800
|
// src/commands/ga4/resolve.ts
|
|
47506
47801
|
async function fetchProperties(useCache = true) {
|
|
@@ -47566,7 +47861,7 @@ registerSchema({
|
|
|
47566
47861
|
"no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false }
|
|
47567
47862
|
}
|
|
47568
47863
|
});
|
|
47569
|
-
var auditCommand2 =
|
|
47864
|
+
var auditCommand2 = defineCommand130({
|
|
47570
47865
|
meta: {
|
|
47571
47866
|
name: "audit",
|
|
47572
47867
|
description: `Run all GA4 admin health checks. Returns property config with playbook warnings.
|
|
@@ -47621,7 +47916,7 @@ Examples:
|
|
|
47621
47916
|
});
|
|
47622
47917
|
|
|
47623
47918
|
// src/commands/ga4/config.ts
|
|
47624
|
-
import { defineCommand as
|
|
47919
|
+
import { defineCommand as defineCommand131 } from "citty";
|
|
47625
47920
|
|
|
47626
47921
|
// src/commands/ga4/shared.ts
|
|
47627
47922
|
import { readFileSync as readFileSync15 } from "fs";
|
|
@@ -47817,7 +48112,7 @@ function configHints(config) {
|
|
|
47817
48112
|
}
|
|
47818
48113
|
return hints2;
|
|
47819
48114
|
}
|
|
47820
|
-
var configCommand =
|
|
48115
|
+
var configCommand = defineCommand131({
|
|
47821
48116
|
meta: {
|
|
47822
48117
|
name: "config",
|
|
47823
48118
|
description: `Read how the property is configured to measure \u2014 key events, custom definitions, custom events, retention
|
|
@@ -47849,7 +48144,7 @@ Examples:
|
|
|
47849
48144
|
});
|
|
47850
48145
|
|
|
47851
48146
|
// src/commands/ga4/draft.ts
|
|
47852
|
-
import { defineCommand as
|
|
48147
|
+
import { defineCommand as defineCommand132 } from "citty";
|
|
47853
48148
|
registerSchema({
|
|
47854
48149
|
command: "ga4.draft",
|
|
47855
48150
|
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.",
|
|
@@ -47858,13 +48153,13 @@ registerSchema({
|
|
|
47858
48153
|
chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
|
|
47859
48154
|
}
|
|
47860
48155
|
});
|
|
47861
|
-
var draftCommand4 =
|
|
48156
|
+
var draftCommand4 = defineCommand132({
|
|
47862
48157
|
meta: {
|
|
47863
48158
|
name: "draft",
|
|
47864
48159
|
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."
|
|
47865
48160
|
},
|
|
47866
48161
|
subCommands: {
|
|
47867
|
-
list:
|
|
48162
|
+
list: defineCommand132({
|
|
47868
48163
|
meta: { name: "list", description: "Review everything staged on this chat (--json for the raw envelope)" },
|
|
47869
48164
|
args: {
|
|
47870
48165
|
json: { type: "boolean", description: "Print the raw JSON envelope", required: false },
|
|
@@ -47874,7 +48169,7 @@ var draftCommand4 = defineCommand131({
|
|
|
47874
48169
|
await draftList(args4.json === true, args4.chat);
|
|
47875
48170
|
}
|
|
47876
48171
|
}),
|
|
47877
|
-
show:
|
|
48172
|
+
show: defineCommand132({
|
|
47878
48173
|
meta: {
|
|
47879
48174
|
name: "show",
|
|
47880
48175
|
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)."
|
|
@@ -47891,7 +48186,7 @@ var draftCommand4 = defineCommand131({
|
|
|
47891
48186
|
);
|
|
47892
48187
|
}
|
|
47893
48188
|
}),
|
|
47894
|
-
amend:
|
|
48189
|
+
amend: defineCommand132({
|
|
47895
48190
|
meta: {
|
|
47896
48191
|
name: "amend",
|
|
47897
48192
|
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."
|
|
@@ -47908,7 +48203,7 @@ var draftCommand4 = defineCommand131({
|
|
|
47908
48203
|
});
|
|
47909
48204
|
}
|
|
47910
48205
|
}),
|
|
47911
|
-
remove:
|
|
48206
|
+
remove: defineCommand132({
|
|
47912
48207
|
meta: { name: "remove", description: "Remove one staged change" },
|
|
47913
48208
|
args: { ref: { type: "positional", description: "Staged ref or target id", required: false } },
|
|
47914
48209
|
run: async ({ args: args4 }) => {
|
|
@@ -47917,7 +48212,7 @@ var draftCommand4 = defineCommand131({
|
|
|
47917
48212
|
});
|
|
47918
48213
|
}
|
|
47919
48214
|
}),
|
|
47920
|
-
clear:
|
|
48215
|
+
clear: defineCommand132({
|
|
47921
48216
|
meta: { name: "clear", description: "Discard all Google Analytics changes staged on this chat" },
|
|
47922
48217
|
run: async () => {
|
|
47923
48218
|
await draftAction2("/api/ga4/draft/clear", {});
|
|
@@ -47927,7 +48222,7 @@ var draftCommand4 = defineCommand131({
|
|
|
47927
48222
|
});
|
|
47928
48223
|
|
|
47929
48224
|
// src/commands/ga4/properties.ts
|
|
47930
|
-
import { defineCommand as
|
|
48225
|
+
import { defineCommand as defineCommand133 } from "citty";
|
|
47931
48226
|
registerSchema({
|
|
47932
48227
|
command: "ga4.properties",
|
|
47933
48228
|
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.",
|
|
@@ -47943,7 +48238,7 @@ function propertyHints(properties) {
|
|
|
47943
48238
|
resources: properties.map((property) => ({ id: property.externalId, label: property.name }))
|
|
47944
48239
|
});
|
|
47945
48240
|
}
|
|
47946
|
-
var propertiesCommand =
|
|
48241
|
+
var propertiesCommand = defineCommand133({
|
|
47947
48242
|
meta: {
|
|
47948
48243
|
name: "properties",
|
|
47949
48244
|
description: `List accessible GA4 properties.
|
|
@@ -47993,7 +48288,7 @@ Examples:
|
|
|
47993
48288
|
// src/commands/ga4/query.ts
|
|
47994
48289
|
import { appendFileSync as appendFileSync2, existsSync as existsSync7, readFileSync as readFileSync16, writeFileSync as writeFileSync4 } from "fs";
|
|
47995
48290
|
import { resolve as resolve2 } from "path";
|
|
47996
|
-
import { defineCommand as
|
|
48291
|
+
import { defineCommand as defineCommand134 } from "citty";
|
|
47997
48292
|
|
|
47998
48293
|
// src/commands/ga4/presets.ts
|
|
47999
48294
|
var GA4_PRESETS = [
|
|
@@ -48128,7 +48423,7 @@ function handleError6(err) {
|
|
|
48128
48423
|
});
|
|
48129
48424
|
process.exit(1);
|
|
48130
48425
|
}
|
|
48131
|
-
var queryCommand2 =
|
|
48426
|
+
var queryCommand2 = defineCommand134({
|
|
48132
48427
|
meta: {
|
|
48133
48428
|
name: "query",
|
|
48134
48429
|
description: `Run GA4 Data API reports. Preset-first with free-form escape hatch.
|
|
@@ -48199,7 +48494,7 @@ Free-form (escape hatch):
|
|
|
48199
48494
|
});
|
|
48200
48495
|
|
|
48201
48496
|
// src/commands/ga4/write-commands.ts
|
|
48202
|
-
import { defineCommand as
|
|
48497
|
+
import { defineCommand as defineCommand135 } from "citty";
|
|
48203
48498
|
var PROPERTY_ARG_DESCRIPTION = "GA4 property id (optional only when one property is connected \u2014 run `baker ga4 properties`)";
|
|
48204
48499
|
var propertyArg = { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false };
|
|
48205
48500
|
function createJsonDescription(noun) {
|
|
@@ -48217,7 +48512,7 @@ registerSchema({
|
|
|
48217
48512
|
"property-id": { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false }
|
|
48218
48513
|
}
|
|
48219
48514
|
});
|
|
48220
|
-
var keyEventCommand =
|
|
48515
|
+
var keyEventCommand = defineCommand135({
|
|
48221
48516
|
meta: {
|
|
48222
48517
|
name: "key-event",
|
|
48223
48518
|
description: `Stage key-event (conversion) changes
|
|
@@ -48230,7 +48525,7 @@ Examples:
|
|
|
48230
48525
|
baker ga4 key-event delete 4185`
|
|
48231
48526
|
},
|
|
48232
48527
|
subCommands: {
|
|
48233
|
-
create:
|
|
48528
|
+
create: defineCommand135({
|
|
48234
48529
|
meta: {
|
|
48235
48530
|
name: "create",
|
|
48236
48531
|
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."
|
|
@@ -48251,7 +48546,7 @@ Examples:
|
|
|
48251
48546
|
);
|
|
48252
48547
|
}
|
|
48253
48548
|
}),
|
|
48254
|
-
update:
|
|
48549
|
+
update: defineCommand135({
|
|
48255
48550
|
meta: {
|
|
48256
48551
|
name: "update",
|
|
48257
48552
|
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."
|
|
@@ -48271,7 +48566,7 @@ Examples:
|
|
|
48271
48566
|
});
|
|
48272
48567
|
}
|
|
48273
48568
|
}),
|
|
48274
|
-
delete:
|
|
48569
|
+
delete: defineCommand135({
|
|
48275
48570
|
meta: {
|
|
48276
48571
|
name: "delete",
|
|
48277
48572
|
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."
|
|
@@ -48319,7 +48614,7 @@ for (const { kind, noun, createHint } of DEFINITIONS) {
|
|
|
48319
48614
|
}
|
|
48320
48615
|
function definitionCommand(definition) {
|
|
48321
48616
|
const { command, kind, noun, example } = definition;
|
|
48322
|
-
return
|
|
48617
|
+
return defineCommand135({
|
|
48323
48618
|
meta: {
|
|
48324
48619
|
name: command,
|
|
48325
48620
|
description: `Stage ${noun} changes
|
|
@@ -48331,7 +48626,7 @@ Examples:
|
|
|
48331
48626
|
baker ga4 ${command} archive 12`
|
|
48332
48627
|
},
|
|
48333
48628
|
subCommands: {
|
|
48334
|
-
create:
|
|
48629
|
+
create: defineCommand135({
|
|
48335
48630
|
meta: { name: "create", description: `Stage a new ${noun} (or a JSON array of them, staged together)` },
|
|
48336
48631
|
args: {
|
|
48337
48632
|
json: { type: "string", description: createJsonDescription(noun), required: false },
|
|
@@ -48349,7 +48644,7 @@ Examples:
|
|
|
48349
48644
|
);
|
|
48350
48645
|
}
|
|
48351
48646
|
}),
|
|
48352
|
-
update:
|
|
48647
|
+
update: defineCommand135({
|
|
48353
48648
|
meta: {
|
|
48354
48649
|
name: "update",
|
|
48355
48650
|
description: `Stage a change to an existing ${noun} (pass its id). The parameter name and scope cannot change \u2014 archive and recreate for that.`
|
|
@@ -48369,7 +48664,7 @@ Examples:
|
|
|
48369
48664
|
});
|
|
48370
48665
|
}
|
|
48371
48666
|
}),
|
|
48372
|
-
archive:
|
|
48667
|
+
archive: defineCommand135({
|
|
48373
48668
|
meta: {
|
|
48374
48669
|
name: "archive",
|
|
48375
48670
|
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.`
|
|
@@ -48414,7 +48709,7 @@ var dataStreamArg = {
|
|
|
48414
48709
|
function withStream(args4) {
|
|
48415
48710
|
return typeof args4["data-stream"] === "string" ? { dataStream: args4["data-stream"] } : {};
|
|
48416
48711
|
}
|
|
48417
|
-
var customEventCommand =
|
|
48712
|
+
var customEventCommand = defineCommand135({
|
|
48418
48713
|
meta: {
|
|
48419
48714
|
name: "custom-event",
|
|
48420
48715
|
description: `Stage custom events \u2014 new events built from events the site already sends
|
|
@@ -48425,7 +48720,7 @@ Examples:
|
|
|
48425
48720
|
baker ga4 custom-event delete 7`
|
|
48426
48721
|
},
|
|
48427
48722
|
subCommands: {
|
|
48428
|
-
create:
|
|
48723
|
+
create: defineCommand135({
|
|
48429
48724
|
meta: {
|
|
48430
48725
|
name: "create",
|
|
48431
48726
|
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."
|
|
@@ -48448,7 +48743,7 @@ Examples:
|
|
|
48448
48743
|
);
|
|
48449
48744
|
}
|
|
48450
48745
|
}),
|
|
48451
|
-
update:
|
|
48746
|
+
update: defineCommand135({
|
|
48452
48747
|
meta: { name: "update", description: "Stage a change to an existing custom event (pass its id)" },
|
|
48453
48748
|
args: {
|
|
48454
48749
|
id: { type: "positional", description: "Custom event rule id", required: false },
|
|
@@ -48467,7 +48762,7 @@ Examples:
|
|
|
48467
48762
|
});
|
|
48468
48763
|
}
|
|
48469
48764
|
}),
|
|
48470
|
-
delete:
|
|
48765
|
+
delete: defineCommand135({
|
|
48471
48766
|
meta: {
|
|
48472
48767
|
name: "delete",
|
|
48473
48768
|
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."
|
|
@@ -48522,7 +48817,7 @@ function booleanArg(input, flag) {
|
|
|
48522
48817
|
if (input === "false") return false;
|
|
48523
48818
|
return failValidation3(`--${flag} must be true or false`);
|
|
48524
48819
|
}
|
|
48525
|
-
var dataRetentionCommand =
|
|
48820
|
+
var dataRetentionCommand = defineCommand135({
|
|
48526
48821
|
meta: {
|
|
48527
48822
|
name: "data-retention",
|
|
48528
48823
|
description: `Stage a change to how long Google Analytics keeps data
|
|
@@ -48532,7 +48827,7 @@ Examples:
|
|
|
48532
48827
|
baker ga4 data-retention set --event-data 14 --user-data 14 --reset-on-activity true`
|
|
48533
48828
|
},
|
|
48534
48829
|
subCommands: {
|
|
48535
|
-
set:
|
|
48830
|
+
set: defineCommand135({
|
|
48536
48831
|
meta: { name: "set", description: "Stage the retention window (months)" },
|
|
48537
48832
|
args: {
|
|
48538
48833
|
"event-data": { type: "string", description: "2, 14, 26, 38 or 50", required: false },
|
|
@@ -48568,7 +48863,7 @@ registerSchema({
|
|
|
48568
48863
|
"property-id": { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false }
|
|
48569
48864
|
}
|
|
48570
48865
|
});
|
|
48571
|
-
var audienceCommand =
|
|
48866
|
+
var audienceCommand = defineCommand135({
|
|
48572
48867
|
meta: {
|
|
48573
48868
|
name: "audience",
|
|
48574
48869
|
description: `Stage audience changes (saved groups of users, for retargeting and analysis)
|
|
@@ -48600,7 +48895,7 @@ Examples:
|
|
|
48600
48895
|
baker ga4 audience archive 8813`
|
|
48601
48896
|
},
|
|
48602
48897
|
subCommands: {
|
|
48603
|
-
create:
|
|
48898
|
+
create: defineCommand135({
|
|
48604
48899
|
meta: { name: "create", description: createJsonDescription("audience") },
|
|
48605
48900
|
args: {
|
|
48606
48901
|
json: { type: "string", description: createJsonDescription("audience"), required: false },
|
|
@@ -48618,7 +48913,7 @@ Examples:
|
|
|
48618
48913
|
);
|
|
48619
48914
|
}
|
|
48620
48915
|
}),
|
|
48621
|
-
update:
|
|
48916
|
+
update: defineCommand135({
|
|
48622
48917
|
meta: {
|
|
48623
48918
|
name: "update",
|
|
48624
48919
|
description: "Stage a new name or description (pass the audience id). Who is in it cannot be changed."
|
|
@@ -48639,7 +48934,7 @@ Examples:
|
|
|
48639
48934
|
});
|
|
48640
48935
|
}
|
|
48641
48936
|
}),
|
|
48642
|
-
archive:
|
|
48937
|
+
archive: defineCommand135({
|
|
48643
48938
|
meta: {
|
|
48644
48939
|
name: "archive",
|
|
48645
48940
|
description: "Stage retiring an audience. Cannot be undone \u2014 the users it gathered do not come back."
|
|
@@ -48668,7 +48963,7 @@ registerSchema({
|
|
|
48668
48963
|
"property-id": { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false }
|
|
48669
48964
|
}
|
|
48670
48965
|
});
|
|
48671
|
-
var propertyCommand =
|
|
48966
|
+
var propertyCommand = defineCommand135({
|
|
48672
48967
|
meta: {
|
|
48673
48968
|
name: "property",
|
|
48674
48969
|
description: `Stage a change to the property's own settings
|
|
@@ -48678,7 +48973,7 @@ Examples:
|
|
|
48678
48973
|
baker ga4 property set --name "Acme \u2014 Web" --industry REAL_ESTATE`
|
|
48679
48974
|
},
|
|
48680
48975
|
subCommands: {
|
|
48681
|
-
set:
|
|
48976
|
+
set: defineCommand135({
|
|
48682
48977
|
meta: { name: "set", description: "Stage the property name and/or industry category" },
|
|
48683
48978
|
args: {
|
|
48684
48979
|
name: { type: "string", description: "New property display name", required: false },
|
|
@@ -48718,7 +49013,7 @@ registerSchema({
|
|
|
48718
49013
|
"property-id": { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false }
|
|
48719
49014
|
}
|
|
48720
49015
|
});
|
|
48721
|
-
var adsLinkCommand =
|
|
49016
|
+
var adsLinkCommand = defineCommand135({
|
|
48722
49017
|
meta: {
|
|
48723
49018
|
name: "ads-link",
|
|
48724
49019
|
description: `Stage linking this property to a Google Ads account
|
|
@@ -48733,7 +49028,7 @@ Examples:
|
|
|
48733
49028
|
baker ga4 ads-link delete L1234`
|
|
48734
49029
|
},
|
|
48735
49030
|
subCommands: {
|
|
48736
|
-
create:
|
|
49031
|
+
create: defineCommand135({
|
|
48737
49032
|
meta: { name: "create", description: "Stage linking the property to a Google Ads account" },
|
|
48738
49033
|
args: {
|
|
48739
49034
|
"customer-id": { type: "string", description: "Google Ads customer id (123-456-7890)", required: false },
|
|
@@ -48752,7 +49047,7 @@ Examples:
|
|
|
48752
49047
|
await stageOp3({ kind: "ga4.googleAdsLink.create", payload, ...withProperty(args4) });
|
|
48753
49048
|
}
|
|
48754
49049
|
}),
|
|
48755
|
-
update:
|
|
49050
|
+
update: defineCommand135({
|
|
48756
49051
|
meta: {
|
|
48757
49052
|
name: "update",
|
|
48758
49053
|
description: "Stage the ads-personalisation setting on an existing link (pass its id)"
|
|
@@ -48774,7 +49069,7 @@ Examples:
|
|
|
48774
49069
|
});
|
|
48775
49070
|
}
|
|
48776
49071
|
}),
|
|
48777
|
-
delete:
|
|
49072
|
+
delete: defineCommand135({
|
|
48778
49073
|
meta: {
|
|
48779
49074
|
name: "delete",
|
|
48780
49075
|
description: "Stage unlinking. Stops conversion imports and strands every audience on this property."
|
|
@@ -48825,7 +49120,7 @@ var MEASUREMENT_FLAGS = {
|
|
|
48825
49120
|
"page-changes": "pageChangesEnabled",
|
|
48826
49121
|
"form-interactions": "formInteractionsEnabled"
|
|
48827
49122
|
};
|
|
48828
|
-
var enhancedMeasurementCommand =
|
|
49123
|
+
var enhancedMeasurementCommand = defineCommand135({
|
|
48829
49124
|
meta: {
|
|
48830
49125
|
name: "enhanced-measurement",
|
|
48831
49126
|
description: `Stage the automatic events GA4 collects on a website stream
|
|
@@ -48839,7 +49134,7 @@ Examples:
|
|
|
48839
49134
|
baker ga4 enhanced-measurement set --video false`
|
|
48840
49135
|
},
|
|
48841
49136
|
subCommands: {
|
|
48842
|
-
set:
|
|
49137
|
+
set: defineCommand135({
|
|
48843
49138
|
meta: { name: "set", description: "Stage which automatic events the website stream collects" },
|
|
48844
49139
|
args: {
|
|
48845
49140
|
scrolls: { type: "string", description: "true|false", required: false },
|
|
@@ -48882,7 +49177,7 @@ Examples:
|
|
|
48882
49177
|
});
|
|
48883
49178
|
|
|
48884
49179
|
// src/commands/ga4/index.ts
|
|
48885
|
-
var ga4Command =
|
|
49180
|
+
var ga4Command = defineCommand136({
|
|
48886
49181
|
meta: {
|
|
48887
49182
|
name: "ga4",
|
|
48888
49183
|
description: `Google Analytics 4. Report on a property, audit its config, and change what it measures.
|
|
@@ -48931,12 +49226,12 @@ Full guide: __tooling__/docs/tools/baker/ga4.md`
|
|
|
48931
49226
|
});
|
|
48932
49227
|
|
|
48933
49228
|
// src/commands/gsc/index.ts
|
|
48934
|
-
import { defineCommand as
|
|
49229
|
+
import { defineCommand as defineCommand140 } from "citty";
|
|
48935
49230
|
|
|
48936
49231
|
// src/commands/gsc/query.ts
|
|
48937
49232
|
import { appendFileSync as appendFileSync3, existsSync as existsSync8, readFileSync as readFileSync17, writeFileSync as writeFileSync5 } from "fs";
|
|
48938
49233
|
import { resolve as resolve3 } from "path";
|
|
48939
|
-
import { defineCommand as
|
|
49234
|
+
import { defineCommand as defineCommand137 } from "citty";
|
|
48940
49235
|
|
|
48941
49236
|
// src/commands/gsc/presets.ts
|
|
48942
49237
|
var GSC_PRESETS = [
|
|
@@ -49130,7 +49425,7 @@ function handleError7(err) {
|
|
|
49130
49425
|
});
|
|
49131
49426
|
process.exit(1);
|
|
49132
49427
|
}
|
|
49133
|
-
var queryCommand3 =
|
|
49428
|
+
var queryCommand3 = defineCommand137({
|
|
49134
49429
|
meta: {
|
|
49135
49430
|
name: "query",
|
|
49136
49431
|
description: `Run GSC Search Analytics queries. Preset-first with free-form escape hatch.
|
|
@@ -49208,7 +49503,7 @@ Free-form (escape hatch):
|
|
|
49208
49503
|
});
|
|
49209
49504
|
|
|
49210
49505
|
// src/commands/gsc/sitemaps.ts
|
|
49211
|
-
import { defineCommand as
|
|
49506
|
+
import { defineCommand as defineCommand138 } from "citty";
|
|
49212
49507
|
registerSchema({
|
|
49213
49508
|
command: "gsc.sitemaps",
|
|
49214
49509
|
description: "List sitemaps for a Search Console site. Check sitemap health and errors.",
|
|
@@ -49217,7 +49512,7 @@ registerSchema({
|
|
|
49217
49512
|
"no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false }
|
|
49218
49513
|
}
|
|
49219
49514
|
});
|
|
49220
|
-
var sitemapsCommand =
|
|
49515
|
+
var sitemapsCommand = defineCommand138({
|
|
49221
49516
|
meta: {
|
|
49222
49517
|
name: "sitemaps",
|
|
49223
49518
|
description: `List sitemaps for a site. Check health and errors.
|
|
@@ -49270,7 +49565,7 @@ Examples:
|
|
|
49270
49565
|
});
|
|
49271
49566
|
|
|
49272
49567
|
// src/commands/gsc/sites.ts
|
|
49273
|
-
import { defineCommand as
|
|
49568
|
+
import { defineCommand as defineCommand139 } from "citty";
|
|
49274
49569
|
registerSchema({
|
|
49275
49570
|
command: "gsc.sites",
|
|
49276
49571
|
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.",
|
|
@@ -49286,7 +49581,7 @@ function siteHints(sites) {
|
|
|
49286
49581
|
resources: sites.map((site) => ({ id: site.siteUrl, label: site.permissionLevel }))
|
|
49287
49582
|
});
|
|
49288
49583
|
}
|
|
49289
|
-
var sitesCommand2 =
|
|
49584
|
+
var sitesCommand2 = defineCommand139({
|
|
49290
49585
|
meta: {
|
|
49291
49586
|
name: "sites",
|
|
49292
49587
|
description: `List verified Search Console sites.
|
|
@@ -49334,7 +49629,7 @@ Examples:
|
|
|
49334
49629
|
});
|
|
49335
49630
|
|
|
49336
49631
|
// src/commands/gsc/index.ts
|
|
49337
|
-
var gscCommand =
|
|
49632
|
+
var gscCommand = defineCommand140({
|
|
49338
49633
|
meta: {
|
|
49339
49634
|
name: "gsc",
|
|
49340
49635
|
description: `Google Search Console commands. PPC-SEO arbitrage, brand halo analysis, negative keyword discovery.
|
|
@@ -49358,7 +49653,7 @@ Full guide: __tooling__/docs/tools/baker/gsc.md`
|
|
|
49358
49653
|
});
|
|
49359
49654
|
|
|
49360
49655
|
// src/commands/history/index.ts
|
|
49361
|
-
import { defineCommand as
|
|
49656
|
+
import { defineCommand as defineCommand141 } from "citty";
|
|
49362
49657
|
registerSchema({
|
|
49363
49658
|
command: "history.list",
|
|
49364
49659
|
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.",
|
|
@@ -49413,7 +49708,7 @@ function parseBoundedInt2(raw, name, min, max) {
|
|
|
49413
49708
|
}
|
|
49414
49709
|
return value;
|
|
49415
49710
|
}
|
|
49416
|
-
var
|
|
49711
|
+
var listCommand15 = defineCommand141({
|
|
49417
49712
|
meta: {
|
|
49418
49713
|
name: "list",
|
|
49419
49714
|
description: "List recent account changes (unified audit log), newest first."
|
|
@@ -49459,17 +49754,17 @@ var listCommand14 = defineCommand140({
|
|
|
49459
49754
|
}
|
|
49460
49755
|
}
|
|
49461
49756
|
});
|
|
49462
|
-
var historyCommand2 =
|
|
49757
|
+
var historyCommand2 = defineCommand141({
|
|
49463
49758
|
meta: {
|
|
49464
49759
|
name: "history",
|
|
49465
49760
|
description: `Unified account history (audit log): what changed, who did it, and when.
|
|
49466
49761
|
Full guide: __tooling__/docs/tools/baker/history.md`
|
|
49467
49762
|
},
|
|
49468
|
-
subCommands: { list:
|
|
49763
|
+
subCommands: { list: listCommand15 }
|
|
49469
49764
|
});
|
|
49470
49765
|
|
|
49471
49766
|
// src/commands/hubspot/index.ts
|
|
49472
|
-
import { defineCommand as
|
|
49767
|
+
import { defineCommand as defineCommand142 } from "citty";
|
|
49473
49768
|
var EMBED_TYPES = ["legacy", "v4", "unknown"];
|
|
49474
49769
|
function failNotConnected(err) {
|
|
49475
49770
|
const refusal = err instanceof ApiError ? hubspotRefusal(err.code, err.message) : null;
|
|
@@ -49610,7 +49905,7 @@ registerSchema({
|
|
|
49610
49905
|
}
|
|
49611
49906
|
}
|
|
49612
49907
|
});
|
|
49613
|
-
var formsListCommand =
|
|
49908
|
+
var formsListCommand = defineCommand142({
|
|
49614
49909
|
meta: {
|
|
49615
49910
|
name: "list",
|
|
49616
49911
|
description: "List HubSpot forms with embed type and post-submit action. Example: baker hubspot forms list --redirecting-only"
|
|
@@ -49692,7 +49987,7 @@ function formNodeHints(external) {
|
|
|
49692
49987
|
] : []
|
|
49693
49988
|
];
|
|
49694
49989
|
}
|
|
49695
|
-
var formsViewCommand =
|
|
49990
|
+
var formsViewCommand = defineCommand142({
|
|
49696
49991
|
meta: {
|
|
49697
49992
|
name: "view",
|
|
49698
49993
|
description: "Show one HubSpot form's fields and configuration. Example: baker hubspot forms view 1a2b3c"
|
|
@@ -49724,7 +50019,7 @@ var formsViewCommand = defineCommand141({
|
|
|
49724
50019
|
}
|
|
49725
50020
|
}
|
|
49726
50021
|
});
|
|
49727
|
-
var meetingsListCommand =
|
|
50022
|
+
var meetingsListCommand = defineCommand142({
|
|
49728
50023
|
meta: {
|
|
49729
50024
|
name: "list",
|
|
49730
50025
|
description: "List HubSpot meeting links (calendars). Example: baker hubspot meetings list"
|
|
@@ -49766,7 +50061,7 @@ var meetingsListCommand = defineCommand141({
|
|
|
49766
50061
|
}
|
|
49767
50062
|
}
|
|
49768
50063
|
});
|
|
49769
|
-
var meetingsViewCommand =
|
|
50064
|
+
var meetingsViewCommand = defineCommand142({
|
|
49770
50065
|
meta: {
|
|
49771
50066
|
name: "view",
|
|
49772
50067
|
description: "Show one HubSpot meeting link's booking fields. Example: baker hubspot meetings view discovery-call"
|
|
@@ -49810,7 +50105,7 @@ var meetingsViewCommand = defineCommand141({
|
|
|
49810
50105
|
}
|
|
49811
50106
|
}
|
|
49812
50107
|
});
|
|
49813
|
-
var formsSubmissionsCommand =
|
|
50108
|
+
var formsSubmissionsCommand = defineCommand142({
|
|
49814
50109
|
meta: {
|
|
49815
50110
|
name: "submissions",
|
|
49816
50111
|
description: "How many leads a form received, and when. Example: baker hubspot forms submissions <formId> --days 30"
|
|
@@ -49859,7 +50154,7 @@ var formsSubmissionsCommand = defineCommand141({
|
|
|
49859
50154
|
}
|
|
49860
50155
|
}
|
|
49861
50156
|
});
|
|
49862
|
-
var workflowsListCommand =
|
|
50157
|
+
var workflowsListCommand = defineCommand142({
|
|
49863
50158
|
meta: {
|
|
49864
50159
|
name: "list",
|
|
49865
50160
|
description: "List HubSpot workflows. Example: baker hubspot workflows list --enabled-only"
|
|
@@ -49924,7 +50219,7 @@ function workflowViewHints(workflow) {
|
|
|
49924
50219
|
}
|
|
49925
50220
|
return hints2;
|
|
49926
50221
|
}
|
|
49927
|
-
var workflowsViewCommand =
|
|
50222
|
+
var workflowsViewCommand = defineCommand142({
|
|
49928
50223
|
meta: {
|
|
49929
50224
|
name: "view",
|
|
49930
50225
|
description: "Read one workflow's real configuration \u2014 enrolment, branches in order, and what each step writes. Example: baker hubspot workflows view 121183594 --full"
|
|
@@ -49951,7 +50246,7 @@ var workflowsViewCommand = defineCommand141({
|
|
|
49951
50246
|
}
|
|
49952
50247
|
}
|
|
49953
50248
|
});
|
|
49954
|
-
var pipelinesListCommand =
|
|
50249
|
+
var pipelinesListCommand = defineCommand142({
|
|
49955
50250
|
meta: {
|
|
49956
50251
|
name: "list",
|
|
49957
50252
|
description: "List HubSpot deal pipelines and their stages. Example: baker hubspot pipelines list"
|
|
@@ -49982,7 +50277,7 @@ var OBJECT_WORDS = {
|
|
|
49982
50277
|
};
|
|
49983
50278
|
function propertiesCommand2(object) {
|
|
49984
50279
|
const words2 = OBJECT_WORDS[object];
|
|
49985
|
-
return
|
|
50280
|
+
return defineCommand142({
|
|
49986
50281
|
meta: {
|
|
49987
50282
|
name: "properties",
|
|
49988
50283
|
description: `List every ${object} property a HubSpot event can watch, with its kind, the operators that kind takes, and a select's values. Example: ${words2.command} properties`
|
|
@@ -50007,7 +50302,7 @@ function propertiesCommand2(object) {
|
|
|
50007
50302
|
});
|
|
50008
50303
|
}
|
|
50009
50304
|
var contactsPropertiesCommand = propertiesCommand2("contact");
|
|
50010
|
-
var contactsSummaryCommand =
|
|
50305
|
+
var contactsSummaryCommand = defineCommand142({
|
|
50011
50306
|
meta: {
|
|
50012
50307
|
name: "summary",
|
|
50013
50308
|
description: "Whether recent leads are being worked, as counts. Example: baker hubspot contacts summary --days 30"
|
|
@@ -50077,7 +50372,7 @@ function contactLookupHints(data) {
|
|
|
50077
50372
|
}
|
|
50078
50373
|
return hints2;
|
|
50079
50374
|
}
|
|
50080
|
-
var contactsLookupCommand =
|
|
50375
|
+
var contactsLookupCommand = defineCommand142({
|
|
50081
50376
|
meta: {
|
|
50082
50377
|
name: "lookup",
|
|
50083
50378
|
description: "Find one contact by email and see whether it was worked. Example: baker hubspot contacts lookup a@b.com"
|
|
@@ -50103,7 +50398,7 @@ var contactsLookupCommand = defineCommand141({
|
|
|
50103
50398
|
});
|
|
50104
50399
|
function fieldsCommand(object) {
|
|
50105
50400
|
const words2 = OBJECT_WORDS[object];
|
|
50106
|
-
return
|
|
50401
|
+
return defineCommand142({
|
|
50107
50402
|
meta: {
|
|
50108
50403
|
name: "fields",
|
|
50109
50404
|
description: `List every property a HubSpot event on a ${object} can read into its rows, with HubSpot's type${object === "deal" ? " \u2014 the deal's own, and its contact's as contact.<name>" : ""}. Example: ${words2.command} fields`
|
|
@@ -50127,14 +50422,14 @@ function fieldsCommand(object) {
|
|
|
50127
50422
|
});
|
|
50128
50423
|
}
|
|
50129
50424
|
var contactsFieldsCommand = fieldsCommand("contact");
|
|
50130
|
-
var dealsCommand =
|
|
50425
|
+
var dealsCommand = defineCommand142({
|
|
50131
50426
|
meta: {
|
|
50132
50427
|
name: "deals",
|
|
50133
50428
|
description: "Deals on the connected HubSpot account: what a HubSpot event on a deal can watch (`properties`) and read (`fields`)."
|
|
50134
50429
|
},
|
|
50135
50430
|
subCommands: { properties: propertiesCommand2("deal"), fields: fieldsCommand("deal") }
|
|
50136
50431
|
});
|
|
50137
|
-
var contactsCommand =
|
|
50432
|
+
var contactsCommand = defineCommand142({
|
|
50138
50433
|
meta: { name: "contacts", description: "Contacts on the connected HubSpot account." },
|
|
50139
50434
|
subCommands: {
|
|
50140
50435
|
summary: contactsSummaryCommand,
|
|
@@ -50143,23 +50438,23 @@ var contactsCommand = defineCommand141({
|
|
|
50143
50438
|
fields: contactsFieldsCommand
|
|
50144
50439
|
}
|
|
50145
50440
|
});
|
|
50146
|
-
var formsCommand =
|
|
50441
|
+
var formsCommand = defineCommand142({
|
|
50147
50442
|
meta: { name: "forms", description: "HubSpot forms on the connected account." },
|
|
50148
50443
|
subCommands: { list: formsListCommand, view: formsViewCommand, submissions: formsSubmissionsCommand }
|
|
50149
50444
|
});
|
|
50150
|
-
var workflowsCommand =
|
|
50445
|
+
var workflowsCommand = defineCommand142({
|
|
50151
50446
|
meta: { name: "workflows", description: "HubSpot workflows on the connected account." },
|
|
50152
50447
|
subCommands: { list: workflowsListCommand, view: workflowsViewCommand }
|
|
50153
50448
|
});
|
|
50154
|
-
var pipelinesCommand =
|
|
50449
|
+
var pipelinesCommand = defineCommand142({
|
|
50155
50450
|
meta: { name: "pipelines", description: "HubSpot deal pipelines on the connected account." },
|
|
50156
50451
|
subCommands: { list: pipelinesListCommand }
|
|
50157
50452
|
});
|
|
50158
|
-
var meetingsCommand =
|
|
50453
|
+
var meetingsCommand = defineCommand142({
|
|
50159
50454
|
meta: { name: "meetings", description: "HubSpot meeting links (calendars) on the connected account." },
|
|
50160
50455
|
subCommands: { list: meetingsListCommand, view: meetingsViewCommand }
|
|
50161
50456
|
});
|
|
50162
|
-
var hubspotCommand =
|
|
50457
|
+
var hubspotCommand = defineCommand142({
|
|
50163
50458
|
meta: {
|
|
50164
50459
|
name: "hubspot",
|
|
50165
50460
|
description: `Read the connected HubSpot account \u2014 forms, the leads they received, workflows, deal pipelines and
|
|
@@ -50200,10 +50495,10 @@ Full guide: __tooling__/docs/tools/baker/hubspot.md`
|
|
|
50200
50495
|
});
|
|
50201
50496
|
|
|
50202
50497
|
// src/commands/images/index.ts
|
|
50203
|
-
import { defineCommand as
|
|
50498
|
+
import { defineCommand as defineCommand169 } from "citty";
|
|
50204
50499
|
|
|
50205
50500
|
// src/commands/images/crop.ts
|
|
50206
|
-
import { defineCommand as
|
|
50501
|
+
import { defineCommand as defineCommand143 } from "citty";
|
|
50207
50502
|
|
|
50208
50503
|
// src/lib/image/crop-sprite.ts
|
|
50209
50504
|
import sharp from "sharp";
|
|
@@ -50325,7 +50620,7 @@ function emitError2(err) {
|
|
|
50325
50620
|
}
|
|
50326
50621
|
process.exit(1);
|
|
50327
50622
|
}
|
|
50328
|
-
var cropCommand =
|
|
50623
|
+
var cropCommand = defineCommand143({
|
|
50329
50624
|
meta: {
|
|
50330
50625
|
name: "crop",
|
|
50331
50626
|
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"
|
|
@@ -50361,7 +50656,7 @@ var cropCommand = defineCommand142({
|
|
|
50361
50656
|
});
|
|
50362
50657
|
|
|
50363
50658
|
// src/commands/images/delete.ts
|
|
50364
|
-
import { defineCommand as
|
|
50659
|
+
import { defineCommand as defineCommand144 } from "citty";
|
|
50365
50660
|
registerSchema({
|
|
50366
50661
|
command: "images.delete",
|
|
50367
50662
|
description: "Delete an image by ID",
|
|
@@ -50375,7 +50670,7 @@ registerSchema({
|
|
|
50375
50670
|
}
|
|
50376
50671
|
}
|
|
50377
50672
|
});
|
|
50378
|
-
var deleteCommand2 =
|
|
50673
|
+
var deleteCommand2 = defineCommand144({
|
|
50379
50674
|
meta: {
|
|
50380
50675
|
name: "delete",
|
|
50381
50676
|
description: "Delete an image by ID. Use --dry-run to preview. Example: baker images delete j571abc123 --dry-run"
|
|
@@ -50416,7 +50711,7 @@ var deleteCommand2 = defineCommand143({
|
|
|
50416
50711
|
});
|
|
50417
50712
|
|
|
50418
50713
|
// src/commands/images/describe.ts
|
|
50419
|
-
import { defineCommand as
|
|
50714
|
+
import { defineCommand as defineCommand145 } from "citty";
|
|
50420
50715
|
|
|
50421
50716
|
// src/lib/describeArgs.ts
|
|
50422
50717
|
function describeTags(rawArgs, parsed) {
|
|
@@ -50467,7 +50762,7 @@ registerSchema({
|
|
|
50467
50762
|
full: { type: "boolean", description: "Return the whole library row, not just what changed", required: false }
|
|
50468
50763
|
}
|
|
50469
50764
|
});
|
|
50470
|
-
var describeCommand =
|
|
50765
|
+
var describeCommand = defineCommand145({
|
|
50471
50766
|
meta: {
|
|
50472
50767
|
name: "describe",
|
|
50473
50768
|
description: `Correct what the library says an image is. Only the fields you pass change; the rest keep their current values.
|
|
@@ -50525,7 +50820,7 @@ Example: baker images describe j571abc123 --description "Founder speaking on sta
|
|
|
50525
50820
|
});
|
|
50526
50821
|
|
|
50527
50822
|
// src/commands/images/dimensions.ts
|
|
50528
|
-
import { defineCommand as
|
|
50823
|
+
import { defineCommand as defineCommand146 } from "citty";
|
|
50529
50824
|
|
|
50530
50825
|
// src/lib/image/dimensions.ts
|
|
50531
50826
|
import { imageSize } from "image-size";
|
|
@@ -50554,7 +50849,7 @@ registerSchema({
|
|
|
50554
50849
|
}
|
|
50555
50850
|
}
|
|
50556
50851
|
});
|
|
50557
|
-
var dimensionsCommand =
|
|
50852
|
+
var dimensionsCommand = defineCommand146({
|
|
50558
50853
|
meta: {
|
|
50559
50854
|
name: "dimensions",
|
|
50560
50855
|
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"
|
|
@@ -50610,7 +50905,7 @@ var dimensionsCommand = defineCommand145({
|
|
|
50610
50905
|
});
|
|
50611
50906
|
|
|
50612
50907
|
// src/commands/images/download.ts
|
|
50613
|
-
import { defineCommand as
|
|
50908
|
+
import { defineCommand as defineCommand147 } from "citty";
|
|
50614
50909
|
|
|
50615
50910
|
// src/commands/images/downloadPaths.ts
|
|
50616
50911
|
import { basename as basename2, extname as extname3, join as join6 } from "path";
|
|
@@ -50851,7 +51146,7 @@ function emitError3(err) {
|
|
|
50851
51146
|
writeJson({ ok: false, error: { code: "INTERNAL_ERROR", message: "Unexpected error" } });
|
|
50852
51147
|
process.exit(1);
|
|
50853
51148
|
}
|
|
50854
|
-
var downloadCommand =
|
|
51149
|
+
var downloadCommand = defineCommand147({
|
|
50855
51150
|
meta: {
|
|
50856
51151
|
name: "download",
|
|
50857
51152
|
description: "Download image URLs and/or library images to local files \u2014 the missing first half of `source \u2192 download \u2192 normalize \u2192 place`. Never use `curl` for this.\n\nExamples:\n baker images download https://media.withbaker.com/\u2026/logo.webp\n baker images download j57abc123 j57def456 --out src/pages/pricing/_images/\n baker images download https://\u2026/hero.png --out ./hero.png"
|
|
@@ -50884,7 +51179,7 @@ var downloadCommand = defineCommand146({
|
|
|
50884
51179
|
});
|
|
50885
51180
|
|
|
50886
51181
|
// src/commands/images/extract.ts
|
|
50887
|
-
import { defineCommand as
|
|
51182
|
+
import { defineCommand as defineCommand148 } from "citty";
|
|
50888
51183
|
|
|
50889
51184
|
// src/commands/images/autoIngest.ts
|
|
50890
51185
|
var AUTO_INGEST_MAX = {
|
|
@@ -50931,7 +51226,7 @@ registerSchema({
|
|
|
50931
51226
|
}
|
|
50932
51227
|
}
|
|
50933
51228
|
});
|
|
50934
|
-
var extractCommand =
|
|
51229
|
+
var extractCommand = defineCommand148({
|
|
50935
51230
|
meta: {
|
|
50936
51231
|
name: "extract",
|
|
50937
51232
|
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"
|
|
@@ -50986,7 +51281,7 @@ var extractCommand = defineCommand147({
|
|
|
50986
51281
|
});
|
|
50987
51282
|
|
|
50988
51283
|
// src/commands/images/find.ts
|
|
50989
|
-
import { defineCommand as
|
|
51284
|
+
import { defineCommand as defineCommand149 } from "citty";
|
|
50990
51285
|
|
|
50991
51286
|
// src/commands/images/providerHits.ts
|
|
50992
51287
|
function asRecord3(value) {
|
|
@@ -51124,7 +51419,7 @@ registerSchema({
|
|
|
51124
51419
|
full: { type: "boolean", description: "Include full metadata", required: false, default: false }
|
|
51125
51420
|
}
|
|
51126
51421
|
});
|
|
51127
|
-
var findCommand =
|
|
51422
|
+
var findCommand = defineCommand149({
|
|
51128
51423
|
meta: {
|
|
51129
51424
|
name: "find",
|
|
51130
51425
|
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,pexels --limit 20"
|
|
@@ -51197,7 +51492,7 @@ var findCommand = defineCommand148({
|
|
|
51197
51492
|
});
|
|
51198
51493
|
|
|
51199
51494
|
// src/commands/images/get.ts
|
|
51200
|
-
import { defineCommand as
|
|
51495
|
+
import { defineCommand as defineCommand150 } from "citty";
|
|
51201
51496
|
registerSchema({
|
|
51202
51497
|
command: "images.get",
|
|
51203
51498
|
description: "Get a single image by ID",
|
|
@@ -51205,7 +51500,7 @@ registerSchema({
|
|
|
51205
51500
|
id: { type: "string", description: "Image ID", required: true }
|
|
51206
51501
|
}
|
|
51207
51502
|
});
|
|
51208
|
-
var getCommand3 =
|
|
51503
|
+
var getCommand3 = defineCommand150({
|
|
51209
51504
|
meta: { name: "get", description: "Get a single image by ID. Example: baker images get j571abc123" },
|
|
51210
51505
|
args: {
|
|
51211
51506
|
id: { type: "positional", description: "Image ID", required: false },
|
|
@@ -51241,7 +51536,7 @@ var getCommand3 = defineCommand149({
|
|
|
51241
51536
|
});
|
|
51242
51537
|
|
|
51243
51538
|
// src/commands/images/gif.ts
|
|
51244
|
-
import { defineCommand as
|
|
51539
|
+
import { defineCommand as defineCommand151 } from "citty";
|
|
51245
51540
|
registerSchema({
|
|
51246
51541
|
command: "images.gif",
|
|
51247
51542
|
description: "Search Giphy for GIFs / reaction memes (paid social creative).",
|
|
@@ -51273,7 +51568,7 @@ registerSchema({
|
|
|
51273
51568
|
}
|
|
51274
51569
|
}
|
|
51275
51570
|
});
|
|
51276
|
-
var gifCommand =
|
|
51571
|
+
var gifCommand = defineCommand151({
|
|
51277
51572
|
meta: {
|
|
51278
51573
|
name: "gif",
|
|
51279
51574
|
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"
|
|
@@ -51320,7 +51615,7 @@ var gifCommand = defineCommand150({
|
|
|
51320
51615
|
});
|
|
51321
51616
|
|
|
51322
51617
|
// src/commands/images/google.ts
|
|
51323
|
-
import { defineCommand as
|
|
51618
|
+
import { defineCommand as defineCommand152 } from "citty";
|
|
51324
51619
|
var GOOGLE_ERROR_FIX = {
|
|
51325
51620
|
action: "use_different_resource",
|
|
51326
51621
|
explanation: "Generate the asset instead of retrying Google. Google is the last-resort image provider. Run `baker studio generate` to make the asset. Never sleep-and-retry this command \u2014 the CLI already backs off on rate limits. If no image can be sourced, continue the rest of the task with a placeholder rather than aborting it."
|
|
@@ -51360,7 +51655,7 @@ registerSchema({
|
|
|
51360
51655
|
}
|
|
51361
51656
|
}
|
|
51362
51657
|
});
|
|
51363
|
-
var googleCommand2 =
|
|
51658
|
+
var googleCommand2 = defineCommand152({
|
|
51364
51659
|
meta: {
|
|
51365
51660
|
name: "google",
|
|
51366
51661
|
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"
|
|
@@ -51433,7 +51728,7 @@ var googleCommand2 = defineCommand151({
|
|
|
51433
51728
|
});
|
|
51434
51729
|
|
|
51435
51730
|
// src/commands/images/group.ts
|
|
51436
|
-
import { defineCommand as
|
|
51731
|
+
import { defineCommand as defineCommand153 } from "citty";
|
|
51437
51732
|
|
|
51438
51733
|
// src/commands/mediaGroup.ts
|
|
51439
51734
|
async function runMediaGroupLookup(input) {
|
|
@@ -51486,7 +51781,7 @@ registerSchema({
|
|
|
51486
51781
|
"group-key": { type: "string", description: "The set key directly, when you already have it", required: false }
|
|
51487
51782
|
}
|
|
51488
51783
|
});
|
|
51489
|
-
var groupCommand =
|
|
51784
|
+
var groupCommand = defineCommand153({
|
|
51490
51785
|
meta: {
|
|
51491
51786
|
name: "group",
|
|
51492
51787
|
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>"
|
|
@@ -51506,7 +51801,7 @@ var groupCommand = defineCommand152({
|
|
|
51506
51801
|
});
|
|
51507
51802
|
|
|
51508
51803
|
// src/commands/images/icon.ts
|
|
51509
|
-
import { defineCommand as
|
|
51804
|
+
import { defineCommand as defineCommand154 } from "citty";
|
|
51510
51805
|
|
|
51511
51806
|
// src/commands/images/brandVerification.ts
|
|
51512
51807
|
function brandToken(domain) {
|
|
@@ -51603,7 +51898,7 @@ registerSchema({
|
|
|
51603
51898
|
full: { type: "boolean", description: "Include full metadata", required: false, default: false }
|
|
51604
51899
|
}
|
|
51605
51900
|
});
|
|
51606
|
-
var iconCommand =
|
|
51901
|
+
var iconCommand = defineCommand154({
|
|
51607
51902
|
meta: {
|
|
51608
51903
|
name: "icon",
|
|
51609
51904
|
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'"
|
|
@@ -51673,7 +51968,7 @@ var iconCommand = defineCommand153({
|
|
|
51673
51968
|
});
|
|
51674
51969
|
|
|
51675
51970
|
// src/commands/images/ingest.ts
|
|
51676
|
-
import { defineCommand as
|
|
51971
|
+
import { defineCommand as defineCommand155 } from "citty";
|
|
51677
51972
|
var SOURCE_VALUES = imageSourceSchema.options.join(" | ");
|
|
51678
51973
|
registerSchema({
|
|
51679
51974
|
command: "images.ingest",
|
|
@@ -51688,7 +51983,7 @@ registerSchema({
|
|
|
51688
51983
|
fields: { type: "string", description: "Comma-separated field names to include", required: false }
|
|
51689
51984
|
}
|
|
51690
51985
|
});
|
|
51691
|
-
var ingestCommand =
|
|
51986
|
+
var ingestCommand = defineCommand155({
|
|
51692
51987
|
meta: {
|
|
51693
51988
|
name: "ingest",
|
|
51694
51989
|
description: "Download a remote URL and store it in the library. Hash-deduped on bytes + externalId.\n\nExample: baker images ingest https://images.pexels.com/photos/13219418/pexels-photo-13219418.jpeg --source pexels --external-id 13219418"
|
|
@@ -51757,7 +52052,7 @@ var ingestCommand = defineCommand154({
|
|
|
51757
52052
|
});
|
|
51758
52053
|
|
|
51759
52054
|
// src/commands/images/layerize.ts
|
|
51760
|
-
import { defineCommand as
|
|
52055
|
+
import { defineCommand as defineCommand156 } from "citty";
|
|
51761
52056
|
registerSchema({
|
|
51762
52057
|
command: "images.layerize",
|
|
51763
52058
|
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.",
|
|
@@ -51821,7 +52116,7 @@ async function pollUntilSettled(imageId, maxWait) {
|
|
|
51821
52116
|
}
|
|
51822
52117
|
return null;
|
|
51823
52118
|
}
|
|
51824
|
-
var layerizeCommand =
|
|
52119
|
+
var layerizeCommand = defineCommand156({
|
|
51825
52120
|
meta: {
|
|
51826
52121
|
name: "layerize",
|
|
51827
52122
|
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'"
|
|
@@ -51890,7 +52185,7 @@ registerSchema({
|
|
|
51890
52185
|
full: { type: "boolean", description: "Include geometry and typography for every layer", required: false }
|
|
51891
52186
|
}
|
|
51892
52187
|
});
|
|
51893
|
-
var layersCommand =
|
|
52188
|
+
var layersCommand = defineCommand156({
|
|
51894
52189
|
meta: {
|
|
51895
52190
|
name: "layers",
|
|
51896
52191
|
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"
|
|
@@ -51930,7 +52225,7 @@ var layersCommand = defineCommand155({
|
|
|
51930
52225
|
});
|
|
51931
52226
|
|
|
51932
52227
|
// src/commands/images/library.ts
|
|
51933
|
-
import { defineCommand as
|
|
52228
|
+
import { defineCommand as defineCommand157 } from "citty";
|
|
51934
52229
|
registerSchema({
|
|
51935
52230
|
command: "images.library",
|
|
51936
52231
|
description: "Search the company image library. Returns only ready images.",
|
|
@@ -51956,7 +52251,7 @@ registerSchema({
|
|
|
51956
52251
|
}
|
|
51957
52252
|
}
|
|
51958
52253
|
});
|
|
51959
|
-
var libraryCommand =
|
|
52254
|
+
var libraryCommand = defineCommand157({
|
|
51960
52255
|
meta: {
|
|
51961
52256
|
name: "library",
|
|
51962
52257
|
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"
|
|
@@ -52019,7 +52314,7 @@ var libraryCommand = defineCommand156({
|
|
|
52019
52314
|
});
|
|
52020
52315
|
|
|
52021
52316
|
// src/commands/images/logo.ts
|
|
52022
|
-
import { defineCommand as
|
|
52317
|
+
import { defineCommand as defineCommand158 } from "citty";
|
|
52023
52318
|
registerSchema({
|
|
52024
52319
|
command: "images.logo",
|
|
52025
52320
|
description: "Brand logo lookup via Brandfetch. Auto-ingests by default. Returns `brandMatch` \u2014 Brandfetch's own verdict on whose brand the domain is (confirmed | mismatch | unverified). Branch on it: `mismatch` means the mark is another company's, so do not place it. `confirmed` verifies the record, not the artwork \u2014 read the ingested row back to check the mark itself.",
|
|
@@ -52047,7 +52342,7 @@ registerSchema({
|
|
|
52047
52342
|
full: { type: "boolean", description: "Include full metadata", required: false, default: false }
|
|
52048
52343
|
}
|
|
52049
52344
|
});
|
|
52050
|
-
var logoCommand =
|
|
52345
|
+
var logoCommand = defineCommand158({
|
|
52051
52346
|
meta: {
|
|
52052
52347
|
name: "logo",
|
|
52053
52348
|
description: "Brand logo via Brandfetch. Returns up to 5 variants (icon, light/dark logo, light/dark symbol) plus `brandMatch`. Auto-ingests the first variant.\n\nStart here: check `brandMatch.verdict`.\n mismatch \u2192 the mark belongs to `brandMatch.name`, a different company. Do not place it.\n unverified \u2192 nothing confirmed whose logo this is. Treat as unchecked.\n confirmed \u2192 Brandfetch has this brand's record. That verifies the record, NOT the artwork \u2014 a confirmed domain has served another company's logo before.\n\n\u26A0 Whatever the verdict, read the ingested row back with `baker images get <imageId>` and check `textInImage`/`subject` before placing it. That is the only check that looks at the mark.\n\nExample: baker images logo stripe.com --variant logo"
|
|
@@ -52120,7 +52415,7 @@ var logoCommand = defineCommand157({
|
|
|
52120
52415
|
});
|
|
52121
52416
|
|
|
52122
52417
|
// src/commands/images/normalize.ts
|
|
52123
|
-
import { defineCommand as
|
|
52418
|
+
import { defineCommand as defineCommand159 } from "citty";
|
|
52124
52419
|
|
|
52125
52420
|
// src/lib/image/color-changer.ts
|
|
52126
52421
|
import quantize from "quantize";
|
|
@@ -52852,7 +53147,7 @@ function coerceRawArgs(args4) {
|
|
|
52852
53147
|
"dry-run": bool(args4["dry-run"])
|
|
52853
53148
|
};
|
|
52854
53149
|
}
|
|
52855
|
-
var normalizeCommand2 =
|
|
53150
|
+
var normalizeCommand2 = defineCommand159({
|
|
52856
53151
|
meta: {
|
|
52857
53152
|
name: "normalize",
|
|
52858
53153
|
description: `Normalize logos / images: declarative recolor + bg removal + trim + resize. Operates on local files; writes in-place by default.
|
|
@@ -52907,7 +53202,7 @@ Examples:
|
|
|
52907
53202
|
});
|
|
52908
53203
|
|
|
52909
53204
|
// src/commands/images/pinterest.ts
|
|
52910
|
-
import { defineCommand as
|
|
53205
|
+
import { defineCommand as defineCommand160 } from "citty";
|
|
52911
53206
|
registerSchema({
|
|
52912
53207
|
command: "images.pinterest",
|
|
52913
53208
|
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.",
|
|
@@ -52927,7 +53222,7 @@ registerSchema({
|
|
|
52927
53222
|
}
|
|
52928
53223
|
}
|
|
52929
53224
|
});
|
|
52930
|
-
var pinterestCommand =
|
|
53225
|
+
var pinterestCommand = defineCommand160({
|
|
52931
53226
|
meta: {
|
|
52932
53227
|
name: "pinterest",
|
|
52933
53228
|
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'"
|
|
@@ -52984,7 +53279,7 @@ var pinterestCommand = defineCommand159({
|
|
|
52984
53279
|
});
|
|
52985
53280
|
|
|
52986
53281
|
// src/commands/images/screenshot.ts
|
|
52987
|
-
import { defineCommand as
|
|
53282
|
+
import { defineCommand as defineCommand161 } from "citty";
|
|
52988
53283
|
registerSchema({
|
|
52989
53284
|
command: "images.screenshot",
|
|
52990
53285
|
description: "Capture a website screenshot via ScreenshotOne. Auto-ingests on success.",
|
|
@@ -53003,7 +53298,7 @@ registerSchema({
|
|
|
53003
53298
|
full: { type: "boolean", description: "Include full metadata", required: false, default: false }
|
|
53004
53299
|
}
|
|
53005
53300
|
});
|
|
53006
|
-
var screenshotCommand =
|
|
53301
|
+
var screenshotCommand = defineCommand161({
|
|
53007
53302
|
meta: {
|
|
53008
53303
|
name: "screenshot",
|
|
53009
53304
|
description: "Screenshot a URL via ScreenshotOne. $0.009/capture. Auto-ingests to library.\n\nExample: baker images screenshot https://stripe.com --full-page"
|
|
@@ -53067,7 +53362,7 @@ var screenshotCommand = defineCommand160({
|
|
|
53067
53362
|
});
|
|
53068
53363
|
|
|
53069
53364
|
// src/commands/images/search.ts
|
|
53070
|
-
import { defineCommand as
|
|
53365
|
+
import { defineCommand as defineCommand162 } from "citty";
|
|
53071
53366
|
registerSchema({
|
|
53072
53367
|
command: "images.search",
|
|
53073
53368
|
description: "Search images by text query. Only returns ready images.",
|
|
@@ -53083,7 +53378,7 @@ registerSchema({
|
|
|
53083
53378
|
tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
|
|
53084
53379
|
}
|
|
53085
53380
|
});
|
|
53086
|
-
var searchCommand =
|
|
53381
|
+
var searchCommand = defineCommand162({
|
|
53087
53382
|
meta: {
|
|
53088
53383
|
name: "search",
|
|
53089
53384
|
description: "Semantic search images by text query. Uses hybrid BM25 + vector + reranking. Example: baker images search 'hero banner' --aspect-ratio 16:9 --tags logo"
|
|
@@ -53143,7 +53438,7 @@ var searchCommand = defineCommand161({
|
|
|
53143
53438
|
});
|
|
53144
53439
|
|
|
53145
53440
|
// src/commands/images/sticker.ts
|
|
53146
|
-
import { defineCommand as
|
|
53441
|
+
import { defineCommand as defineCommand163 } from "citty";
|
|
53147
53442
|
registerSchema({
|
|
53148
53443
|
command: "images.sticker",
|
|
53149
53444
|
description: "Search Giphy stickers \u2014 transparent-background overlays for ad creative.",
|
|
@@ -53175,7 +53470,7 @@ registerSchema({
|
|
|
53175
53470
|
}
|
|
53176
53471
|
}
|
|
53177
53472
|
});
|
|
53178
|
-
var stickerCommand =
|
|
53473
|
+
var stickerCommand = defineCommand163({
|
|
53179
53474
|
meta: {
|
|
53180
53475
|
name: "sticker",
|
|
53181
53476
|
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"
|
|
@@ -53222,7 +53517,7 @@ var stickerCommand = defineCommand162({
|
|
|
53222
53517
|
});
|
|
53223
53518
|
|
|
53224
53519
|
// src/commands/images/stock.ts
|
|
53225
|
-
import { defineCommand as
|
|
53520
|
+
import { defineCommand as defineCommand164 } from "citty";
|
|
53226
53521
|
var STOCK_ERROR_FIX = {
|
|
53227
53522
|
action: "use_different_resource",
|
|
53228
53523
|
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."
|
|
@@ -53302,7 +53597,7 @@ function partialLibraryHints(errors, hitCount) {
|
|
|
53302
53597
|
`These results are partial: ${names} did not answer, so they come from the remaining library alone. Treat a thin result as unproven rather than as "stock does not have this", and report the outage rather than re-running the search.`
|
|
53303
53598
|
];
|
|
53304
53599
|
}
|
|
53305
|
-
var stockCommand =
|
|
53600
|
+
var stockCommand = defineCommand164({
|
|
53306
53601
|
meta: {
|
|
53307
53602
|
name: "stock",
|
|
53308
53603
|
description: "Stock search across the free libraries \u2014 Pexels photographs plus Pixabay photographs, illustrations and vectors. No per-request cost. With --auto-ingest, ingested hits return Baker-owned URLs.\n\nExamples:\n baker images stock 'minimalist office'\n baker images stock 'hero photo of a kitchen' --orientation landscape --size large\n baker images stock 'flat office workers' --type illustration\n baker images stock 'leaf outline mark' --type vector\n baker images stock 'smiling carpenter portrait' --orientation portrait"
|
|
@@ -53377,7 +53672,7 @@ var stockCommand = defineCommand163({
|
|
|
53377
53672
|
});
|
|
53378
53673
|
|
|
53379
53674
|
// src/lib/tags-command.ts
|
|
53380
|
-
import { defineCommand as
|
|
53675
|
+
import { defineCommand as defineCommand165 } from "citty";
|
|
53381
53676
|
function makeTagsCommand(command, label, endpoint) {
|
|
53382
53677
|
registerSchema({
|
|
53383
53678
|
command: `${command}.tags`,
|
|
@@ -53386,7 +53681,7 @@ function makeTagsCommand(command, label, endpoint) {
|
|
|
53386
53681
|
output: { type: "string", description: "Output format: md|json", required: false, default: "md" }
|
|
53387
53682
|
}
|
|
53388
53683
|
});
|
|
53389
|
-
return
|
|
53684
|
+
return defineCommand165({
|
|
53390
53685
|
meta: {
|
|
53391
53686
|
name: "tags",
|
|
53392
53687
|
description: `List the available ${label} tag names (defaults + company custom tags). Use before filtering with --tags. Example: baker ${command} tags`
|
|
@@ -53422,7 +53717,7 @@ function makeTagsCommand(command, label, endpoint) {
|
|
|
53422
53717
|
var tagsCommand3 = makeTagsCommand("images", "image", "/api/images/tags");
|
|
53423
53718
|
|
|
53424
53719
|
// src/commands/images/upload.ts
|
|
53425
|
-
import { defineCommand as
|
|
53720
|
+
import { defineCommand as defineCommand166 } from "citty";
|
|
53426
53721
|
registerSchema({
|
|
53427
53722
|
command: "images.upload",
|
|
53428
53723
|
description: "Upload an image to the library \u2014 local file path or remote http(s) URL.",
|
|
@@ -53460,7 +53755,7 @@ registerSchema({
|
|
|
53460
53755
|
function isRemoteUrl2(value) {
|
|
53461
53756
|
return /^https?:\/\//i.test(value);
|
|
53462
53757
|
}
|
|
53463
|
-
var uploadCommand =
|
|
53758
|
+
var uploadCommand = defineCommand166({
|
|
53464
53759
|
meta: {
|
|
53465
53760
|
name: "upload",
|
|
53466
53761
|
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'"
|
|
@@ -53553,7 +53848,7 @@ async function uploadLocal(target, args4) {
|
|
|
53553
53848
|
}
|
|
53554
53849
|
|
|
53555
53850
|
// src/commands/images/upscale.ts
|
|
53556
|
-
import { defineCommand as
|
|
53851
|
+
import { defineCommand as defineCommand167 } from "citty";
|
|
53557
53852
|
registerSchema({
|
|
53558
53853
|
command: "images.upscale",
|
|
53559
53854
|
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).",
|
|
@@ -53568,7 +53863,7 @@ registerSchema({
|
|
|
53568
53863
|
}
|
|
53569
53864
|
});
|
|
53570
53865
|
var POLL_INTERVAL_MS4 = 1500;
|
|
53571
|
-
var upscaleCommand =
|
|
53866
|
+
var upscaleCommand = defineCommand167({
|
|
53572
53867
|
meta: {
|
|
53573
53868
|
name: "upscale",
|
|
53574
53869
|
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"
|
|
@@ -53623,7 +53918,7 @@ var upscaleCommand = defineCommand166({
|
|
|
53623
53918
|
});
|
|
53624
53919
|
|
|
53625
53920
|
// src/commands/images/use.ts
|
|
53626
|
-
import { defineCommand as
|
|
53921
|
+
import { defineCommand as defineCommand168 } from "citty";
|
|
53627
53922
|
registerSchema({
|
|
53628
53923
|
command: "images.use",
|
|
53629
53924
|
description: "Ingest a URL and wait for the library record to be ready.",
|
|
@@ -53652,7 +53947,7 @@ function emitReady(ingestResult, doc, args4) {
|
|
|
53652
53947
|
args4.full === true
|
|
53653
53948
|
);
|
|
53654
53949
|
}
|
|
53655
|
-
var useCommand =
|
|
53950
|
+
var useCommand = defineCommand168({
|
|
53656
53951
|
meta: {
|
|
53657
53952
|
name: "use",
|
|
53658
53953
|
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"
|
|
@@ -53701,7 +53996,7 @@ var useCommand = defineCommand167({
|
|
|
53701
53996
|
});
|
|
53702
53997
|
|
|
53703
53998
|
// src/commands/images/index.ts
|
|
53704
|
-
var imagesCommand =
|
|
53999
|
+
var imagesCommand = defineCommand169({
|
|
53705
54000
|
meta: {
|
|
53706
54001
|
name: "images",
|
|
53707
54002
|
description: `Find, source, and normalize images. Subcommands route by provider so cost + license are explicit.
|
|
@@ -53781,12 +54076,12 @@ Full guide: __tooling__/docs/tools/baker/images.md`
|
|
|
53781
54076
|
});
|
|
53782
54077
|
|
|
53783
54078
|
// src/commands/landing/index.ts
|
|
53784
|
-
import { defineCommand as
|
|
54079
|
+
import { defineCommand as defineCommand181 } from "citty";
|
|
53785
54080
|
|
|
53786
54081
|
// src/commands/landing/critique.ts
|
|
53787
54082
|
import { readdir as readdir14, readFile as readFile30, stat as stat9 } from "fs/promises";
|
|
53788
54083
|
import path37 from "path";
|
|
53789
|
-
import { defineCommand as
|
|
54084
|
+
import { defineCommand as defineCommand170 } from "citty";
|
|
53790
54085
|
|
|
53791
54086
|
// src/engine/landing/lib/constants.ts
|
|
53792
54087
|
var OVERUSED_FONTS = /* @__PURE__ */ new Set([
|
|
@@ -55094,7 +55389,7 @@ function fail6(code, message, fix) {
|
|
|
55094
55389
|
);
|
|
55095
55390
|
process.exit(2);
|
|
55096
55391
|
}
|
|
55097
|
-
var critiqueCommand2 =
|
|
55392
|
+
var critiqueCommand2 = defineCommand170({
|
|
55098
55393
|
meta: {
|
|
55099
55394
|
name: "critique",
|
|
55100
55395
|
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) and positioning integrity (a concession ranking a competitor above the client, a rival named in a comparison) 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."
|
|
@@ -55228,10 +55523,10 @@ async function isDir2(p) {
|
|
|
55228
55523
|
}
|
|
55229
55524
|
|
|
55230
55525
|
// src/commands/landing/inspiration/index.ts
|
|
55231
|
-
import { defineCommand as
|
|
55526
|
+
import { defineCommand as defineCommand179 } from "citty";
|
|
55232
55527
|
|
|
55233
55528
|
// src/commands/landing/inspiration/add.ts
|
|
55234
|
-
import { defineCommand as
|
|
55529
|
+
import { defineCommand as defineCommand171 } from "citty";
|
|
55235
55530
|
|
|
55236
55531
|
// src/commands/landing/inspiration/shared.ts
|
|
55237
55532
|
var INSPIRATION_HINTS = {
|
|
@@ -55313,7 +55608,7 @@ registerSchema({
|
|
|
55313
55608
|
note: { type: "string", description: "Why this page is worth keeping", required: false }
|
|
55314
55609
|
}
|
|
55315
55610
|
});
|
|
55316
|
-
var addCommand =
|
|
55611
|
+
var addCommand = defineCommand171({
|
|
55317
55612
|
meta: {
|
|
55318
55613
|
name: "add",
|
|
55319
55614
|
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'"
|
|
@@ -55355,7 +55650,7 @@ var addCommand = defineCommand170({
|
|
|
55355
55650
|
// src/commands/landing/inspiration/code.ts
|
|
55356
55651
|
import { mkdir as mkdir11, writeFile as writeFile15 } from "fs/promises";
|
|
55357
55652
|
import path38 from "path";
|
|
55358
|
-
import { defineCommand as
|
|
55653
|
+
import { defineCommand as defineCommand172 } from "citty";
|
|
55359
55654
|
registerSchema({
|
|
55360
55655
|
command: "landing.inspiration.code",
|
|
55361
55656
|
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.",
|
|
@@ -55364,7 +55659,7 @@ registerSchema({
|
|
|
55364
55659
|
full: { type: "boolean", description: "Print the markup inline as well as writing it", required: false }
|
|
55365
55660
|
}
|
|
55366
55661
|
});
|
|
55367
|
-
var codeCommand =
|
|
55662
|
+
var codeCommand = defineCommand172({
|
|
55368
55663
|
meta: {
|
|
55369
55664
|
name: "code",
|
|
55370
55665
|
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."
|
|
@@ -55410,7 +55705,7 @@ var codeCommand = defineCommand171({
|
|
|
55410
55705
|
});
|
|
55411
55706
|
|
|
55412
55707
|
// src/commands/landing/inspiration/favorites.ts
|
|
55413
|
-
import { defineCommand as
|
|
55708
|
+
import { defineCommand as defineCommand173 } from "citty";
|
|
55414
55709
|
registerSchema({
|
|
55415
55710
|
command: "landing.inspiration.favorites",
|
|
55416
55711
|
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.",
|
|
@@ -55424,7 +55719,7 @@ registerSchema({
|
|
|
55424
55719
|
}
|
|
55425
55720
|
}
|
|
55426
55721
|
});
|
|
55427
|
-
var favoritesCommand =
|
|
55722
|
+
var favoritesCommand = defineCommand173({
|
|
55428
55723
|
meta: {
|
|
55429
55724
|
name: "favorites",
|
|
55430
55725
|
description: "List this company's saved reference sections. Example: baker landing inspiration favorites --type hero,pricing"
|
|
@@ -55504,7 +55799,7 @@ registerSchema({
|
|
|
55504
55799
|
note: { type: "string", description: "Why this is worth keeping", required: false }
|
|
55505
55800
|
}
|
|
55506
55801
|
});
|
|
55507
|
-
var favoriteCommand =
|
|
55802
|
+
var favoriteCommand = defineCommand173({
|
|
55508
55803
|
meta: {
|
|
55509
55804
|
name: "favorite",
|
|
55510
55805
|
description: "Save a reference section to this company. Example: baker landing inspiration favorite k57abc\u2026"
|
|
@@ -55542,7 +55837,7 @@ registerSchema({
|
|
|
55542
55837
|
page: { type: "boolean", description: "Treat the id as a page rather than a section", required: false }
|
|
55543
55838
|
}
|
|
55544
55839
|
});
|
|
55545
|
-
var unfavoriteCommand =
|
|
55840
|
+
var unfavoriteCommand = defineCommand173({
|
|
55546
55841
|
meta: {
|
|
55547
55842
|
name: "unfavorite",
|
|
55548
55843
|
description: "Remove a reference section from this company's saved set. Example: baker landing inspiration unfavorite k57abc\u2026"
|
|
@@ -55564,7 +55859,7 @@ var unfavoriteCommand = defineCommand172({
|
|
|
55564
55859
|
});
|
|
55565
55860
|
|
|
55566
55861
|
// src/commands/landing/inspiration/page.ts
|
|
55567
|
-
import { defineCommand as
|
|
55862
|
+
import { defineCommand as defineCommand174 } from "citty";
|
|
55568
55863
|
registerSchema({
|
|
55569
55864
|
command: "landing.inspiration.page",
|
|
55570
55865
|
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.",
|
|
@@ -55581,7 +55876,7 @@ registerSchema({
|
|
|
55581
55876
|
}
|
|
55582
55877
|
}
|
|
55583
55878
|
});
|
|
55584
|
-
var pageCommand2 =
|
|
55879
|
+
var pageCommand2 = defineCommand174({
|
|
55585
55880
|
meta: {
|
|
55586
55881
|
name: "page",
|
|
55587
55882
|
description: "Show how a reference page sequences its sections. Example: baker landing inspiration page j91xyz\u2026 \u2014 the blueprint, not the pixels."
|
|
@@ -55644,7 +55939,7 @@ var pageCommand2 = defineCommand173({
|
|
|
55644
55939
|
});
|
|
55645
55940
|
|
|
55646
55941
|
// src/commands/landing/inspiration/scrape.ts
|
|
55647
|
-
import { defineCommand as
|
|
55942
|
+
import { defineCommand as defineCommand175 } from "citty";
|
|
55648
55943
|
|
|
55649
55944
|
// src/engine/landing-library/proxyFailure.ts
|
|
55650
55945
|
var PROXY_STATUS = 407;
|
|
@@ -57784,7 +58079,7 @@ registerSchema({
|
|
|
57784
58079
|
report: { type: "boolean", description: "Write report.html. `--no-report` to skip", required: false }
|
|
57785
58080
|
}
|
|
57786
58081
|
});
|
|
57787
|
-
var scrapeCommand =
|
|
58082
|
+
var scrapeCommand = defineCommand175({
|
|
57788
58083
|
meta: {
|
|
57789
58084
|
name: "scrape",
|
|
57790
58085
|
description: "Capture a landing page to a directory, now. Example: baker landing inspiration scrape https://linear.app --out .baker/inspiration/linear.app"
|
|
@@ -57893,7 +58188,7 @@ var scrapeCommand = defineCommand174({
|
|
|
57893
58188
|
|
|
57894
58189
|
// src/commands/landing/inspiration/search.ts
|
|
57895
58190
|
import path43 from "path";
|
|
57896
|
-
import { defineCommand as
|
|
58191
|
+
import { defineCommand as defineCommand176 } from "citty";
|
|
57897
58192
|
|
|
57898
58193
|
// src/commands/landing/inspiration/shot.ts
|
|
57899
58194
|
import { mkdir as mkdir13, writeFile as writeFile18 } from "fs/promises";
|
|
@@ -58030,7 +58325,7 @@ async function downloadShots(results) {
|
|
|
58030
58325
|
);
|
|
58031
58326
|
return saved;
|
|
58032
58327
|
}
|
|
58033
|
-
var searchCommand2 =
|
|
58328
|
+
var searchCommand2 = defineCommand176({
|
|
58034
58329
|
meta: {
|
|
58035
58330
|
name: "search",
|
|
58036
58331
|
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"
|
|
@@ -58128,7 +58423,7 @@ var searchCommand2 = defineCommand175({
|
|
|
58128
58423
|
});
|
|
58129
58424
|
|
|
58130
58425
|
// src/commands/landing/inspiration/sequences.ts
|
|
58131
|
-
import { defineCommand as
|
|
58426
|
+
import { defineCommand as defineCommand177 } from "citty";
|
|
58132
58427
|
var COMPACT_TRANSITIONS = 12;
|
|
58133
58428
|
var COMPACT_ENDS = 5;
|
|
58134
58429
|
var MAX_PAGES = 50;
|
|
@@ -58202,7 +58497,7 @@ function sequencesHints(data, { scope, full }) {
|
|
|
58202
58497
|
if (scope === "favorites") hints2.push(...favoritesScopeHints(data.favoritesHealth, data.pagesReturned));
|
|
58203
58498
|
return hints2;
|
|
58204
58499
|
}
|
|
58205
|
-
var sequencesCommand =
|
|
58500
|
+
var sequencesCommand = defineCommand177({
|
|
58206
58501
|
meta: {
|
|
58207
58502
|
name: "sequences",
|
|
58208
58503
|
description: "What section follows what, across many real pages at once. Example: baker landing inspiration sequences 'developer tool pricing page' --scope all \u2014 the evidence for how to order a page you are about to build."
|
|
@@ -58252,7 +58547,7 @@ var sequencesCommand = defineCommand176({
|
|
|
58252
58547
|
|
|
58253
58548
|
// src/commands/landing/inspiration/view.ts
|
|
58254
58549
|
import path44 from "path";
|
|
58255
|
-
import { defineCommand as
|
|
58550
|
+
import { defineCommand as defineCommand178 } from "citty";
|
|
58256
58551
|
registerSchema({
|
|
58257
58552
|
command: "landing.inspiration.view",
|
|
58258
58553
|
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.",
|
|
@@ -58265,7 +58560,7 @@ registerSchema({
|
|
|
58265
58560
|
}
|
|
58266
58561
|
}
|
|
58267
58562
|
});
|
|
58268
|
-
var viewCommand2 =
|
|
58563
|
+
var viewCommand2 = defineCommand178({
|
|
58269
58564
|
meta: {
|
|
58270
58565
|
name: "view",
|
|
58271
58566
|
description: "Full detail for one reference section. Example: baker landing inspiration view k57abc\u2026 \u2014 read the screenshots it saves before you build."
|
|
@@ -58349,7 +58644,7 @@ var viewCommand2 = defineCommand177({
|
|
|
58349
58644
|
});
|
|
58350
58645
|
|
|
58351
58646
|
// src/commands/landing/inspiration/index.ts
|
|
58352
|
-
var inspirationCommand =
|
|
58647
|
+
var inspirationCommand = defineCommand179({
|
|
58353
58648
|
meta: {
|
|
58354
58649
|
name: "inspiration",
|
|
58355
58650
|
description: `Reference library of real landing-page sections \u2014 look at how good pages actually solve a problem before you design one.
|
|
@@ -58397,7 +58692,7 @@ Full guide: __tooling__/docs/tools/baker/landing.md`
|
|
|
58397
58692
|
import { randomUUID as randomUUID2 } from "crypto";
|
|
58398
58693
|
import { mkdir as mkdir14, readdir as readdir15, readFile as readFile31, stat as stat10, writeFile as writeFile19 } from "fs/promises";
|
|
58399
58694
|
import path45 from "path";
|
|
58400
|
-
import { defineCommand as
|
|
58695
|
+
import { defineCommand as defineCommand180 } from "citty";
|
|
58401
58696
|
registerSchema({
|
|
58402
58697
|
command: "landing.variant",
|
|
58403
58698
|
description: "Create a new variant of a page, for an A/B test. The variant shares the page's sections instead of copying them, so the only difference between the two is the one you fork \u2014 which is the only way the test measures what you think it measures. Run `baker experiment plan` FIRST: most pages cannot settle most questions.",
|
|
@@ -58625,7 +58920,7 @@ async function writeVariant(opts) {
|
|
|
58625
58920
|
await writeFile19(path45.join(variantDir, "_images", ".gitkeep"), "", "utf8");
|
|
58626
58921
|
return written;
|
|
58627
58922
|
}
|
|
58628
|
-
var variantCommand =
|
|
58923
|
+
var variantCommand = defineCommand180({
|
|
58629
58924
|
meta: {
|
|
58630
58925
|
name: "variant",
|
|
58631
58926
|
description: "Create a new variant of a page, for an A/B test. The variant SHARES the page's sections and forks only the component you name, so the two versions differ by exactly the thing you are testing. It is a version of that page, not a page of its own: it is never indexed, never listed, and has no public URL \u2014 both versions answer at the page's own address. Run `baker experiment plan` first \u2014 most pages do not have the traffic to settle most questions."
|
|
@@ -58705,7 +59000,7 @@ var variantCommand = defineCommand179({
|
|
|
58705
59000
|
});
|
|
58706
59001
|
|
|
58707
59002
|
// src/commands/landing/index.ts
|
|
58708
|
-
var landingCommand =
|
|
59003
|
+
var landingCommand = defineCommand181({
|
|
58709
59004
|
meta: {
|
|
58710
59005
|
name: "landing",
|
|
58711
59006
|
description: `Design-quality tools for landing pages (src/pages/<slug>/).
|
|
@@ -58725,7 +59020,7 @@ Subcommands:
|
|
|
58725
59020
|
});
|
|
58726
59021
|
|
|
58727
59022
|
// src/commands/mcp/index.ts
|
|
58728
|
-
import { defineCommand as
|
|
59023
|
+
import { defineCommand as defineCommand182 } from "citty";
|
|
58729
59024
|
|
|
58730
59025
|
// src/commands/mcp/platforms.ts
|
|
58731
59026
|
function readsKey(label) {
|
|
@@ -58794,7 +59089,7 @@ registerSchema({
|
|
|
58794
59089
|
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.",
|
|
58795
59090
|
args: {}
|
|
58796
59091
|
});
|
|
58797
|
-
var connectedCommand =
|
|
59092
|
+
var connectedCommand = defineCommand182({
|
|
58798
59093
|
meta: {
|
|
58799
59094
|
name: "connected",
|
|
58800
59095
|
description: `Everything this chat can reach \u2014 managed integrations, custom MCP servers, and connected platforms.
|
|
@@ -58853,7 +59148,7 @@ registerSchema({
|
|
|
58853
59148
|
description: "List the custom MCP servers this company's chats see (org + company + your own user scope).",
|
|
58854
59149
|
args: {}
|
|
58855
59150
|
});
|
|
58856
|
-
var
|
|
59151
|
+
var listCommand16 = defineCommand182({
|
|
58857
59152
|
meta: { name: "list", description: "List custom MCP servers visible to this company's chats." },
|
|
58858
59153
|
run: async () => {
|
|
58859
59154
|
try {
|
|
@@ -58890,7 +59185,7 @@ registerSchema({
|
|
|
58890
59185
|
header: { type: "string", description: 'Auth header "Key: Value" (repeatable)', required: false }
|
|
58891
59186
|
}
|
|
58892
59187
|
});
|
|
58893
|
-
var addCommand2 =
|
|
59188
|
+
var addCommand2 = defineCommand182({
|
|
58894
59189
|
meta: {
|
|
58895
59190
|
name: "add",
|
|
58896
59191
|
description: `Register a custom MCP server. Tools appear as mcp__<name>__* on the NEXT message.
|
|
@@ -58942,7 +59237,7 @@ registerSchema({
|
|
|
58942
59237
|
description: "Remove a company custom MCP server by name.",
|
|
58943
59238
|
args: { name: { type: "string", description: "Server name to remove", required: true } }
|
|
58944
59239
|
});
|
|
58945
|
-
var removeCommand5 =
|
|
59240
|
+
var removeCommand5 = defineCommand182({
|
|
58946
59241
|
meta: {
|
|
58947
59242
|
name: "remove",
|
|
58948
59243
|
description: `Remove a company custom MCP server by name.
|
|
@@ -58964,7 +59259,7 @@ Example:
|
|
|
58964
59259
|
}
|
|
58965
59260
|
}
|
|
58966
59261
|
});
|
|
58967
|
-
var mcpCommand =
|
|
59262
|
+
var mcpCommand = defineCommand182({
|
|
58968
59263
|
meta: {
|
|
58969
59264
|
name: "mcp",
|
|
58970
59265
|
description: `Third-party tools for this company \u2014 see what's connected, register custom HTTPS MCP endpoints.
|
|
@@ -58983,17 +59278,17 @@ Full guide: __tooling__/docs/tools/baker/mcp.md`
|
|
|
58983
59278
|
},
|
|
58984
59279
|
subCommands: {
|
|
58985
59280
|
connected: connectedCommand,
|
|
58986
|
-
list:
|
|
59281
|
+
list: listCommand16,
|
|
58987
59282
|
add: addCommand2,
|
|
58988
59283
|
remove: removeCommand5
|
|
58989
59284
|
}
|
|
58990
59285
|
});
|
|
58991
59286
|
|
|
58992
59287
|
// src/commands/research/index.ts
|
|
58993
|
-
import { defineCommand as
|
|
59288
|
+
import { defineCommand as defineCommand195 } from "citty";
|
|
58994
59289
|
|
|
58995
59290
|
// src/commands/research/advertisers.ts
|
|
58996
|
-
import { defineCommand as
|
|
59291
|
+
import { defineCommand as defineCommand183 } from "citty";
|
|
58997
59292
|
|
|
58998
59293
|
// src/commands/research/hints.ts
|
|
58999
59294
|
var AD_COPY_ROUTE = 'This returns competing DOMAINS and their SERP economics \u2014 no ad copy, no headlines, no creative. For the actual copy of a competitor\'s ads: `baker winning-ads advertisers "<brand>"` \u2192 `baker winning-ads search "<brief>" --advertiser-id <id>` \u2192 `baker winning-ads content <adId>` (`primary_text` / `headline` / `cta`, plus the spoken transcript and on-screen text for video). That corpus is Meta and LinkedIn only \u2014 Google SERP ad copy is not available through any Baker command, so do not keep querying for it here.';
|
|
@@ -59195,7 +59490,7 @@ var FIELDS3 = {
|
|
|
59195
59490
|
etv: "Estimated traffic value (USD)",
|
|
59196
59491
|
visibility: "SERP visibility score (0-1)"
|
|
59197
59492
|
};
|
|
59198
|
-
var advertisersCommand =
|
|
59493
|
+
var advertisersCommand = defineCommand183({
|
|
59199
59494
|
meta: {
|
|
59200
59495
|
name: "advertisers",
|
|
59201
59496
|
description: `Domains competing for a keyword in Google SERPs, with position, relevance, traffic value and visibility. Returns NO ad copy \u2014 for a competitor's headlines and body copy use \`baker winning-ads content <adId>\` (Meta/LinkedIn only).
|
|
@@ -59251,7 +59546,7 @@ Examples:
|
|
|
59251
59546
|
});
|
|
59252
59547
|
|
|
59253
59548
|
// src/commands/research/autocomplete.ts
|
|
59254
|
-
import { defineCommand as
|
|
59549
|
+
import { defineCommand as defineCommand184 } from "citty";
|
|
59255
59550
|
registerSchema({
|
|
59256
59551
|
command: "research.autocomplete",
|
|
59257
59552
|
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).",
|
|
@@ -59274,7 +59569,7 @@ registerSchema({
|
|
|
59274
59569
|
var FIELDS4 = {
|
|
59275
59570
|
suggestion: "Autocomplete suggestion from Google"
|
|
59276
59571
|
};
|
|
59277
|
-
var autocompleteCommand =
|
|
59572
|
+
var autocompleteCommand = defineCommand184({
|
|
59278
59573
|
meta: {
|
|
59279
59574
|
name: "autocomplete",
|
|
59280
59575
|
description: `Get Google Autocomplete suggestions for keyword expansion.
|
|
@@ -59329,7 +59624,7 @@ Examples:
|
|
|
59329
59624
|
});
|
|
59330
59625
|
|
|
59331
59626
|
// src/commands/research/countries.ts
|
|
59332
|
-
import { defineCommand as
|
|
59627
|
+
import { defineCommand as defineCommand185 } from "citty";
|
|
59333
59628
|
registerSchema({
|
|
59334
59629
|
command: "research.countries",
|
|
59335
59630
|
description: "List all supported country codes for --location flag in research commands.",
|
|
@@ -59386,7 +59681,7 @@ var FIELDS5 = {
|
|
|
59386
59681
|
code: "Country code to pass as --location",
|
|
59387
59682
|
name: "Country name"
|
|
59388
59683
|
};
|
|
59389
|
-
var countriesCommand =
|
|
59684
|
+
var countriesCommand = defineCommand185({
|
|
59390
59685
|
meta: {
|
|
59391
59686
|
name: "countries",
|
|
59392
59687
|
description: "List all supported country codes for --location flag."
|
|
@@ -59397,7 +59692,7 @@ var countriesCommand = defineCommand184({
|
|
|
59397
59692
|
});
|
|
59398
59693
|
|
|
59399
59694
|
// src/commands/research/fetch.ts
|
|
59400
|
-
import { defineCommand as
|
|
59695
|
+
import { defineCommand as defineCommand186 } from "citty";
|
|
59401
59696
|
var CONTENT_PREVIEW_CHARS = 2e4;
|
|
59402
59697
|
var TIMEOUT_MS = 18e4;
|
|
59403
59698
|
registerSchema({
|
|
@@ -59470,7 +59765,7 @@ function fetchFix(code) {
|
|
|
59470
59765
|
explanation: "This read failed. Don't build a retry ladder around it \u2014 finish the rest of the job with what you can reach and name this page as a gap."
|
|
59471
59766
|
};
|
|
59472
59767
|
}
|
|
59473
|
-
var fetchCommand =
|
|
59768
|
+
var fetchCommand = defineCommand186({
|
|
59474
59769
|
meta: {
|
|
59475
59770
|
name: "fetch",
|
|
59476
59771
|
description: `Read a page an ordinary web fetch could not. Bot walls and JavaScript-rendered pages are resolved for you \u2014 you never have to retry, wait, or drive a browser yourself.
|
|
@@ -59547,7 +59842,7 @@ Examples:
|
|
|
59547
59842
|
});
|
|
59548
59843
|
|
|
59549
59844
|
// src/commands/research/intent.ts
|
|
59550
|
-
import { defineCommand as
|
|
59845
|
+
import { defineCommand as defineCommand187 } from "citty";
|
|
59551
59846
|
registerSchema({
|
|
59552
59847
|
command: "research.intent",
|
|
59553
59848
|
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.",
|
|
@@ -59570,7 +59865,7 @@ var FIELDS7 = {
|
|
|
59570
59865
|
intent: "Primary Google Search intent: informational, navigational, commercial, transactional",
|
|
59571
59866
|
probability: "Confidence score 0.0-1.0"
|
|
59572
59867
|
};
|
|
59573
|
-
var intentCommand =
|
|
59868
|
+
var intentCommand = defineCommand187({
|
|
59574
59869
|
meta: {
|
|
59575
59870
|
name: "intent",
|
|
59576
59871
|
description: `Classify Google Search intent for keywords. Returns intent type and confidence.
|
|
@@ -59618,7 +59913,7 @@ Examples:
|
|
|
59618
59913
|
});
|
|
59619
59914
|
|
|
59620
59915
|
// src/commands/research/keyword-gap.ts
|
|
59621
|
-
import { defineCommand as
|
|
59916
|
+
import { defineCommand as defineCommand188 } from "citty";
|
|
59622
59917
|
registerSchema({
|
|
59623
59918
|
command: "research.keyword-gap",
|
|
59624
59919
|
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.",
|
|
@@ -59647,7 +59942,7 @@ var FIELDS8 = {
|
|
|
59647
59942
|
cpc: "Cost per click USD",
|
|
59648
59943
|
their_position: "Competitor's ranking position"
|
|
59649
59944
|
};
|
|
59650
|
-
var keywordGapCommand =
|
|
59945
|
+
var keywordGapCommand = defineCommand188({
|
|
59651
59946
|
meta: {
|
|
59652
59947
|
name: "keyword-gap",
|
|
59653
59948
|
description: `Find keywords a competitor has that you don't. Supports pagination via --offset.
|
|
@@ -59722,7 +60017,7 @@ Examples:
|
|
|
59722
60017
|
});
|
|
59723
60018
|
|
|
59724
60019
|
// src/commands/research/keyword-metrics.ts
|
|
59725
|
-
import { defineCommand as
|
|
60020
|
+
import { defineCommand as defineCommand189 } from "citty";
|
|
59726
60021
|
|
|
59727
60022
|
// src/commands/research/keyword-metrics-rows.ts
|
|
59728
60023
|
var KEYWORD_METRICS_SOURCE = "keyword_planner_estimate_via_dataforseo";
|
|
@@ -59802,7 +60097,7 @@ registerSchema({
|
|
|
59802
60097
|
"no-cache": { type: "boolean", description: "Skip server cache, hit API directly", required: false }
|
|
59803
60098
|
}
|
|
59804
60099
|
});
|
|
59805
|
-
var keywordMetricsCommand =
|
|
60100
|
+
var keywordMetricsCommand = defineCommand189({
|
|
59806
60101
|
meta: {
|
|
59807
60102
|
name: "keyword-metrics",
|
|
59808
60103
|
description: `Volume, CPC and competition for keywords you name. No domain required.
|
|
@@ -59884,7 +60179,7 @@ Examples:
|
|
|
59884
60179
|
});
|
|
59885
60180
|
|
|
59886
60181
|
// src/commands/research/keywords-for-site.ts
|
|
59887
|
-
import { defineCommand as
|
|
60182
|
+
import { defineCommand as defineCommand190 } from "citty";
|
|
59888
60183
|
registerSchema({
|
|
59889
60184
|
command: "research.keywords-for-site",
|
|
59890
60185
|
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.",
|
|
@@ -59917,7 +60212,7 @@ var FIELDS9 = {
|
|
|
59917
60212
|
competition: "LOW, MEDIUM, or HIGH",
|
|
59918
60213
|
competition_index: "Competition score 0-100"
|
|
59919
60214
|
};
|
|
59920
|
-
var keywordsForSiteCommand =
|
|
60215
|
+
var keywordsForSiteCommand = defineCommand190({
|
|
59921
60216
|
meta: {
|
|
59922
60217
|
name: "keywords-for-site",
|
|
59923
60218
|
description: `Get keywords a competitor targets in Google. Use --type to filter paid/organic.
|
|
@@ -59979,7 +60274,7 @@ Examples:
|
|
|
59979
60274
|
});
|
|
59980
60275
|
|
|
59981
60276
|
// src/commands/research/languages.ts
|
|
59982
|
-
import { defineCommand as
|
|
60277
|
+
import { defineCommand as defineCommand191 } from "citty";
|
|
59983
60278
|
registerSchema({
|
|
59984
60279
|
command: "research.languages",
|
|
59985
60280
|
description: "List all supported language codes for --language flag in research commands.",
|
|
@@ -60009,7 +60304,7 @@ var FIELDS10 = {
|
|
|
60009
60304
|
code: "Language code to pass as --language",
|
|
60010
60305
|
name: "Language name (also accepted by --language)"
|
|
60011
60306
|
};
|
|
60012
|
-
var languagesCommand2 =
|
|
60307
|
+
var languagesCommand2 = defineCommand191({
|
|
60013
60308
|
meta: {
|
|
60014
60309
|
name: "languages",
|
|
60015
60310
|
description: "List all supported language codes for --language flag."
|
|
@@ -60020,7 +60315,7 @@ var languagesCommand2 = defineCommand190({
|
|
|
60020
60315
|
});
|
|
60021
60316
|
|
|
60022
60317
|
// src/commands/research/lighthouse.ts
|
|
60023
|
-
import { defineCommand as
|
|
60318
|
+
import { defineCommand as defineCommand192 } from "citty";
|
|
60024
60319
|
registerSchema({
|
|
60025
60320
|
command: "research.lighthouse",
|
|
60026
60321
|
description: "Landing page performance audit. Returns metrics that affect Google Ads Quality Score and CPC.",
|
|
@@ -60039,7 +60334,7 @@ var FIELDS11 = {
|
|
|
60039
60334
|
speed_index_ms: "Speed Index in ms (good: < 3400)",
|
|
60040
60335
|
interactive_ms: "Time to Interactive in ms (good: < 3800)"
|
|
60041
60336
|
};
|
|
60042
|
-
var lighthouseCommand =
|
|
60337
|
+
var lighthouseCommand = defineCommand192({
|
|
60043
60338
|
meta: {
|
|
60044
60339
|
name: "lighthouse",
|
|
60045
60340
|
description: `Landing page performance audit. Metrics affecting Google Ads Quality Score.
|
|
@@ -60077,7 +60372,7 @@ Examples:
|
|
|
60077
60372
|
});
|
|
60078
60373
|
|
|
60079
60374
|
// src/commands/research/relevant-pages.ts
|
|
60080
|
-
import { defineCommand as
|
|
60375
|
+
import { defineCommand as defineCommand193 } from "citty";
|
|
60081
60376
|
registerSchema({
|
|
60082
60377
|
command: "research.relevant-pages",
|
|
60083
60378
|
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).",
|
|
@@ -60103,7 +60398,7 @@ var FIELDS12 = {
|
|
|
60103
60398
|
keywords: "Total organic keywords the page ranks for",
|
|
60104
60399
|
top_10: "Keywords in positions 1-10"
|
|
60105
60400
|
};
|
|
60106
|
-
var relevantPagesCommand =
|
|
60401
|
+
var relevantPagesCommand = defineCommand193({
|
|
60107
60402
|
meta: {
|
|
60108
60403
|
name: "relevant-pages",
|
|
60109
60404
|
description: `Get the top pages of a competitor domain with traffic data.
|
|
@@ -60150,7 +60445,7 @@ Examples:
|
|
|
60150
60445
|
});
|
|
60151
60446
|
|
|
60152
60447
|
// src/commands/research/web.ts
|
|
60153
|
-
import { defineCommand as
|
|
60448
|
+
import { defineCommand as defineCommand194 } from "citty";
|
|
60154
60449
|
registerSchema({
|
|
60155
60450
|
command: "research.web",
|
|
60156
60451
|
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).",
|
|
@@ -60201,7 +60496,7 @@ async function runDeepResearch(question) {
|
|
|
60201
60496
|
}
|
|
60202
60497
|
throw new Error("Deep research timed out");
|
|
60203
60498
|
}
|
|
60204
|
-
var webCommand =
|
|
60499
|
+
var webCommand = defineCommand194({
|
|
60205
60500
|
meta: {
|
|
60206
60501
|
name: "web",
|
|
60207
60502
|
description: `Search the web with AI to answer any open-ended marketing question. Uses live internet data via Google Search.
|
|
@@ -60263,7 +60558,7 @@ Examples:
|
|
|
60263
60558
|
});
|
|
60264
60559
|
|
|
60265
60560
|
// src/commands/research/index.ts
|
|
60266
|
-
var researchCommand =
|
|
60561
|
+
var researchCommand = defineCommand195({
|
|
60267
60562
|
meta: {
|
|
60268
60563
|
name: "research",
|
|
60269
60564
|
description: `Competitive intelligence and AI-powered research commands.
|
|
@@ -60310,10 +60605,10 @@ Full guide: __tooling__/docs/tools/baker/research.md`
|
|
|
60310
60605
|
});
|
|
60311
60606
|
|
|
60312
60607
|
// src/commands/scheduled-actions/index.ts
|
|
60313
|
-
import { defineCommand as
|
|
60608
|
+
import { defineCommand as defineCommand203 } from "citty";
|
|
60314
60609
|
|
|
60315
60610
|
// src/commands/scheduled-actions/create.ts
|
|
60316
|
-
import { defineCommand as
|
|
60611
|
+
import { defineCommand as defineCommand196 } from "citty";
|
|
60317
60612
|
|
|
60318
60613
|
// src/commands/scheduled-actions/shared.ts
|
|
60319
60614
|
var TEMP_SCHEDULED_ACTION_PREFIX = "temp_sched_";
|
|
@@ -60469,7 +60764,7 @@ registerSchema({
|
|
|
60469
60764
|
}
|
|
60470
60765
|
}
|
|
60471
60766
|
});
|
|
60472
|
-
var createCommand3 =
|
|
60767
|
+
var createCommand3 = defineCommand196({
|
|
60473
60768
|
meta: {
|
|
60474
60769
|
name: "create",
|
|
60475
60770
|
description: 'Stage a scheduled action. Example: baker scheduled-actions create --name "Weekly report" --description "..." --cron "0 9 * * MON"'
|
|
@@ -60528,7 +60823,7 @@ var createCommand3 = defineCommand195({
|
|
|
60528
60823
|
});
|
|
60529
60824
|
|
|
60530
60825
|
// src/commands/scheduled-actions/delete.ts
|
|
60531
|
-
import { defineCommand as
|
|
60826
|
+
import { defineCommand as defineCommand197 } from "citty";
|
|
60532
60827
|
registerSchema({
|
|
60533
60828
|
command: "scheduled-actions.delete",
|
|
60534
60829
|
description: "Stage deletion of a published scheduled action or cancellation of a temp_sched_* draft creation.",
|
|
@@ -60536,7 +60831,7 @@ registerSchema({
|
|
|
60536
60831
|
id: { type: "string", description: "Published scheduled action ID or temp_sched_* draft ID", required: true }
|
|
60537
60832
|
}
|
|
60538
60833
|
});
|
|
60539
|
-
var deleteCommand3 =
|
|
60834
|
+
var deleteCommand3 = defineCommand197({
|
|
60540
60835
|
meta: {
|
|
60541
60836
|
name: "delete",
|
|
60542
60837
|
description: "Stage scheduled action deletion. Example: baker scheduled-actions delete <id-or-temp_sched_id>"
|
|
@@ -60565,7 +60860,7 @@ var deleteCommand3 = defineCommand196({
|
|
|
60565
60860
|
});
|
|
60566
60861
|
|
|
60567
60862
|
// src/commands/scheduled-actions/get.ts
|
|
60568
|
-
import { defineCommand as
|
|
60863
|
+
import { defineCommand as defineCommand198 } from "citty";
|
|
60569
60864
|
registerSchema({
|
|
60570
60865
|
command: "scheduled-actions.get",
|
|
60571
60866
|
description: "Get a published scheduled action or a temp_sched_* draft-created scheduled action.",
|
|
@@ -60574,7 +60869,7 @@ registerSchema({
|
|
|
60574
60869
|
chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
|
|
60575
60870
|
}
|
|
60576
60871
|
});
|
|
60577
|
-
var getCommand4 =
|
|
60872
|
+
var getCommand4 = defineCommand198({
|
|
60578
60873
|
meta: {
|
|
60579
60874
|
name: "get",
|
|
60580
60875
|
description: "Get a scheduled action. Example: baker scheduled-actions get <id-or-temp_sched_id>"
|
|
@@ -60613,7 +60908,7 @@ var getCommand4 = defineCommand197({
|
|
|
60613
60908
|
});
|
|
60614
60909
|
|
|
60615
60910
|
// src/commands/scheduled-actions/list.ts
|
|
60616
|
-
import { defineCommand as
|
|
60911
|
+
import { defineCommand as defineCommand199 } from "citty";
|
|
60617
60912
|
registerSchema({
|
|
60618
60913
|
command: "scheduled-actions.list",
|
|
60619
60914
|
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.",
|
|
@@ -60621,7 +60916,7 @@ registerSchema({
|
|
|
60621
60916
|
chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
|
|
60622
60917
|
}
|
|
60623
60918
|
});
|
|
60624
|
-
var
|
|
60919
|
+
var listCommand17 = defineCommand199({
|
|
60625
60920
|
meta: {
|
|
60626
60921
|
name: "list",
|
|
60627
60922
|
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."
|
|
@@ -60646,7 +60941,7 @@ var listCommand16 = defineCommand198({
|
|
|
60646
60941
|
// src/commands/scheduled-actions/templates.ts
|
|
60647
60942
|
import { readFile as readFile32 } from "fs/promises";
|
|
60648
60943
|
import path46 from "path";
|
|
60649
|
-
import { defineCommand as
|
|
60944
|
+
import { defineCommand as defineCommand200 } from "citty";
|
|
60650
60945
|
registerSchema({
|
|
60651
60946
|
command: "scheduled-actions.templates",
|
|
60652
60947
|
description: "The recipes available to this company: the ones Baker ships plus the ones they wrote themselves, each with its id, what it produces and how often it is meant to run. Read this before proposing a company's automation, so every recipe you name is one that exists. Also how a company gets a recipe of its own \u2014 save a brief, prove it runs, then publish it.",
|
|
@@ -60701,7 +60996,7 @@ registerSchema({
|
|
|
60701
60996
|
}
|
|
60702
60997
|
}
|
|
60703
60998
|
});
|
|
60704
|
-
var templatesCommand =
|
|
60999
|
+
var templatesCommand = defineCommand200({
|
|
60705
61000
|
meta: {
|
|
60706
61001
|
name: "templates",
|
|
60707
61002
|
description: `The recipes this company can run \u2014 Baker's own plus theirs, with what each one produces.
|
|
@@ -60793,7 +61088,7 @@ Full guide: __tooling__/docs/tools/baker/scheduled-actions.md`
|
|
|
60793
61088
|
});
|
|
60794
61089
|
|
|
60795
61090
|
// src/commands/scheduled-actions/trigger.ts
|
|
60796
|
-
import { defineCommand as
|
|
61091
|
+
import { defineCommand as defineCommand201 } from "citty";
|
|
60797
61092
|
registerSchema({
|
|
60798
61093
|
command: "scheduled-actions.trigger",
|
|
60799
61094
|
description: "Immediately trigger a published scheduled action. Does not require BAKER_CHAT_ID and rejects temp_sched_* IDs.",
|
|
@@ -60801,7 +61096,7 @@ registerSchema({
|
|
|
60801
61096
|
id: { type: "string", description: "Published scheduled action ID", required: true }
|
|
60802
61097
|
}
|
|
60803
61098
|
});
|
|
60804
|
-
var triggerCommand =
|
|
61099
|
+
var triggerCommand = defineCommand201({
|
|
60805
61100
|
meta: {
|
|
60806
61101
|
name: "trigger",
|
|
60807
61102
|
description: "Immediately trigger a published scheduled action. Example: baker scheduled-actions trigger <id>"
|
|
@@ -60838,7 +61133,7 @@ var triggerCommand = defineCommand200({
|
|
|
60838
61133
|
});
|
|
60839
61134
|
|
|
60840
61135
|
// src/commands/scheduled-actions/update.ts
|
|
60841
|
-
import { defineCommand as
|
|
61136
|
+
import { defineCommand as defineCommand202 } from "citty";
|
|
60842
61137
|
registerSchema({
|
|
60843
61138
|
command: "scheduled-actions.update",
|
|
60844
61139
|
description: "Stage an update to a published scheduled action or temp_sched_* draft-created scheduled action.",
|
|
@@ -60869,7 +61164,7 @@ registerSchema({
|
|
|
60869
61164
|
prompt: { type: "string", description: "Replacement additional spawned-agent instructions", required: false }
|
|
60870
61165
|
}
|
|
60871
61166
|
});
|
|
60872
|
-
var updateCommand4 =
|
|
61167
|
+
var updateCommand4 = defineCommand202({
|
|
60873
61168
|
meta: {
|
|
60874
61169
|
name: "update",
|
|
60875
61170
|
description: "Stage a scheduled action update. Examples: baker scheduled-actions update <id> --enabled false | baker scheduled-actions update <id> --mode publish"
|
|
@@ -60947,7 +61242,7 @@ var updateCommand4 = defineCommand201({
|
|
|
60947
61242
|
});
|
|
60948
61243
|
|
|
60949
61244
|
// src/commands/scheduled-actions/index.ts
|
|
60950
|
-
var scheduledActionsCommand =
|
|
61245
|
+
var scheduledActionsCommand = defineCommand203({
|
|
60951
61246
|
meta: {
|
|
60952
61247
|
name: "scheduled-actions",
|
|
60953
61248
|
description: `Manage Scheduled Actions. Subcommands: list, get, create, update, delete, trigger, templates.
|
|
@@ -60965,7 +61260,7 @@ Examples:
|
|
|
60965
61260
|
Full guide: __tooling__/docs/tools/baker/scheduled-actions.md`
|
|
60966
61261
|
},
|
|
60967
61262
|
subCommands: {
|
|
60968
|
-
list:
|
|
61263
|
+
list: listCommand17,
|
|
60969
61264
|
get: getCommand4,
|
|
60970
61265
|
create: createCommand3,
|
|
60971
61266
|
update: updateCommand4,
|
|
@@ -60976,14 +61271,14 @@ Full guide: __tooling__/docs/tools/baker/scheduled-actions.md`
|
|
|
60976
61271
|
});
|
|
60977
61272
|
|
|
60978
61273
|
// src/commands/schema.ts
|
|
60979
|
-
import { defineCommand as
|
|
61274
|
+
import { defineCommand as defineCommand204 } from "citty";
|
|
60980
61275
|
function narrowToFamily(commandName, available) {
|
|
60981
61276
|
const segments = commandName.split(".");
|
|
60982
61277
|
const prefix = segments[0] === "ads" && segments[1] ? `ads.${segments[1]}.` : `${segments[0]}.`;
|
|
60983
61278
|
const siblings = available.filter((name) => name.startsWith(prefix));
|
|
60984
61279
|
return siblings.length > 0 ? siblings : available;
|
|
60985
61280
|
}
|
|
60986
|
-
var schemaCommand2 =
|
|
61281
|
+
var schemaCommand2 = defineCommand204({
|
|
60987
61282
|
meta: {
|
|
60988
61283
|
name: "schema",
|
|
60989
61284
|
description: "Inspect command argument schemas (for AI agent introspection). Lists all commands if no argument given. Example: baker schema images.search"
|
|
@@ -61027,10 +61322,10 @@ var schemaCommand2 = defineCommand203({
|
|
|
61027
61322
|
});
|
|
61028
61323
|
|
|
61029
61324
|
// src/commands/studio/index.ts
|
|
61030
|
-
import { defineCommand as
|
|
61325
|
+
import { defineCommand as defineCommand213 } from "citty";
|
|
61031
61326
|
|
|
61032
61327
|
// src/commands/studio/animate.ts
|
|
61033
|
-
import { defineCommand as
|
|
61328
|
+
import { defineCommand as defineCommand205 } from "citty";
|
|
61034
61329
|
|
|
61035
61330
|
// src/commands/studio/spokenPace.ts
|
|
61036
61331
|
var WORDS_PER_SECOND3 = SPOKEN_WORDS_PER_SECOND;
|
|
@@ -61543,7 +61838,7 @@ async function adByHandHintFor(body) {
|
|
|
61543
61838
|
return null;
|
|
61544
61839
|
}
|
|
61545
61840
|
}
|
|
61546
|
-
var animateCommand =
|
|
61841
|
+
var animateCommand = defineCommand205({
|
|
61547
61842
|
meta: {
|
|
61548
61843
|
name: "animate",
|
|
61549
61844
|
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 'she looks to camera and says: \"Hola, soy Elena\"' --avatar elena --quality 720p --aspect-ratio 9:16\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"
|
|
@@ -61668,7 +61963,7 @@ var animateCommand = defineCommand204({
|
|
|
61668
61963
|
});
|
|
61669
61964
|
|
|
61670
61965
|
// src/commands/studio/generate.ts
|
|
61671
|
-
import { defineCommand as
|
|
61966
|
+
import { defineCommand as defineCommand206 } from "citty";
|
|
61672
61967
|
var MODEL_LIST2 = IMAGE_MODEL_IDS;
|
|
61673
61968
|
var DEFAULT_MAX_WAIT_MS2 = 24e4;
|
|
61674
61969
|
registerSchema({
|
|
@@ -61804,7 +62099,7 @@ function buildGenerateBody(args4, prompt) {
|
|
|
61804
62099
|
}
|
|
61805
62100
|
return body;
|
|
61806
62101
|
}
|
|
61807
|
-
var generateCommand =
|
|
62102
|
+
var generateCommand = defineCommand206({
|
|
61808
62103
|
meta: {
|
|
61809
62104
|
name: "generate",
|
|
61810
62105
|
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]]'"
|
|
@@ -61887,7 +62182,7 @@ var generateCommand = defineCommand205({
|
|
|
61887
62182
|
});
|
|
61888
62183
|
|
|
61889
62184
|
// src/commands/studio/get.ts
|
|
61890
|
-
import { defineCommand as
|
|
62185
|
+
import { defineCommand as defineCommand207 } from "citty";
|
|
61891
62186
|
registerSchema({
|
|
61892
62187
|
command: "studio.get",
|
|
61893
62188
|
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.",
|
|
@@ -61896,7 +62191,7 @@ registerSchema({
|
|
|
61896
62191
|
full: { type: "boolean", description: "Include settings, references and attribution", required: false }
|
|
61897
62192
|
}
|
|
61898
62193
|
});
|
|
61899
|
-
var getCommand5 =
|
|
62194
|
+
var getCommand5 = defineCommand207({
|
|
61900
62195
|
meta: {
|
|
61901
62196
|
name: "get",
|
|
61902
62197
|
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"
|
|
@@ -61925,7 +62220,7 @@ var getCommand5 = defineCommand206({
|
|
|
61925
62220
|
});
|
|
61926
62221
|
|
|
61927
62222
|
// src/commands/studio/improve.ts
|
|
61928
|
-
import { defineCommand as
|
|
62223
|
+
import { defineCommand as defineCommand208 } from "citty";
|
|
61929
62224
|
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.";
|
|
61930
62225
|
registerSchema({
|
|
61931
62226
|
command: "studio.improve",
|
|
@@ -61950,7 +62245,7 @@ registerSchema({
|
|
|
61950
62245
|
}
|
|
61951
62246
|
}
|
|
61952
62247
|
});
|
|
61953
|
-
var improveCommand =
|
|
62248
|
+
var improveCommand = defineCommand208({
|
|
61954
62249
|
meta: {
|
|
61955
62250
|
name: "improve",
|
|
61956
62251
|
description: `${DESCRIPTION}
|
|
@@ -61994,7 +62289,7 @@ Examples:
|
|
|
61994
62289
|
});
|
|
61995
62290
|
|
|
61996
62291
|
// src/commands/studio/keep.ts
|
|
61997
|
-
import { defineCommand as
|
|
62292
|
+
import { defineCommand as defineCommand209 } from "citty";
|
|
61998
62293
|
registerSchema({
|
|
61999
62294
|
command: "studio.keep",
|
|
62000
62295
|
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.",
|
|
@@ -62004,7 +62299,7 @@ registerSchema({
|
|
|
62004
62299
|
undo: { type: "boolean", description: "Un-star an image, or take a kept clip back out", required: false }
|
|
62005
62300
|
}
|
|
62006
62301
|
});
|
|
62007
|
-
var keepCommand =
|
|
62302
|
+
var keepCommand = defineCommand209({
|
|
62008
62303
|
meta: {
|
|
62009
62304
|
name: "keep",
|
|
62010
62305
|
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"
|
|
@@ -62055,7 +62350,7 @@ var keepCommand = defineCommand208({
|
|
|
62055
62350
|
});
|
|
62056
62351
|
|
|
62057
62352
|
// src/commands/studio/list.ts
|
|
62058
|
-
import { defineCommand as
|
|
62353
|
+
import { defineCommand as defineCommand210 } from "citty";
|
|
62059
62354
|
registerSchema({
|
|
62060
62355
|
command: "studio.list",
|
|
62061
62356
|
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.",
|
|
@@ -62066,7 +62361,7 @@ registerSchema({
|
|
|
62066
62361
|
full: { type: "boolean", description: "Include settings, references and attribution", required: false }
|
|
62067
62362
|
}
|
|
62068
62363
|
});
|
|
62069
|
-
var
|
|
62364
|
+
var listCommand18 = defineCommand210({
|
|
62070
62365
|
meta: {
|
|
62071
62366
|
name: "list",
|
|
62072
62367
|
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"
|
|
@@ -62100,7 +62395,7 @@ var listCommand17 = defineCommand209({
|
|
|
62100
62395
|
});
|
|
62101
62396
|
|
|
62102
62397
|
// src/commands/studio/models.ts
|
|
62103
|
-
import { defineCommand as
|
|
62398
|
+
import { defineCommand as defineCommand211 } from "citty";
|
|
62104
62399
|
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.";
|
|
62105
62400
|
registerSchema({
|
|
62106
62401
|
command: "studio.models",
|
|
@@ -62187,7 +62482,7 @@ function buildModelCards(kind, model) {
|
|
|
62187
62482
|
const selected = model ? ids.filter((id) => id === model) : ids;
|
|
62188
62483
|
return selected.map((id) => build(id));
|
|
62189
62484
|
}
|
|
62190
|
-
var modelsCommand =
|
|
62485
|
+
var modelsCommand = defineCommand211({
|
|
62191
62486
|
meta: {
|
|
62192
62487
|
name: "models",
|
|
62193
62488
|
description: `${DESCRIPTION2}
|
|
@@ -62234,13 +62529,13 @@ Examples:
|
|
|
62234
62529
|
});
|
|
62235
62530
|
|
|
62236
62531
|
// src/commands/studio/skills.ts
|
|
62237
|
-
import { defineCommand as
|
|
62532
|
+
import { defineCommand as defineCommand212 } from "citty";
|
|
62238
62533
|
registerSchema({
|
|
62239
62534
|
command: "studio.skills",
|
|
62240
62535
|
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.",
|
|
62241
62536
|
args: {}
|
|
62242
62537
|
});
|
|
62243
|
-
var skillsCommand =
|
|
62538
|
+
var skillsCommand = defineCommand212({
|
|
62244
62539
|
meta: {
|
|
62245
62540
|
name: "skills",
|
|
62246
62541
|
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"
|
|
@@ -62264,7 +62559,7 @@ var skillsCommand = defineCommand211({
|
|
|
62264
62559
|
});
|
|
62265
62560
|
|
|
62266
62561
|
// src/commands/studio/index.ts
|
|
62267
|
-
var studioCommand =
|
|
62562
|
+
var studioCommand = defineCommand213({
|
|
62268
62563
|
meta: {
|
|
62269
62564
|
name: "studio",
|
|
62270
62565
|
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.
|
|
@@ -62298,7 +62593,7 @@ Full guide: __tooling__/docs/tools/baker/studio.md`
|
|
|
62298
62593
|
generate: generateCommand,
|
|
62299
62594
|
animate: animateCommand,
|
|
62300
62595
|
get: getCommand5,
|
|
62301
|
-
list:
|
|
62596
|
+
list: listCommand18,
|
|
62302
62597
|
keep: keepCommand,
|
|
62303
62598
|
models: modelsCommand,
|
|
62304
62599
|
skills: skillsCommand,
|
|
@@ -62307,10 +62602,10 @@ Full guide: __tooling__/docs/tools/baker/studio.md`
|
|
|
62307
62602
|
});
|
|
62308
62603
|
|
|
62309
62604
|
// src/commands/tag-manager/index.ts
|
|
62310
|
-
import { defineCommand as
|
|
62605
|
+
import { defineCommand as defineCommand217 } from "citty";
|
|
62311
62606
|
|
|
62312
62607
|
// src/commands/tag-manager/draft.ts
|
|
62313
|
-
import { defineCommand as
|
|
62608
|
+
import { defineCommand as defineCommand214 } from "citty";
|
|
62314
62609
|
|
|
62315
62610
|
// src/commands/tag-manager/shared.ts
|
|
62316
62611
|
import { readFileSync as readFileSync18 } from "fs";
|
|
@@ -62433,13 +62728,13 @@ registerSchema({
|
|
|
62433
62728
|
chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
|
|
62434
62729
|
}
|
|
62435
62730
|
});
|
|
62436
|
-
var draftCommand5 =
|
|
62731
|
+
var draftCommand5 = defineCommand214({
|
|
62437
62732
|
meta: {
|
|
62438
62733
|
name: "draft",
|
|
62439
62734
|
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."
|
|
62440
62735
|
},
|
|
62441
62736
|
subCommands: {
|
|
62442
|
-
list:
|
|
62737
|
+
list: defineCommand214({
|
|
62443
62738
|
meta: {
|
|
62444
62739
|
name: "list",
|
|
62445
62740
|
description: "Review everything staged on this chat (--json for the raw envelope)"
|
|
@@ -62452,7 +62747,7 @@ var draftCommand5 = defineCommand213({
|
|
|
62452
62747
|
await draftList2(args4.json === true, args4.chat);
|
|
62453
62748
|
}
|
|
62454
62749
|
}),
|
|
62455
|
-
show:
|
|
62750
|
+
show: defineCommand214({
|
|
62456
62751
|
meta: {
|
|
62457
62752
|
name: "show",
|
|
62458
62753
|
description: "Print the full staged payload for one change \u2014 the receipt to verify it looks right before publish (never truncated)."
|
|
@@ -62469,7 +62764,7 @@ var draftCommand5 = defineCommand213({
|
|
|
62469
62764
|
);
|
|
62470
62765
|
}
|
|
62471
62766
|
}),
|
|
62472
|
-
amend:
|
|
62767
|
+
amend: defineCommand214({
|
|
62473
62768
|
meta: {
|
|
62474
62769
|
name: "amend",
|
|
62475
62770
|
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."
|
|
@@ -62486,7 +62781,7 @@ var draftCommand5 = defineCommand213({
|
|
|
62486
62781
|
});
|
|
62487
62782
|
}
|
|
62488
62783
|
}),
|
|
62489
|
-
remove:
|
|
62784
|
+
remove: defineCommand214({
|
|
62490
62785
|
meta: { name: "remove", description: "Remove one staged change (cascades to anything depending on it)" },
|
|
62491
62786
|
args: { ref: { type: "positional", description: "Staged ref (gtm_temp_*) or target", required: false } },
|
|
62492
62787
|
run: async ({ args: args4 }) => {
|
|
@@ -62495,7 +62790,7 @@ var draftCommand5 = defineCommand213({
|
|
|
62495
62790
|
});
|
|
62496
62791
|
}
|
|
62497
62792
|
}),
|
|
62498
|
-
clear:
|
|
62793
|
+
clear: defineCommand214({
|
|
62499
62794
|
meta: { name: "clear", description: "Discard all Tag Manager changes staged on this chat" },
|
|
62500
62795
|
run: async () => {
|
|
62501
62796
|
await draftAction3("/api/tag-manager/draft/clear", {});
|
|
@@ -62505,7 +62800,7 @@ var draftCommand5 = defineCommand213({
|
|
|
62505
62800
|
});
|
|
62506
62801
|
|
|
62507
62802
|
// src/commands/tag-manager/read.ts
|
|
62508
|
-
import { defineCommand as
|
|
62803
|
+
import { defineCommand as defineCommand215 } from "citty";
|
|
62509
62804
|
registerSchema({
|
|
62510
62805
|
command: "tagManager.containers",
|
|
62511
62806
|
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.",
|
|
@@ -62546,7 +62841,7 @@ function containersHints(containers) {
|
|
|
62546
62841
|
}))
|
|
62547
62842
|
});
|
|
62548
62843
|
}
|
|
62549
|
-
var containersCommand =
|
|
62844
|
+
var containersCommand = defineCommand215({
|
|
62550
62845
|
meta: {
|
|
62551
62846
|
name: "containers",
|
|
62552
62847
|
description: `List Tag Manager containers reachable by this company's connection.
|
|
@@ -62563,7 +62858,7 @@ Start here:
|
|
|
62563
62858
|
}
|
|
62564
62859
|
}
|
|
62565
62860
|
});
|
|
62566
|
-
var readCommand =
|
|
62861
|
+
var readCommand = defineCommand215({
|
|
62567
62862
|
meta: {
|
|
62568
62863
|
name: "read",
|
|
62569
62864
|
description: `Read the current contents of the Tag Manager container \u2014 always do this before staging changes.
|
|
@@ -62605,7 +62900,7 @@ Examples:
|
|
|
62605
62900
|
});
|
|
62606
62901
|
|
|
62607
62902
|
// src/commands/tag-manager/write-commands.ts
|
|
62608
|
-
import { defineCommand as
|
|
62903
|
+
import { defineCommand as defineCommand216 } from "citty";
|
|
62609
62904
|
var CONTAINER_ARG_DESCRIPTION = "Numeric container id (optional only when one container is connected \u2014 run `baker tag-manager containers`)";
|
|
62610
62905
|
var ENTITIES = [
|
|
62611
62906
|
{
|
|
@@ -62661,10 +62956,10 @@ for (const { entity, noun, createHint } of ENTITIES) {
|
|
|
62661
62956
|
});
|
|
62662
62957
|
}
|
|
62663
62958
|
function entityCommand(entity, noun, example) {
|
|
62664
|
-
return
|
|
62959
|
+
return defineCommand216({
|
|
62665
62960
|
meta: { name: entity, description: `Stage ${noun} changes on this chat's Tag Manager draft` },
|
|
62666
62961
|
subCommands: {
|
|
62667
|
-
create:
|
|
62962
|
+
create: defineCommand216({
|
|
62668
62963
|
meta: {
|
|
62669
62964
|
name: "create",
|
|
62670
62965
|
description: `Stage a new ${noun}
|
|
@@ -62686,7 +62981,7 @@ Examples:
|
|
|
62686
62981
|
});
|
|
62687
62982
|
}
|
|
62688
62983
|
}),
|
|
62689
|
-
update:
|
|
62984
|
+
update: defineCommand216({
|
|
62690
62985
|
meta: {
|
|
62691
62986
|
name: "update",
|
|
62692
62987
|
description: `Stage an update to an existing ${noun} (pass its id or path)`
|
|
@@ -62706,7 +63001,7 @@ Examples:
|
|
|
62706
63001
|
});
|
|
62707
63002
|
}
|
|
62708
63003
|
}),
|
|
62709
|
-
delete:
|
|
63004
|
+
delete: defineCommand216({
|
|
62710
63005
|
meta: { name: "delete", description: `Stage the deletion of a ${noun} (pass its id or path)` },
|
|
62711
63006
|
args: {
|
|
62712
63007
|
id: { type: "positional", description: `${noun} id or path`, required: false },
|
|
@@ -62747,7 +63042,7 @@ function builtinTypes(args4) {
|
|
|
62747
63042
|
}
|
|
62748
63043
|
return raw.split(",").map((entry) => entry.trim());
|
|
62749
63044
|
}
|
|
62750
|
-
var builtinCommand =
|
|
63045
|
+
var builtinCommand = defineCommand216({
|
|
62751
63046
|
meta: {
|
|
62752
63047
|
name: "builtin",
|
|
62753
63048
|
description: `Enable or disable built-in variables
|
|
@@ -62757,7 +63052,7 @@ Examples:
|
|
|
62757
63052
|
baker tag-manager builtin disable --types formId`
|
|
62758
63053
|
},
|
|
62759
63054
|
subCommands: {
|
|
62760
|
-
enable:
|
|
63055
|
+
enable: defineCommand216({
|
|
62761
63056
|
meta: { name: "enable", description: "Stage enabling built-in variables" },
|
|
62762
63057
|
args: {
|
|
62763
63058
|
types: { type: "string", description: "Comma-separated types", required: false },
|
|
@@ -62771,7 +63066,7 @@ Examples:
|
|
|
62771
63066
|
});
|
|
62772
63067
|
}
|
|
62773
63068
|
}),
|
|
62774
|
-
disable:
|
|
63069
|
+
disable: defineCommand216({
|
|
62775
63070
|
meta: { name: "disable", description: "Stage disabling built-in variables" },
|
|
62776
63071
|
args: {
|
|
62777
63072
|
types: { type: "string", description: "Comma-separated types", required: false },
|
|
@@ -62789,7 +63084,7 @@ Examples:
|
|
|
62789
63084
|
});
|
|
62790
63085
|
|
|
62791
63086
|
// src/commands/tag-manager/index.ts
|
|
62792
|
-
var tagManagerCommand =
|
|
63087
|
+
var tagManagerCommand = defineCommand217({
|
|
62793
63088
|
meta: {
|
|
62794
63089
|
name: "tag-manager",
|
|
62795
63090
|
description: `Read and change what lives inside the client's Google Tag Manager container \u2014 tags, triggers, variables, folders and built-in variables.
|
|
@@ -62826,7 +63121,7 @@ Full guide: __tooling__/docs/tools/baker/tag-manager.md`
|
|
|
62826
63121
|
});
|
|
62827
63122
|
|
|
62828
63123
|
// src/commands/tags/index.ts
|
|
62829
|
-
import { defineCommand as
|
|
63124
|
+
import { defineCommand as defineCommand218 } from "citty";
|
|
62830
63125
|
|
|
62831
63126
|
// src/commands/tags/shared.ts
|
|
62832
63127
|
function failApi3(err) {
|
|
@@ -62903,15 +63198,15 @@ async function listTags(json) {
|
|
|
62903
63198
|
failApi3(err);
|
|
62904
63199
|
}
|
|
62905
63200
|
}
|
|
62906
|
-
var
|
|
63201
|
+
var listArgs11 = {
|
|
62907
63202
|
json: { type: "boolean", description: "Print the raw JSON envelope instead of the readable list" }
|
|
62908
63203
|
};
|
|
62909
|
-
var
|
|
63204
|
+
var listCommand19 = defineCommand218({
|
|
62910
63205
|
meta: {
|
|
62911
63206
|
name: "list",
|
|
62912
63207
|
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"
|
|
62913
63208
|
},
|
|
62914
|
-
args:
|
|
63209
|
+
args: listArgs11,
|
|
62915
63210
|
run: async ({ args: args4 }) => {
|
|
62916
63211
|
await listTags(args4.json === true);
|
|
62917
63212
|
}
|
|
@@ -62925,7 +63220,7 @@ async function listDraft4(chat) {
|
|
|
62925
63220
|
failApi3(err);
|
|
62926
63221
|
}
|
|
62927
63222
|
}
|
|
62928
|
-
var draftCommand6 =
|
|
63223
|
+
var draftCommand6 = defineCommand218({
|
|
62929
63224
|
meta: {
|
|
62930
63225
|
name: "draft",
|
|
62931
63226
|
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."
|
|
@@ -62935,7 +63230,7 @@ var draftCommand6 = defineCommand217({
|
|
|
62935
63230
|
await listDraft4(args4.chat);
|
|
62936
63231
|
}
|
|
62937
63232
|
});
|
|
62938
|
-
var tagsCommand4 =
|
|
63233
|
+
var tagsCommand4 = defineCommand218({
|
|
62939
63234
|
meta: {
|
|
62940
63235
|
name: "tags",
|
|
62941
63236
|
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.
|
|
@@ -62952,22 +63247,22 @@ Examples:
|
|
|
62952
63247
|
Full guide: __tooling__/docs/tools/baker/tags.md`
|
|
62953
63248
|
},
|
|
62954
63249
|
subCommands: {
|
|
62955
|
-
list:
|
|
63250
|
+
list: listCommand19,
|
|
62956
63251
|
draft: draftCommand6
|
|
62957
63252
|
},
|
|
62958
63253
|
// Bare `baker tags` lists the effective tags. `args` stays so citty knows this
|
|
62959
63254
|
// command's flags when it scans rawArgs for a subcommand name, and `default` (not
|
|
62960
63255
|
// `run`) dispatches the bare invocation — citty falls through to `run` after a
|
|
62961
63256
|
// subcommand, so a `run` here would also list on every `baker tags draft`.
|
|
62962
|
-
args:
|
|
63257
|
+
args: listArgs11,
|
|
62963
63258
|
default: "list"
|
|
62964
63259
|
});
|
|
62965
63260
|
|
|
62966
63261
|
// src/commands/testimonials/index.ts
|
|
62967
|
-
import { defineCommand as
|
|
63262
|
+
import { defineCommand as defineCommand222 } from "citty";
|
|
62968
63263
|
|
|
62969
63264
|
// src/commands/testimonials/get.ts
|
|
62970
|
-
import { defineCommand as
|
|
63265
|
+
import { defineCommand as defineCommand219 } from "citty";
|
|
62971
63266
|
registerSchema({
|
|
62972
63267
|
command: "testimonials.get",
|
|
62973
63268
|
description: "Get a single testimonial by ID",
|
|
@@ -62975,7 +63270,7 @@ registerSchema({
|
|
|
62975
63270
|
id: { type: "string", description: "Testimonial ID", required: true }
|
|
62976
63271
|
}
|
|
62977
63272
|
});
|
|
62978
|
-
var getCommand6 =
|
|
63273
|
+
var getCommand6 = defineCommand219({
|
|
62979
63274
|
meta: { name: "get", description: "Get a single testimonial by ID. Example: baker testimonials get j571abc123" },
|
|
62980
63275
|
args: {
|
|
62981
63276
|
id: { type: "positional", description: "Testimonial ID", required: false },
|
|
@@ -63012,7 +63307,7 @@ var getCommand6 = defineCommand218({
|
|
|
63012
63307
|
});
|
|
63013
63308
|
|
|
63014
63309
|
// src/commands/testimonials/list.ts
|
|
63015
|
-
import { defineCommand as
|
|
63310
|
+
import { defineCommand as defineCommand220 } from "citty";
|
|
63016
63311
|
|
|
63017
63312
|
// src/commands/testimonials/emptyCorpusHints.ts
|
|
63018
63313
|
function resolveEmptyReason({
|
|
@@ -63169,7 +63464,7 @@ function buildListParams(args4) {
|
|
|
63169
63464
|
}
|
|
63170
63465
|
return params;
|
|
63171
63466
|
}
|
|
63172
|
-
var
|
|
63467
|
+
var listCommand20 = defineCommand220({
|
|
63173
63468
|
meta: {
|
|
63174
63469
|
name: "list",
|
|
63175
63470
|
description: "List testimonials with optional filters. Example: baker testimonials list --source google --sentiment positive"
|
|
@@ -63229,7 +63524,7 @@ var listCommand19 = defineCommand219({
|
|
|
63229
63524
|
});
|
|
63230
63525
|
|
|
63231
63526
|
// src/commands/testimonials/search.ts
|
|
63232
|
-
import { defineCommand as
|
|
63527
|
+
import { defineCommand as defineCommand221 } from "citty";
|
|
63233
63528
|
var FILTER_FLAGS2 = ["source", "rating-min", "rating-max", "status", "sentiment", "language", "tags"];
|
|
63234
63529
|
function languageBiasHint(results, requestedLanguage) {
|
|
63235
63530
|
if (requestedLanguage) {
|
|
@@ -63308,7 +63603,7 @@ function buildSearchRequest(query, args4) {
|
|
|
63308
63603
|
}
|
|
63309
63604
|
return body;
|
|
63310
63605
|
}
|
|
63311
|
-
var searchCommand3 =
|
|
63606
|
+
var searchCommand3 = defineCommand221({
|
|
63312
63607
|
meta: {
|
|
63313
63608
|
name: "search",
|
|
63314
63609
|
description: "Semantic search testimonials by text query. Uses hybrid BM25 + vector + reranking. Example: baker testimonials search 'great service' --rating-min 4"
|
|
@@ -63372,7 +63667,7 @@ var searchCommand3 = defineCommand220({
|
|
|
63372
63667
|
var tagsCommand5 = makeTagsCommand("testimonials", "testimonial", "/api/testimonials/tags");
|
|
63373
63668
|
|
|
63374
63669
|
// src/commands/testimonials/index.ts
|
|
63375
|
-
var testimonialsCommand =
|
|
63670
|
+
var testimonialsCommand = defineCommand222({
|
|
63376
63671
|
meta: {
|
|
63377
63672
|
name: "testimonials",
|
|
63378
63673
|
description: `Find and browse testimonials in Baker. Subcommands: search, get, list, tags.
|
|
@@ -63388,16 +63683,16 @@ Full guide: __tooling__/docs/tools/baker/testimonials.md`
|
|
|
63388
63683
|
subCommands: {
|
|
63389
63684
|
get: getCommand6,
|
|
63390
63685
|
search: searchCommand3,
|
|
63391
|
-
list:
|
|
63686
|
+
list: listCommand20,
|
|
63392
63687
|
tags: tagsCommand5
|
|
63393
63688
|
}
|
|
63394
63689
|
});
|
|
63395
63690
|
|
|
63396
63691
|
// src/commands/videos/index.ts
|
|
63397
|
-
import { defineCommand as
|
|
63692
|
+
import { defineCommand as defineCommand230 } from "citty";
|
|
63398
63693
|
|
|
63399
63694
|
// src/commands/videos/delete.ts
|
|
63400
|
-
import { defineCommand as
|
|
63695
|
+
import { defineCommand as defineCommand223 } from "citty";
|
|
63401
63696
|
registerSchema({
|
|
63402
63697
|
command: "videos.delete",
|
|
63403
63698
|
description: "Delete a video by ID",
|
|
@@ -63411,7 +63706,7 @@ registerSchema({
|
|
|
63411
63706
|
}
|
|
63412
63707
|
}
|
|
63413
63708
|
});
|
|
63414
|
-
var deleteCommand4 =
|
|
63709
|
+
var deleteCommand4 = defineCommand223({
|
|
63415
63710
|
meta: {
|
|
63416
63711
|
name: "delete",
|
|
63417
63712
|
description: "Delete a video by ID. Use --dry-run to preview. Example: baker videos delete j571abc123 --dry-run"
|
|
@@ -63452,7 +63747,7 @@ var deleteCommand4 = defineCommand222({
|
|
|
63452
63747
|
});
|
|
63453
63748
|
|
|
63454
63749
|
// src/commands/videos/describe.ts
|
|
63455
|
-
import { defineCommand as
|
|
63750
|
+
import { defineCommand as defineCommand224 } from "citty";
|
|
63456
63751
|
var DESCRIPTION_HELP2 = "What the clip actually shows, in the words someone would search for it by. This is what `baker videos search` retrieves on.";
|
|
63457
63752
|
registerSchema({
|
|
63458
63753
|
command: "videos.describe",
|
|
@@ -63469,7 +63764,7 @@ registerSchema({
|
|
|
63469
63764
|
full: { type: "boolean", description: "Return the whole library row, not just what changed", required: false }
|
|
63470
63765
|
}
|
|
63471
63766
|
});
|
|
63472
|
-
var describeCommand2 =
|
|
63767
|
+
var describeCommand2 = defineCommand224({
|
|
63473
63768
|
meta: {
|
|
63474
63769
|
name: "describe",
|
|
63475
63770
|
description: `Correct what the library says a video is. Only the fields you pass change; the rest keep their current values.
|
|
@@ -63527,7 +63822,7 @@ Example: baker videos describe j571abc123 --description "Customer explaining how
|
|
|
63527
63822
|
});
|
|
63528
63823
|
|
|
63529
63824
|
// src/commands/videos/get.ts
|
|
63530
|
-
import { defineCommand as
|
|
63825
|
+
import { defineCommand as defineCommand225 } from "citty";
|
|
63531
63826
|
registerSchema({
|
|
63532
63827
|
command: "videos.get",
|
|
63533
63828
|
description: "Get a single video by ID",
|
|
@@ -63535,7 +63830,7 @@ registerSchema({
|
|
|
63535
63830
|
id: { type: "string", description: "Video ID", required: true }
|
|
63536
63831
|
}
|
|
63537
63832
|
});
|
|
63538
|
-
var getCommand7 =
|
|
63833
|
+
var getCommand7 = defineCommand225({
|
|
63539
63834
|
meta: { name: "get", description: "Get a single video by ID. Example: baker videos get j571abc123" },
|
|
63540
63835
|
args: {
|
|
63541
63836
|
id: { type: "positional", description: "Video ID", required: false },
|
|
@@ -63572,7 +63867,7 @@ var getCommand7 = defineCommand224({
|
|
|
63572
63867
|
});
|
|
63573
63868
|
|
|
63574
63869
|
// src/commands/videos/group.ts
|
|
63575
|
-
import { defineCommand as
|
|
63870
|
+
import { defineCommand as defineCommand226 } from "citty";
|
|
63576
63871
|
registerSchema({
|
|
63577
63872
|
command: "videos.group",
|
|
63578
63873
|
description: "List every clip and image that arrived in the same set as this video (carousel slides, one page)",
|
|
@@ -63581,7 +63876,7 @@ registerSchema({
|
|
|
63581
63876
|
"group-key": { type: "string", description: "The set key directly, when you already have it", required: false }
|
|
63582
63877
|
}
|
|
63583
63878
|
});
|
|
63584
|
-
var groupCommand2 =
|
|
63879
|
+
var groupCommand2 = defineCommand226({
|
|
63585
63880
|
meta: {
|
|
63586
63881
|
name: "group",
|
|
63587
63882
|
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>"
|
|
@@ -63604,7 +63899,7 @@ var groupCommand2 = defineCommand225({
|
|
|
63604
63899
|
import { mkdtemp as mkdtemp3, rm as rm9, stat as stat11 } from "fs/promises";
|
|
63605
63900
|
import { tmpdir as tmpdir4 } from "os";
|
|
63606
63901
|
import path47 from "path";
|
|
63607
|
-
import { defineCommand as
|
|
63902
|
+
import { defineCommand as defineCommand227 } from "citty";
|
|
63608
63903
|
|
|
63609
63904
|
// src/lib/streamUpload.ts
|
|
63610
63905
|
import { createHash as createHash2 } from "crypto";
|
|
@@ -63768,7 +64063,7 @@ registerSchema({
|
|
|
63768
64063
|
"dry-run": { type: "boolean", description: "Preview the operation without executing", required: false }
|
|
63769
64064
|
}
|
|
63770
64065
|
});
|
|
63771
|
-
var ingestCommand2 =
|
|
64066
|
+
var ingestCommand2 = defineCommand227({
|
|
63772
64067
|
meta: {
|
|
63773
64068
|
name: "ingest",
|
|
63774
64069
|
description: "Add a video to the library from a URL. A direct file URL is handed straight to Baker, which fetches it. A page URL (YouTube, TikTok, Vimeo, Instagram) is downloaded here first, then uploaded \u2014 and a direct URL that Baker cannot fetch falls back to that same path automatically.\n\nExample: baker videos ingest https://www.youtube.com/watch?v=abc123"
|
|
@@ -64030,7 +64325,7 @@ async function uploadToAssetStore(filePath, sizeBytes) {
|
|
|
64030
64325
|
}
|
|
64031
64326
|
|
|
64032
64327
|
// src/commands/videos/search.ts
|
|
64033
|
-
import { defineCommand as
|
|
64328
|
+
import { defineCommand as defineCommand228 } from "citty";
|
|
64034
64329
|
registerSchema({
|
|
64035
64330
|
command: "videos.search",
|
|
64036
64331
|
description: "Search videos by text query. Only returns ready videos.",
|
|
@@ -64040,7 +64335,7 @@ registerSchema({
|
|
|
64040
64335
|
tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
|
|
64041
64336
|
}
|
|
64042
64337
|
});
|
|
64043
|
-
var searchCommand4 =
|
|
64338
|
+
var searchCommand4 = defineCommand228({
|
|
64044
64339
|
meta: {
|
|
64045
64340
|
name: "search",
|
|
64046
64341
|
description: "Semantic search videos by text query. Uses hybrid BM25 + vector + reranking. Example: baker videos search 'product demo' --tags tutorial"
|
|
@@ -64092,7 +64387,7 @@ var tagsCommand6 = makeTagsCommand("videos", "video", "/api/videos/tags");
|
|
|
64092
64387
|
// src/commands/videos/upload.ts
|
|
64093
64388
|
import { readFile as readFile33, stat as stat12 } from "fs/promises";
|
|
64094
64389
|
import { basename as basename3, extname as extname4 } from "path";
|
|
64095
|
-
import { defineCommand as
|
|
64390
|
+
import { defineCommand as defineCommand229 } from "citty";
|
|
64096
64391
|
var MIME_MAP = {
|
|
64097
64392
|
".mp4": "video/mp4",
|
|
64098
64393
|
".mov": "video/quicktime",
|
|
@@ -64134,7 +64429,7 @@ function detectContentType(filePath) {
|
|
|
64134
64429
|
function isRemoteUrl3(value) {
|
|
64135
64430
|
return /^https?:\/\//i.test(value);
|
|
64136
64431
|
}
|
|
64137
|
-
var uploadCommand2 =
|
|
64432
|
+
var uploadCommand2 = defineCommand229({
|
|
64138
64433
|
meta: {
|
|
64139
64434
|
name: "upload",
|
|
64140
64435
|
description: "Upload a video to Baker \u2014 accepts a local file path OR a remote http(s) URL.\n\nLocal: auto-detects content type and uploads via Mux direct upload.\nRemote: hands off to `videos ingest` (direct fetch, or download-then-upload for a YouTube/TikTok/Vimeo page).\n\nExamples:\n baker videos upload ./demo.mp4\n baker videos upload https://www.youtube.com/watch?v=abc123"
|
|
@@ -64218,7 +64513,7 @@ var uploadCommand2 = defineCommand228({
|
|
|
64218
64513
|
});
|
|
64219
64514
|
|
|
64220
64515
|
// src/commands/videos/index.ts
|
|
64221
|
-
var videosCommand =
|
|
64516
|
+
var videosCommand = defineCommand230({
|
|
64222
64517
|
meta: {
|
|
64223
64518
|
name: "videos",
|
|
64224
64519
|
description: `Find and manage videos in Baker. Subcommands: search, get, upload, ingest, describe, delete, tags.
|
|
@@ -64247,10 +64542,10 @@ Full guide: __tooling__/docs/tools/baker/videos.md`
|
|
|
64247
64542
|
});
|
|
64248
64543
|
|
|
64249
64544
|
// src/commands/winning-ads/index.ts
|
|
64250
|
-
import { defineCommand as
|
|
64545
|
+
import { defineCommand as defineCommand243 } from "citty";
|
|
64251
64546
|
|
|
64252
64547
|
// src/commands/winning-ads/advertisers.ts
|
|
64253
|
-
import { defineCommand as
|
|
64548
|
+
import { defineCommand as defineCommand231 } from "citty";
|
|
64254
64549
|
|
|
64255
64550
|
// src/commands/winning-ads/shared.ts
|
|
64256
64551
|
function splitList2(value) {
|
|
@@ -64303,7 +64598,7 @@ function advertiserNormalizer(record, full) {
|
|
|
64303
64598
|
last_synced_at: record.last_synced_at ?? null
|
|
64304
64599
|
};
|
|
64305
64600
|
}
|
|
64306
|
-
var advertisersCommand2 =
|
|
64601
|
+
var advertisersCommand2 = defineCommand231({
|
|
64307
64602
|
meta: {
|
|
64308
64603
|
name: "advertisers",
|
|
64309
64604
|
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'
|
|
@@ -64361,7 +64656,7 @@ var advertisersCommand2 = defineCommand230({
|
|
|
64361
64656
|
});
|
|
64362
64657
|
|
|
64363
64658
|
// src/commands/winning-ads/brief.ts
|
|
64364
|
-
import { defineCommand as
|
|
64659
|
+
import { defineCommand as defineCommand232 } from "citty";
|
|
64365
64660
|
registerSchema({
|
|
64366
64661
|
command: "winning-ads.brief",
|
|
64367
64662
|
description: "Generate a creative brief grounded in strategically-similar winning ads. Optionally describe the target creative with --dna (JSON) and steer with --notes.",
|
|
@@ -64407,7 +64702,7 @@ function parseDna(raw) {
|
|
|
64407
64702
|
}
|
|
64408
64703
|
return parsed;
|
|
64409
64704
|
}
|
|
64410
|
-
var briefCommand =
|
|
64705
|
+
var briefCommand = defineCommand232({
|
|
64411
64706
|
meta: {
|
|
64412
64707
|
name: "brief",
|
|
64413
64708
|
description: `Generate a creative brief from winning references. Example: baker winning-ads brief --dna '{"angle":"cost savings"}' --notes "B2B, LinkedIn video" --k 8`
|
|
@@ -64443,7 +64738,7 @@ var briefCommand = defineCommand231({
|
|
|
64443
64738
|
});
|
|
64444
64739
|
|
|
64445
64740
|
// src/commands/winning-ads/content.ts
|
|
64446
|
-
import { defineCommand as
|
|
64741
|
+
import { defineCommand as defineCommand233 } from "citty";
|
|
64447
64742
|
registerSchema({
|
|
64448
64743
|
command: "winning-ads.content",
|
|
64449
64744
|
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.",
|
|
@@ -64456,7 +64751,7 @@ registerSchema({
|
|
|
64456
64751
|
}
|
|
64457
64752
|
}
|
|
64458
64753
|
});
|
|
64459
|
-
var contentCommand =
|
|
64754
|
+
var contentCommand = defineCommand233({
|
|
64460
64755
|
meta: {
|
|
64461
64756
|
name: "content",
|
|
64462
64757
|
description: "Read the transcript + on-screen text + copy of one winning ad. Example: baker winning-ads content adg_123 --platform meta --full --output md"
|
|
@@ -64505,7 +64800,7 @@ var contentCommand = defineCommand232({
|
|
|
64505
64800
|
});
|
|
64506
64801
|
|
|
64507
64802
|
// src/commands/winning-ads/feed.ts
|
|
64508
|
-
import { defineCommand as
|
|
64803
|
+
import { defineCommand as defineCommand234 } from "citty";
|
|
64509
64804
|
function buildFeedParams(input) {
|
|
64510
64805
|
const params = {};
|
|
64511
64806
|
const advertiser = splitList2(input.advertiser);
|
|
@@ -64557,7 +64852,7 @@ registerSchema({
|
|
|
64557
64852
|
format: { type: "string", description: "Comma-separated formats to include (e.g. static,video)", required: false }
|
|
64558
64853
|
}
|
|
64559
64854
|
});
|
|
64560
|
-
var feedCommand2 =
|
|
64855
|
+
var feedCommand2 = defineCommand234({
|
|
64561
64856
|
meta: {
|
|
64562
64857
|
name: "feed",
|
|
64563
64858
|
description: "Winners across every brand you follow (browse, then trim per advertiser). Example: baker winning-ads feed --per-advertiser 5 --output md"
|
|
@@ -64642,7 +64937,7 @@ var feedCommand2 = defineCommand233({
|
|
|
64642
64937
|
});
|
|
64643
64938
|
|
|
64644
64939
|
// src/commands/winning-ads/follow.ts
|
|
64645
|
-
import { defineCommand as
|
|
64940
|
+
import { defineCommand as defineCommand235 } from "citty";
|
|
64646
64941
|
var PLATFORMS = adLibraryPlatformSchema.options;
|
|
64647
64942
|
registerSchema({
|
|
64648
64943
|
command: "winning-ads.follow",
|
|
@@ -64657,7 +64952,7 @@ registerSchema({
|
|
|
64657
64952
|
label: { type: "string", description: "Optional display label (defaults to the resolved name)", required: false }
|
|
64658
64953
|
}
|
|
64659
64954
|
});
|
|
64660
|
-
var followCommand =
|
|
64955
|
+
var followCommand = defineCommand235({
|
|
64661
64956
|
meta: {
|
|
64662
64957
|
name: "follow",
|
|
64663
64958
|
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 every platform we can resolve. Example: baker winning-ads follow "deel.com" --platform meta'
|
|
@@ -64704,7 +64999,7 @@ var followCommand = defineCommand234({
|
|
|
64704
64999
|
});
|
|
64705
65000
|
|
|
64706
65001
|
// src/commands/winning-ads/follow-competitors.ts
|
|
64707
|
-
import { defineCommand as
|
|
65002
|
+
import { defineCommand as defineCommand236 } from "citty";
|
|
64708
65003
|
var PLATFORMS2 = adLibraryPlatformSchema.options;
|
|
64709
65004
|
var BATCH_TIMEOUT_MS = 3e5;
|
|
64710
65005
|
function buildFollowBatchBody(input) {
|
|
@@ -64737,7 +65032,7 @@ registerSchema({
|
|
|
64737
65032
|
}
|
|
64738
65033
|
}
|
|
64739
65034
|
});
|
|
64740
|
-
var followCompetitorsCommand =
|
|
65035
|
+
var followCompetitorsCommand = defineCommand236({
|
|
64741
65036
|
meta: {
|
|
64742
65037
|
name: "follow-competitors",
|
|
64743
65038
|
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"'
|
|
@@ -64812,7 +65107,7 @@ var followCompetitorsCommand = defineCommand235({
|
|
|
64812
65107
|
});
|
|
64813
65108
|
|
|
64814
65109
|
// src/commands/winning-ads/following.ts
|
|
64815
|
-
import { defineCommand as
|
|
65110
|
+
import { defineCommand as defineCommand237 } from "citty";
|
|
64816
65111
|
registerSchema({
|
|
64817
65112
|
command: "winning-ads.following",
|
|
64818
65113
|
description: "List the brands you follow in your ad-dna library, with each one's status (ready vs still adding) and cached ad counts. A brand still adding has counts that are a lie in progress; one with `discovery_failed` has counts that are short because we couldn't finish looking, which is not the same as it running no ads.",
|
|
@@ -64866,7 +65161,7 @@ function followingNormalizer(record, full) {
|
|
|
64866
65161
|
platforms: Array.isArray(record.platforms) ? record.platforms : []
|
|
64867
65162
|
};
|
|
64868
65163
|
}
|
|
64869
|
-
var followingCommand =
|
|
65164
|
+
var followingCommand = defineCommand237({
|
|
64870
65165
|
meta: {
|
|
64871
65166
|
name: "following",
|
|
64872
65167
|
description: "List brands you follow, with status (ready / adding\u2026) and cached counts. A brand's counts are only final once it is ready. Example: baker winning-ads following --output md"
|
|
@@ -64902,7 +65197,7 @@ var followingCommand = defineCommand236({
|
|
|
64902
65197
|
});
|
|
64903
65198
|
|
|
64904
65199
|
// src/commands/winning-ads/patterns.ts
|
|
64905
|
-
import { defineCommand as
|
|
65200
|
+
import { defineCommand as defineCommand238 } from "citty";
|
|
64906
65201
|
registerSchema({
|
|
64907
65202
|
command: "winning-ads.patterns",
|
|
64908
65203
|
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.",
|
|
@@ -64941,7 +65236,7 @@ function discriminatorRow(record) {
|
|
|
64941
65236
|
top_values_duds: Array.isArray(record.top_values_b) ? record.top_values_b.join(", ") : ""
|
|
64942
65237
|
};
|
|
64943
65238
|
}
|
|
64944
|
-
var patternsCommand =
|
|
65239
|
+
var patternsCommand = defineCommand238({
|
|
64945
65240
|
meta: {
|
|
64946
65241
|
name: "patterns",
|
|
64947
65242
|
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"
|
|
@@ -64997,7 +65292,7 @@ var patternsCommand = defineCommand237({
|
|
|
64997
65292
|
});
|
|
64998
65293
|
|
|
64999
65294
|
// src/commands/winning-ads/search.ts
|
|
65000
|
-
import { defineCommand as
|
|
65295
|
+
import { defineCommand as defineCommand239 } from "citty";
|
|
65001
65296
|
registerSchema({
|
|
65002
65297
|
command: "winning-ads.search",
|
|
65003
65298
|
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.",
|
|
@@ -65105,7 +65400,7 @@ function buildSearchBody2(args4) {
|
|
|
65105
65400
|
}
|
|
65106
65401
|
return body;
|
|
65107
65402
|
}
|
|
65108
|
-
var searchCommand5 =
|
|
65403
|
+
var searchCommand5 = defineCommand239({
|
|
65109
65404
|
meta: {
|
|
65110
65405
|
name: "search",
|
|
65111
65406
|
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"
|
|
@@ -65220,7 +65515,7 @@ var searchCommand5 = defineCommand238({
|
|
|
65220
65515
|
});
|
|
65221
65516
|
|
|
65222
65517
|
// src/commands/winning-ads/seeds.ts
|
|
65223
|
-
import { defineCommand as
|
|
65518
|
+
import { defineCommand as defineCommand240 } from "citty";
|
|
65224
65519
|
function leanRow(r) {
|
|
65225
65520
|
return {
|
|
65226
65521
|
key: r.key,
|
|
@@ -65248,7 +65543,7 @@ function makeSeedCommand(opts) {
|
|
|
65248
65543
|
limit: { type: "number", description: "Max keys 1-100 (default 20)", required: false, default: 20 }
|
|
65249
65544
|
}
|
|
65250
65545
|
});
|
|
65251
|
-
return
|
|
65546
|
+
return defineCommand240({
|
|
65252
65547
|
meta: { name: opts.name, description: opts.description },
|
|
65253
65548
|
args: {
|
|
65254
65549
|
platform: { type: "string", description: "Single platform to segment on", required: false },
|
|
@@ -65297,7 +65592,7 @@ var formatsCommand = makeSeedCommand({
|
|
|
65297
65592
|
});
|
|
65298
65593
|
|
|
65299
65594
|
// src/commands/winning-ads/unfollow.ts
|
|
65300
|
-
import { defineCommand as
|
|
65595
|
+
import { defineCommand as defineCommand241 } from "citty";
|
|
65301
65596
|
registerSchema({
|
|
65302
65597
|
command: "winning-ads.unfollow",
|
|
65303
65598
|
description: "Stop following a brand \u2014 removes it from your ad-dna library by advertiser id.",
|
|
@@ -65305,7 +65600,7 @@ registerSchema({
|
|
|
65305
65600
|
advertiser: { type: "string", description: "Advertiser id to unfollow", required: true }
|
|
65306
65601
|
}
|
|
65307
65602
|
});
|
|
65308
|
-
var unfollowCommand =
|
|
65603
|
+
var unfollowCommand = defineCommand241({
|
|
65309
65604
|
meta: {
|
|
65310
65605
|
name: "unfollow",
|
|
65311
65606
|
description: "Stop following a brand by advertiser id. Example: baker winning-ads unfollow adv_123"
|
|
@@ -65326,7 +65621,7 @@ var unfollowCommand = defineCommand240({
|
|
|
65326
65621
|
});
|
|
65327
65622
|
|
|
65328
65623
|
// src/commands/winning-ads/winners.ts
|
|
65329
|
-
import { defineCommand as
|
|
65624
|
+
import { defineCommand as defineCommand242 } from "citty";
|
|
65330
65625
|
registerSchema({
|
|
65331
65626
|
command: "winning-ads.winners",
|
|
65332
65627
|
description: "Top winning ads for one advertiser id (from `advertisers` or `following`). Returns lean winner cards; add --full for DNA + longevity.",
|
|
@@ -65336,7 +65631,7 @@ registerSchema({
|
|
|
65336
65631
|
platform: { type: "string", description: "Filter to a single platform: meta|linkedin|tiktok", required: false }
|
|
65337
65632
|
}
|
|
65338
65633
|
});
|
|
65339
|
-
var winnersCommand =
|
|
65634
|
+
var winnersCommand = defineCommand242({
|
|
65340
65635
|
meta: {
|
|
65341
65636
|
name: "winners",
|
|
65342
65637
|
description: "Top winning ads for a specific advertiser id. Example: baker winning-ads winners adv_123 --top 15 --output md"
|
|
@@ -65386,7 +65681,7 @@ var winnersCommand = defineCommand241({
|
|
|
65386
65681
|
});
|
|
65387
65682
|
|
|
65388
65683
|
// src/commands/winning-ads/index.ts
|
|
65389
|
-
var winningAdsCommand =
|
|
65684
|
+
var winningAdsCommand = defineCommand243({
|
|
65390
65685
|
meta: {
|
|
65391
65686
|
name: "winning-ads",
|
|
65392
65687
|
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.
|
|
@@ -65624,7 +65919,7 @@ function getCliVersion() {
|
|
|
65624
65919
|
}
|
|
65625
65920
|
|
|
65626
65921
|
// src/cli.ts
|
|
65627
|
-
var main =
|
|
65922
|
+
var main = defineCommand244({
|
|
65628
65923
|
meta: {
|
|
65629
65924
|
name: "baker",
|
|
65630
65925
|
version: getCliVersion(),
|