@koda-sl/baker-cli 0.414.0 → 0.415.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 +11 -1
- package/dist/cli.js +1002 -372
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -21715,7 +21715,7 @@ var require_entry_node = __commonJS({
|
|
|
21715
21715
|
});
|
|
21716
21716
|
|
|
21717
21717
|
// src/cli.ts
|
|
21718
|
-
import { defineCommand as
|
|
21718
|
+
import { defineCommand as defineCommand287, runMain } from "citty";
|
|
21719
21719
|
|
|
21720
21720
|
// src/cache-flag.ts
|
|
21721
21721
|
var NO_CACHE_ARG = {
|
|
@@ -26268,6 +26268,9 @@ var chatChangeTypeSchema = z13.enum([
|
|
|
26268
26268
|
// A review site listing feeding the testimonials library, keyed on the
|
|
26269
26269
|
// source's id. Immediate — see convex/testimonials/mutations.ts.
|
|
26270
26270
|
"testimonial-source",
|
|
26271
|
+
// A Google spreadsheet created for a Form's leads. Immediate — see
|
|
26272
|
+
// convex/flows/destinations/mutations.ts.
|
|
26273
|
+
"spreadsheet",
|
|
26271
26274
|
// A landing page saved to the reference library, keyed on the page.
|
|
26272
26275
|
"landing-reference",
|
|
26273
26276
|
// One Studio batch — the takes of one brief, as a set. See convex/lib/validators.ts.
|
|
@@ -27015,7 +27018,7 @@ function crmSideEffect(type, summary, mapping, gotcha) {
|
|
|
27015
27018
|
reference: SIDE_EFFECT_REF(type)
|
|
27016
27019
|
};
|
|
27017
27020
|
}
|
|
27018
|
-
var MAP_FIRST = "
|
|
27021
|
+
var MAP_FIRST = "Set the destination BEFORE you map \u2014 yourself with `baker flows connect` when you know which one is meant (HubSpot: --hubspot-form; Sheets: --resource from `baker flows options googleSpreadsheet`, or --new-sheet; Pipedrive / GoHighLevel: no resource), otherwise `request_flow_input`. The destination-side names come from the connected account, and a mapping written against a guess is valid JSON that ships and drops every submission. Build it with `baker flows map`, never by hand.";
|
|
27019
27022
|
var FLOW_NODE_CATALOG = [
|
|
27020
27023
|
{
|
|
27021
27024
|
kind: "node",
|
|
@@ -27083,10 +27086,26 @@ var FLOW_NODE_CATALOG = [
|
|
|
27083
27086
|
"A HubSpot meeting scheduler.",
|
|
27084
27087
|
"Author it yourself from `baker hubspot meetings view <slug> --as-node`. If it redirects after booking, keep it as the last step \u2014 anything after it is unreachable."
|
|
27085
27088
|
),
|
|
27086
|
-
widgetNode(
|
|
27087
|
-
|
|
27088
|
-
|
|
27089
|
-
|
|
27089
|
+
widgetNode(
|
|
27090
|
+
"calendly",
|
|
27091
|
+
"A Calendly inline scheduling widget.",
|
|
27092
|
+
"Fill it yourself: `baker flows options calendly` lists the account's choices, `baker flows connect <slug> --node <id> --resource <id>` writes the one meant. request_flow_input only when nothing is connected or several could be meant."
|
|
27093
|
+
),
|
|
27094
|
+
widgetNode(
|
|
27095
|
+
"savvycal",
|
|
27096
|
+
"A SavvyCal inline scheduling link.",
|
|
27097
|
+
"Fill it yourself: `baker flows options savvycal` lists the account's choices, `baker flows connect <slug> --node <id> --resource <id>` writes the one meant. request_flow_input only when nothing is connected or several could be meant."
|
|
27098
|
+
),
|
|
27099
|
+
widgetNode(
|
|
27100
|
+
"highlevel",
|
|
27101
|
+
"A GoHighLevel calendar booking widget.",
|
|
27102
|
+
"Fill it yourself: `baker flows options highlevel` lists the account's choices, `baker flows connect <slug> --node <id> --resource <id>` writes the one meant. request_flow_input only when nothing is connected or several could be meant."
|
|
27103
|
+
),
|
|
27104
|
+
widgetNode(
|
|
27105
|
+
"highlevelForm",
|
|
27106
|
+
"A GoHighLevel form widget.",
|
|
27107
|
+
"Fill it yourself: `baker flows options highlevelForm` lists the account's choices, `baker flows connect <slug> --node <id> --resource <id>` writes the one meant. request_flow_input only when nothing is connected or several could be meant."
|
|
27108
|
+
)
|
|
27090
27109
|
];
|
|
27091
27110
|
var FLOW_SIDE_EFFECT_CATALOG = [
|
|
27092
27111
|
{
|
|
@@ -27505,6 +27524,24 @@ var FLOW_RESOURCE_NODE_TYPES = [
|
|
|
27505
27524
|
"highlevelForm"
|
|
27506
27525
|
];
|
|
27507
27526
|
var flowResourceNodeTypeSchema = z21.enum(FLOW_RESOURCE_NODE_TYPES);
|
|
27527
|
+
var FLOW_PROVIDER_TYPE = {
|
|
27528
|
+
// side effects
|
|
27529
|
+
email: null,
|
|
27530
|
+
zapier: null,
|
|
27531
|
+
httpWebhook: null,
|
|
27532
|
+
crmble: null,
|
|
27533
|
+
pipedrive: "pipedrive",
|
|
27534
|
+
googleSpreadsheet: "google-drive",
|
|
27535
|
+
hubspotForm: "hubspot",
|
|
27536
|
+
goHighlevelContact: "highlevel",
|
|
27537
|
+
// widget nodes
|
|
27538
|
+
calendly: "calendly",
|
|
27539
|
+
savvycal: "savvycal",
|
|
27540
|
+
hubspot: "hubspot",
|
|
27541
|
+
hubspotMeeting: "hubspot",
|
|
27542
|
+
highlevel: "highlevel",
|
|
27543
|
+
highlevelForm: "highlevel"
|
|
27544
|
+
};
|
|
27508
27545
|
var flowInputRequestSchema = z21.discriminatedUnion("target", [
|
|
27509
27546
|
z21.object({
|
|
27510
27547
|
/** Configure a side effect's `encryptedConfig` (+ `oauthProviderId` for OAuth types). */
|
|
@@ -27676,6 +27713,85 @@ var flowEmailPolicySchema = z21.object({
|
|
|
27676
27713
|
checkedAt: z21.number().nullable()
|
|
27677
27714
|
});
|
|
27678
27715
|
var flowsEmailPolicyResponseSchema = z21.object({ forms: z21.array(flowEmailPolicySchema) });
|
|
27716
|
+
var FLOW_AGENT_DESTINATION_KINDS = [
|
|
27717
|
+
"calendly",
|
|
27718
|
+
"savvycal",
|
|
27719
|
+
"highlevel",
|
|
27720
|
+
"highlevelForm",
|
|
27721
|
+
"googleSpreadsheet",
|
|
27722
|
+
"pipedrive",
|
|
27723
|
+
"goHighlevelContact"
|
|
27724
|
+
];
|
|
27725
|
+
var flowAgentDestinationKindSchema = z21.enum(FLOW_AGENT_DESTINATION_KINDS);
|
|
27726
|
+
var FLOW_ACCOUNT_ONLY_KINDS = [
|
|
27727
|
+
"pipedrive",
|
|
27728
|
+
"goHighlevelContact"
|
|
27729
|
+
];
|
|
27730
|
+
var flowsOptionsRequestSchema = z21.object({
|
|
27731
|
+
kind: flowAgentDestinationKindSchema,
|
|
27732
|
+
/** Connection id; optional when the company has exactly one of this platform. */
|
|
27733
|
+
account: z21.string().optional()
|
|
27734
|
+
});
|
|
27735
|
+
var flowDestinationAccountSchema = z21.object({ id: z21.string(), label: z21.string() });
|
|
27736
|
+
var flowDestinationOptionSchema = z21.object({
|
|
27737
|
+
id: z21.string(),
|
|
27738
|
+
name: z21.string(),
|
|
27739
|
+
/** One line to choose by: duration, calendar type, field count, last edited. */
|
|
27740
|
+
detail: z21.string().nullable()
|
|
27741
|
+
});
|
|
27742
|
+
var flowsOptionsResponseSchema = z21.object({
|
|
27743
|
+
ok: z21.literal(true),
|
|
27744
|
+
data: z21.object({
|
|
27745
|
+
kind: flowAgentDestinationKindSchema,
|
|
27746
|
+
accounts: z21.array(flowDestinationAccountSchema),
|
|
27747
|
+
/** The account the options were read from. */
|
|
27748
|
+
account: z21.string(),
|
|
27749
|
+
/** Empty for an account-only kind: the account is the whole destination. */
|
|
27750
|
+
options: z21.array(flowDestinationOptionSchema)
|
|
27751
|
+
})
|
|
27752
|
+
});
|
|
27753
|
+
var flowsResolveRequestSchema = z21.object({
|
|
27754
|
+
kind: flowAgentDestinationKindSchema,
|
|
27755
|
+
account: z21.string().optional(),
|
|
27756
|
+
/** The option id from `flows options`. Omitted for an account-only kind or a new sheet. */
|
|
27757
|
+
resourceId: z21.string().optional(),
|
|
27758
|
+
/** Google Sheets: the tab to append to. Defaults to the first one. */
|
|
27759
|
+
tab: z21.string().optional(),
|
|
27760
|
+
/** Google Sheets: create a spreadsheet instead of using an existing one. */
|
|
27761
|
+
newSheet: z21.object({
|
|
27762
|
+
title: z21.string().trim().min(1),
|
|
27763
|
+
/** Header row, left to right from column A. */
|
|
27764
|
+
columns: z21.array(z21.string()).max(26).optional()
|
|
27765
|
+
}).optional()
|
|
27766
|
+
});
|
|
27767
|
+
var flowsResolveResponseSchema = z21.object({
|
|
27768
|
+
ok: z21.literal(true),
|
|
27769
|
+
data: z21.discriminatedUnion("target", [
|
|
27770
|
+
z21.object({
|
|
27771
|
+
target: z21.literal("node"),
|
|
27772
|
+
account: z21.string(),
|
|
27773
|
+
name: z21.string(),
|
|
27774
|
+
/** Written as-is into the step's `nodeData.form.external` — what the card would have written. */
|
|
27775
|
+
external: z21.record(z21.string(), z21.unknown())
|
|
27776
|
+
}),
|
|
27777
|
+
z21.object({
|
|
27778
|
+
target: z21.literal("sideEffect"),
|
|
27779
|
+
account: z21.string(),
|
|
27780
|
+
oauthProviderId: z21.string(),
|
|
27781
|
+
/** Sealed under the flow key: the agent writes it, never reads it. */
|
|
27782
|
+
encryptedConfig: z21.string(),
|
|
27783
|
+
destination: z21.object({
|
|
27784
|
+
id: z21.string(),
|
|
27785
|
+
name: z21.string(),
|
|
27786
|
+
url: z21.string().nullable(),
|
|
27787
|
+
tab: z21.string().nullable(),
|
|
27788
|
+
/** The header row, so the agent can map by letter without reading the sheet. */
|
|
27789
|
+
columns: z21.array(z21.object({ letter: z21.string(), header: z21.string() })),
|
|
27790
|
+
created: z21.boolean()
|
|
27791
|
+
}).nullable()
|
|
27792
|
+
})
|
|
27793
|
+
])
|
|
27794
|
+
});
|
|
27679
27795
|
|
|
27680
27796
|
// ../api/src/history.ts
|
|
27681
27797
|
import { z as z22 } from "zod";
|
|
@@ -28129,6 +28245,19 @@ var hubspotFormsViewResponseSchema = z23.object({
|
|
|
28129
28245
|
external: hubspotFormNodeExternalSchema.optional()
|
|
28130
28246
|
})
|
|
28131
28247
|
});
|
|
28248
|
+
var hubspotFormsDestinationRequestSchema = z23.object({
|
|
28249
|
+
formId: z23.string().min(1)
|
|
28250
|
+
});
|
|
28251
|
+
var hubspotFormsDestinationResponseSchema = z23.object({
|
|
28252
|
+
ok: z23.literal(true),
|
|
28253
|
+
data: z23.object({
|
|
28254
|
+
formGuid: z23.string(),
|
|
28255
|
+
formName: z23.string(),
|
|
28256
|
+
portalId: z23.number(),
|
|
28257
|
+
oauthProviderId: z23.string(),
|
|
28258
|
+
encryptedConfig: z23.string()
|
|
28259
|
+
})
|
|
28260
|
+
});
|
|
28132
28261
|
var HUBSPOT_MISSING_GRANT_MARKER = "has not granted access to";
|
|
28133
28262
|
var HUBSPOT_NOT_CONNECTED_MESSAGE = "No HubSpot account is connected for this company.";
|
|
28134
28263
|
var hubspotFormSubmissionsRequestSchema = z23.object({
|
|
@@ -58891,7 +59020,24 @@ function sideEffectStatus(raw, meta) {
|
|
|
58891
59020
|
}
|
|
58892
59021
|
function requestFlowInputCall(slug, status) {
|
|
58893
59022
|
const args8 = status.target === "node" ? `{ target: "node", flowSlug: "${slug}", nodeId: "${status.nodeId}", nodeType: "${status.kind}" }` : `{ target: "sideEffect", flowSlug: "${slug}", nodeId: "${status.nodeId}", sideEffectId: "${status.sideEffectId}", sideEffectType: "${status.kind}" }`;
|
|
58894
|
-
|
|
59023
|
+
const card = `request_flow_input with ${args8}`;
|
|
59024
|
+
const target2 = status.target === "node" ? `--node ${status.nodeId}` : `--side-effect ${status.sideEffectId}`;
|
|
59025
|
+
const fallback = "only if nothing is connected or several could be meant";
|
|
59026
|
+
if (status.kind === "hubspotForm") {
|
|
59027
|
+
return `baker flows connect ${slug} ${target2} --hubspot-form <formId from baker hubspot forms list> \u2014 ${fallback}: ${card}`;
|
|
59028
|
+
}
|
|
59029
|
+
if (status.kind === "hubspot" || status.kind === "hubspotMeeting") {
|
|
59030
|
+
const list = status.kind === "hubspot" ? "forms view <id>" : "meetings view <slug>";
|
|
59031
|
+
return `write \`baker hubspot ${list} --as-node\` into the step's form.external \u2014 ${fallback}: ${card}`;
|
|
59032
|
+
}
|
|
59033
|
+
if (FLOW_ACCOUNT_ONLY_KINDS.includes(status.kind)) {
|
|
59034
|
+
return `baker flows connect ${slug} ${target2} \u2014 ${fallback}: ${card}`;
|
|
59035
|
+
}
|
|
59036
|
+
if (FLOW_AGENT_DESTINATION_KINDS.includes(status.kind)) {
|
|
59037
|
+
const sheet = status.kind === "googleSpreadsheet" ? ' (or --new-sheet "<title>" --columns "\u2026")' : "";
|
|
59038
|
+
return `baker flows connect ${slug} ${target2} --resource <id from baker flows options ${status.kind}>${sheet} \u2014 ${fallback}: ${card}`;
|
|
59039
|
+
}
|
|
59040
|
+
return card;
|
|
58895
59041
|
}
|
|
58896
59042
|
function collectConfigStatus(node, acc) {
|
|
58897
59043
|
if (!node || typeof node !== "object") {
|
|
@@ -78316,7 +78462,7 @@ async function readStartContext(landing, variant) {
|
|
|
78316
78462
|
}
|
|
78317
78463
|
|
|
78318
78464
|
// src/commands/flows/index.ts
|
|
78319
|
-
import { defineCommand as
|
|
78465
|
+
import { defineCommand as defineCommand156 } from "citty";
|
|
78320
78466
|
|
|
78321
78467
|
// src/commands/flows/add.ts
|
|
78322
78468
|
import { randomUUID as randomUUID2 } from "crypto";
|
|
@@ -78416,7 +78562,7 @@ var addNodeCommand = defineCommand150({
|
|
|
78416
78562
|
// outcome for reports zero conversions rather than an error.
|
|
78417
78563
|
`Say what this Form counts before you finish: \`baker analytics conversions --flow ${slug}\` lists every ending already spelled as an event key, including this step's. Nothing in _data.json decides it.`,
|
|
78418
78564
|
...entry.owners?.["nodeData.form.external"] === "request_flow_input" ? [
|
|
78419
|
-
`
|
|
78565
|
+
`Pick this ${type} step's resource: ${requestFlowInputCall(slug, pendingItem("node", String(node.id), type))}.`
|
|
78420
78566
|
] : [],
|
|
78421
78567
|
...entry.gotcha ? [entry.gotcha] : []
|
|
78422
78568
|
]
|
|
@@ -78445,6 +78591,22 @@ function freeSideEffectId(type, taken) {
|
|
|
78445
78591
|
if (!taken.has(candidate)) return candidate;
|
|
78446
78592
|
}
|
|
78447
78593
|
}
|
|
78594
|
+
function pendingItem(target2, nodeId, kind, sideEffectId) {
|
|
78595
|
+
return {
|
|
78596
|
+
target: target2,
|
|
78597
|
+
nodeId,
|
|
78598
|
+
kind,
|
|
78599
|
+
status: `${kind} \u2014 not configured`,
|
|
78600
|
+
needsInput: true,
|
|
78601
|
+
...sideEffectId ? { sideEffectId } : {}
|
|
78602
|
+
};
|
|
78603
|
+
}
|
|
78604
|
+
function configureHints(slug, nodeId, id, type, needsCard) {
|
|
78605
|
+
if (!needsCard) return [];
|
|
78606
|
+
return [
|
|
78607
|
+
`Configure it: ${requestFlowInputCall(slug, pendingItem("sideEffect", nodeId, type, id))}. Read the destination off that call's result.`
|
|
78608
|
+
];
|
|
78609
|
+
}
|
|
78448
78610
|
registerSchema({
|
|
78449
78611
|
command: "flows.add-side-effect",
|
|
78450
78612
|
description: "Add a side effect to a step with a valid skeleton \u2014 encryptedConfig:null for a CRM, a tagIds slot for a pixel, and no oauthProviderId key. Configure the confidential half with request_flow_input afterwards.",
|
|
@@ -78535,9 +78697,13 @@ var addSideEffectCommand = defineCommand150({
|
|
|
78535
78697
|
...needsUser.some(([, owner]) => owner === "tags") ? [
|
|
78536
78698
|
`This reports the conversion to ${type}. It does NOT make Baker count anything: what Baker counts is a named event, set with \`baker analytics conversions --flow ${slug}\`. Do both \u2014 they are two different systems asked the same question.`
|
|
78537
78699
|
] : [],
|
|
78538
|
-
...
|
|
78539
|
-
|
|
78540
|
-
|
|
78700
|
+
...configureHints(
|
|
78701
|
+
slug,
|
|
78702
|
+
String(node.id),
|
|
78703
|
+
id,
|
|
78704
|
+
type,
|
|
78705
|
+
needsUser.some(([, owner]) => owner === "request_flow_input")
|
|
78706
|
+
),
|
|
78541
78707
|
...needsUser.some(([, owner]) => owner === "tags") ? [
|
|
78542
78708
|
"Fill `tagIds` with a real ref from `baker tags list`, or stage the tag first with the `tags` skill. Never invent one."
|
|
78543
78709
|
] : [],
|
|
@@ -78547,9 +78713,359 @@ var addSideEffectCommand = defineCommand150({
|
|
|
78547
78713
|
}
|
|
78548
78714
|
});
|
|
78549
78715
|
|
|
78716
|
+
// src/commands/flows/connect.ts
|
|
78717
|
+
import { defineCommand as defineCommand151 } from "citty";
|
|
78718
|
+
var STEP_KINDS = /* @__PURE__ */ new Set(["calendly", "savvycal", "highlevel", "highlevelForm", "hubspot", "hubspotMeeting"]);
|
|
78719
|
+
var OAUTH_SIDE_EFFECTS = /* @__PURE__ */ new Set(["hubspotForm", "googleSpreadsheet", "pipedrive", "goHighlevelContact"]);
|
|
78720
|
+
function attachDestination(tree, named, sealed, type = "hubspotForm") {
|
|
78721
|
+
const ofType = collectSideEffects(tree).filter((entry) => entry.sideEffect.type === type);
|
|
78722
|
+
const inventory = ofType.map((entry) => String(entry.sideEffect.id)).join(", ") || "none";
|
|
78723
|
+
const chosen = named ? collectSideEffects(tree).find((entry) => entry.sideEffect.id === named) : ofType.length === 1 ? ofType[0] : void 0;
|
|
78724
|
+
if (!chosen) {
|
|
78725
|
+
return {
|
|
78726
|
+
ok: false,
|
|
78727
|
+
message: named ? `No side effect with id "${named}" in this form.` : `This form has ${ofType.length} ${type} side effects \u2014 name one with --side-effect <id>.`,
|
|
78728
|
+
fix: ofType.length === 0 ? `Add one first: baker flows add-side-effect <slug> --node <stepId> --type ${type}` : `${type} side effects in this form: ${inventory}`
|
|
78729
|
+
};
|
|
78730
|
+
}
|
|
78731
|
+
if (chosen.sideEffect.type !== type) {
|
|
78732
|
+
return {
|
|
78733
|
+
ok: false,
|
|
78734
|
+
message: `Side effect "${named}" is a ${String(chosen.sideEffect.type)}, not a ${type}.`,
|
|
78735
|
+
fix: `${type} side effects in this form: ${inventory}`
|
|
78736
|
+
};
|
|
78737
|
+
}
|
|
78738
|
+
chosen.sideEffect.oauthProviderId = sealed.oauthProviderId;
|
|
78739
|
+
chosen.sideEffect.encryptedConfig = sealed.encryptedConfig;
|
|
78740
|
+
return { ok: true, nodeId: String(chosen.node.id), sideEffectId: String(chosen.sideEffect.id) };
|
|
78741
|
+
}
|
|
78742
|
+
function isSet2(value2) {
|
|
78743
|
+
return typeof value2 === "string" && value2.length > 0;
|
|
78744
|
+
}
|
|
78745
|
+
function unwiredSideEffects(tree, type) {
|
|
78746
|
+
return collectSideEffects(tree).filter(({ sideEffect }) => sideEffect.type === type).filter(({ sideEffect }) => !isSet2(sideEffect.oauthProviderId) || !isSet2(sideEffect.encryptedConfig)).map(({ sideEffect }) => String(sideEffect.id));
|
|
78747
|
+
}
|
|
78748
|
+
function stepType(node) {
|
|
78749
|
+
const type = node?.nodeData?.type;
|
|
78750
|
+
return typeof type === "string" ? type : void 0;
|
|
78751
|
+
}
|
|
78752
|
+
function findStep(tree, nodeId) {
|
|
78753
|
+
return walkNodes(tree).find((node) => node.id === nodeId);
|
|
78754
|
+
}
|
|
78755
|
+
function attachStep(tree, nodeId, external) {
|
|
78756
|
+
const node = findStep(tree, nodeId);
|
|
78757
|
+
const type = stepType(node);
|
|
78758
|
+
if (!node || !type) {
|
|
78759
|
+
return {
|
|
78760
|
+
ok: false,
|
|
78761
|
+
message: `No step with id "${nodeId}" in this form.`,
|
|
78762
|
+
fix: "Step ids: baker flows show <slug>"
|
|
78763
|
+
};
|
|
78764
|
+
}
|
|
78765
|
+
if (!STEP_KINDS.has(type)) {
|
|
78766
|
+
return {
|
|
78767
|
+
ok: false,
|
|
78768
|
+
message: `Step "${nodeId}" is a ${type}, which embeds nothing from another platform.`,
|
|
78769
|
+
fix: "Only calendly, savvycal, highlevel, highlevelForm, hubspot and hubspotMeeting steps take a resource."
|
|
78770
|
+
};
|
|
78771
|
+
}
|
|
78772
|
+
const nodeData = node.nodeData;
|
|
78773
|
+
const form = nodeData.form ?? {};
|
|
78774
|
+
nodeData.form = { autofilledFields: {}, ...form, external };
|
|
78775
|
+
return { ok: true, nodeId, type };
|
|
78776
|
+
}
|
|
78777
|
+
function unpickedSteps(tree, type) {
|
|
78778
|
+
return walkNodes(tree).filter((node) => stepType(node) === type).filter((node) => node.nodeData.form?.external == null).map((node) => String(node.id));
|
|
78779
|
+
}
|
|
78780
|
+
function copyDestination(source, sourceId, target2, targetId) {
|
|
78781
|
+
const from = collectSideEffects(source).find((entry) => entry.sideEffect.id === sourceId);
|
|
78782
|
+
if (from) {
|
|
78783
|
+
const type = String(from.sideEffect.type);
|
|
78784
|
+
if (!isSet2(from.sideEffect.oauthProviderId) || !isSet2(from.sideEffect.encryptedConfig)) {
|
|
78785
|
+
return {
|
|
78786
|
+
ok: false,
|
|
78787
|
+
message: `"${sourceId}" is not wired itself \u2014 nothing to copy.`,
|
|
78788
|
+
fix: "Copy from one that is."
|
|
78789
|
+
};
|
|
78790
|
+
}
|
|
78791
|
+
const attached = attachDestination(
|
|
78792
|
+
target2,
|
|
78793
|
+
targetId,
|
|
78794
|
+
{
|
|
78795
|
+
oauthProviderId: String(from.sideEffect.oauthProviderId),
|
|
78796
|
+
encryptedConfig: String(from.sideEffect.encryptedConfig)
|
|
78797
|
+
},
|
|
78798
|
+
type
|
|
78799
|
+
);
|
|
78800
|
+
return attached.ok ? { ok: true, nodeId: attached.nodeId, type } : attached;
|
|
78801
|
+
}
|
|
78802
|
+
const step = findStep(source, sourceId);
|
|
78803
|
+
const external = step?.nodeData?.form?.external;
|
|
78804
|
+
if (!step || external == null || typeof external !== "object") {
|
|
78805
|
+
return {
|
|
78806
|
+
ok: false,
|
|
78807
|
+
message: `No wired side effect or picked step "${sourceId}" in the source form.`,
|
|
78808
|
+
fix: "Ids: baker flows show <slug>"
|
|
78809
|
+
};
|
|
78810
|
+
}
|
|
78811
|
+
const targetType = stepType(findStep(target2, targetId));
|
|
78812
|
+
if (targetType !== stepType(step)) {
|
|
78813
|
+
return {
|
|
78814
|
+
ok: false,
|
|
78815
|
+
message: `"${sourceId}" is a ${String(stepType(step))} and "${targetId}" a ${String(targetType)} \u2014 copy only between the same type.`,
|
|
78816
|
+
fix: "Pick a source of the same type."
|
|
78817
|
+
};
|
|
78818
|
+
}
|
|
78819
|
+
return attachStep(target2, targetId, structuredClone(external));
|
|
78820
|
+
}
|
|
78821
|
+
function refuse(message, fix, code = "VALIDATION_ERROR") {
|
|
78822
|
+
writeJson({ ok: false, error: { code, message, fix } });
|
|
78823
|
+
process.exit(1);
|
|
78824
|
+
}
|
|
78825
|
+
function allTargets(tree, kind) {
|
|
78826
|
+
if (!kind) refuse("--all needs --type <kind> to know what to wire.", "e.g. --all --type googleSpreadsheet");
|
|
78827
|
+
const on = STEP_KINDS.has(kind) ? "node" : "sideEffect";
|
|
78828
|
+
const ids2 = on === "node" ? unpickedSteps(tree, kind) : unwiredSideEffects(tree, kind);
|
|
78829
|
+
if (ids2.length === 0) {
|
|
78830
|
+
refuse(
|
|
78831
|
+
`Every ${kind} in this Form is already wired.`,
|
|
78832
|
+
"Repoint one by naming it with --node / --side-effect instead of --all."
|
|
78833
|
+
);
|
|
78834
|
+
}
|
|
78835
|
+
return { kind, on, ids: ids2 };
|
|
78836
|
+
}
|
|
78837
|
+
function onlyOfType(tree, type) {
|
|
78838
|
+
const probe = attachDestination(tree, void 0, { oauthProviderId: "", encryptedConfig: "" }, type);
|
|
78839
|
+
if (!probe.ok) refuse(probe.message, probe.fix);
|
|
78840
|
+
return probe.sideEffectId;
|
|
78841
|
+
}
|
|
78842
|
+
function stepTarget(tree, node) {
|
|
78843
|
+
const type = stepType(findStep(tree, node));
|
|
78844
|
+
if (!type) refuse(`No step with id "${node}" in this form.`, "Step ids: baker flows show <slug>");
|
|
78845
|
+
return { kind: type, on: "node", ids: [node] };
|
|
78846
|
+
}
|
|
78847
|
+
function sideEffectTarget(tree, named) {
|
|
78848
|
+
const found = collectSideEffects(tree).find((entry) => entry.sideEffect.id === named);
|
|
78849
|
+
if (!found) refuse(`No side effect with id "${named}" in this form.`, "Side-effect ids: baker flows show <slug>");
|
|
78850
|
+
return { kind: String(found.sideEffect.type), on: "sideEffect", ids: [named] };
|
|
78851
|
+
}
|
|
78852
|
+
function targetsFor(tree, args8) {
|
|
78853
|
+
const node = typeof args8.node === "string" ? args8.node : void 0;
|
|
78854
|
+
const named = typeof args8["side-effect"] === "string" ? args8["side-effect"] : void 0;
|
|
78855
|
+
if ([node, named, args8.all === true ? "all" : void 0].filter(Boolean).length > 1) {
|
|
78856
|
+
refuse("Pass one of --node, --side-effect or --all.", "One target per call; --all for every unwired one.");
|
|
78857
|
+
}
|
|
78858
|
+
if (args8.all === true) {
|
|
78859
|
+
const kind = typeof args8.type === "string" ? args8.type : args8["hubspot-form"] ? "hubspotForm" : void 0;
|
|
78860
|
+
return allTargets(tree, kind);
|
|
78861
|
+
}
|
|
78862
|
+
if (node) return stepTarget(tree, node);
|
|
78863
|
+
if (named) return sideEffectTarget(tree, named);
|
|
78864
|
+
if (args8["hubspot-form"]) return { kind: "hubspotForm", on: "sideEffect", ids: [onlyOfType(tree, "hubspotForm")] };
|
|
78865
|
+
return refuse(
|
|
78866
|
+
"Name what to fill: --node <stepId>, --side-effect <id>, or --all --type <kind>.",
|
|
78867
|
+
"Ids: baker flows show <slug>"
|
|
78868
|
+
);
|
|
78869
|
+
}
|
|
78870
|
+
async function sealHubspotForm(formId) {
|
|
78871
|
+
try {
|
|
78872
|
+
return (await apiPost("/api/hubspot/forms/destination", { formId })).data;
|
|
78873
|
+
} catch (err) {
|
|
78874
|
+
const refusal = err instanceof ApiError ? hubspotRefusal(err.code, err.message) : null;
|
|
78875
|
+
if (err instanceof ApiError && refusal !== null) refuse(err.message, refusal.fix, refusal.code);
|
|
78876
|
+
failApi(err);
|
|
78877
|
+
}
|
|
78878
|
+
}
|
|
78879
|
+
function isAgentKind(kind) {
|
|
78880
|
+
return FLOW_AGENT_DESTINATION_KINDS.includes(kind);
|
|
78881
|
+
}
|
|
78882
|
+
function destinationRefusal(kind, err) {
|
|
78883
|
+
if (err.code === "NOT_FOUND" && err.message.includes("is connected to this company")) {
|
|
78884
|
+
return {
|
|
78885
|
+
code: "NOT_CONNECTED",
|
|
78886
|
+
fix: `AGENT INSTRUCTION: only the user can connect it. Call request_connection with { platform: "${FLOW_PROVIDER_TYPE[kind]}", reason } \u2014 reason in their words \u2014 then run this again. Keep going with the rest of the task meanwhile.`
|
|
78887
|
+
};
|
|
78888
|
+
}
|
|
78889
|
+
if (err.code === "CONFLICT" && err.message.includes("--account")) {
|
|
78890
|
+
return {
|
|
78891
|
+
code: "SEVERAL_ACCOUNTS",
|
|
78892
|
+
fix: "Pass --account <id> when the user or the brief makes clear which one; otherwise ask them which (AskUserQuestion), naming the accounts above."
|
|
78893
|
+
};
|
|
78894
|
+
}
|
|
78895
|
+
return null;
|
|
78896
|
+
}
|
|
78897
|
+
function resolveBody(kind, args8) {
|
|
78898
|
+
const columns = typeof args8.columns === "string" ? args8.columns.split(",").map((column) => column.trim()).filter(Boolean) : void 0;
|
|
78899
|
+
return {
|
|
78900
|
+
kind,
|
|
78901
|
+
...typeof args8.account === "string" ? { account: args8.account } : {},
|
|
78902
|
+
...typeof args8.resource === "string" ? { resourceId: args8.resource } : {},
|
|
78903
|
+
...typeof args8.tab === "string" ? { tab: args8.tab } : {},
|
|
78904
|
+
...typeof args8["new-sheet"] === "string" ? { newSheet: { title: args8["new-sheet"], columns } } : {}
|
|
78905
|
+
};
|
|
78906
|
+
}
|
|
78907
|
+
async function resolveDestination(kind, args8) {
|
|
78908
|
+
try {
|
|
78909
|
+
return (await apiPost("/api/flows/destinations/resolve", resolveBody(kind, args8))).data;
|
|
78910
|
+
} catch (err) {
|
|
78911
|
+
const refusal = err instanceof ApiError ? destinationRefusal(kind, err) : null;
|
|
78912
|
+
if (err instanceof ApiError && refusal !== null) refuse(err.message, refusal.fix, refusal.code);
|
|
78913
|
+
failApi(err);
|
|
78914
|
+
}
|
|
78915
|
+
}
|
|
78916
|
+
function applyAll(target2, apply) {
|
|
78917
|
+
return target2.ids.map((id) => {
|
|
78918
|
+
const done = apply(id);
|
|
78919
|
+
if (!done.ok) refuse(done.message, done.fix);
|
|
78920
|
+
return "sideEffectId" in done ? { nodeId: done.nodeId, sideEffectId: done.sideEffectId } : { nodeId: done.nodeId };
|
|
78921
|
+
});
|
|
78922
|
+
}
|
|
78923
|
+
function sameAs(tree, target2, ref2) {
|
|
78924
|
+
const [slug, id] = ref2.split(":");
|
|
78925
|
+
if (!slug || !id) refuse(`--same-as takes <slug>:<id>, got "${ref2}".`, "e.g. --same-as madrid:se-gsheet-1");
|
|
78926
|
+
const source = readFlowTree(slug);
|
|
78927
|
+
const wired = applyAll(target2, (targetId) => copyDestination(source, id, tree, targetId));
|
|
78928
|
+
return { wired, destination: { sameAs: ref2 }, hints: [] };
|
|
78929
|
+
}
|
|
78930
|
+
async function fromHubspot(tree, target2, formId, slug) {
|
|
78931
|
+
if (target2.kind !== "hubspotForm") {
|
|
78932
|
+
refuse(
|
|
78933
|
+
`--hubspot-form wires a hubspotForm side effect, not a ${target2.kind}.`,
|
|
78934
|
+
"A HubSpot step takes `baker hubspot forms view <id> --as-node` (or `meetings view <slug> --as-node`)."
|
|
78935
|
+
);
|
|
78936
|
+
}
|
|
78937
|
+
const sealed = await sealHubspotForm(formId);
|
|
78938
|
+
const wired = applyAll(target2, (id) => attachDestination(tree, id, sealed));
|
|
78939
|
+
return {
|
|
78940
|
+
wired,
|
|
78941
|
+
destination: { formGuid: sealed.formGuid, formName: sealed.formName, portalId: sealed.portalId },
|
|
78942
|
+
hints: [
|
|
78943
|
+
`Now map each step's answers onto it: baker flows map ${slug} --side-effect <id> --hubspot-form ${sealed.formGuid} --map email=<value> \u2026 --write. Field names come from \`baker hubspot forms view ${sealed.formGuid}\`.`
|
|
78944
|
+
]
|
|
78945
|
+
};
|
|
78946
|
+
}
|
|
78947
|
+
function sheetHints(slug, data) {
|
|
78948
|
+
const sheet = data.destination;
|
|
78949
|
+
if (!sheet)
|
|
78950
|
+
return [`Now map the fields: baker flows map ${slug} --side-effect <id> --map <fieldKey>=<value> \u2026 --write.`];
|
|
78951
|
+
const columns = sheet.columns.map((column) => `${column.letter}=${column.header}`).join(", ");
|
|
78952
|
+
return [
|
|
78953
|
+
...sheet.created ? [
|
|
78954
|
+
`Created "${sheet.name}" in the connected Google account${sheet.url ? ` (${sheet.url})` : ""} \u2014 tell the user where their leads will land.`
|
|
78955
|
+
] : [],
|
|
78956
|
+
columns ? `Columns: ${columns}. Map by letter: baker flows map ${slug} --side-effect <id> --map A=<value> \u2026 --write.` : `The "${sheet.tab}" tab has no header row. Map by letter anyway, and say which column holds what.`
|
|
78957
|
+
];
|
|
78958
|
+
}
|
|
78959
|
+
async function fromPlatform(tree, target2, args8, slug) {
|
|
78960
|
+
const kind = target2.kind;
|
|
78961
|
+
if (!isAgentKind(kind)) {
|
|
78962
|
+
const hubspotStep = kind === "hubspot" || kind === "hubspotMeeting";
|
|
78963
|
+
refuse(
|
|
78964
|
+
`A ${kind} ${target2.on === "node" ? "step" : "side effect"} is not something this command can fill from a platform.`,
|
|
78965
|
+
hubspotStep ? "Write the blob from `baker hubspot forms view <id> --as-node` (or `meetings view <slug> --as-node`) into the step's form.external." : OAUTH_SIDE_EFFECTS.has(kind) ? "Pass --hubspot-form <formId>." : "It takes typed credentials only the user has: request_flow_input."
|
|
78966
|
+
);
|
|
78967
|
+
}
|
|
78968
|
+
const data = await resolveDestination(kind, args8);
|
|
78969
|
+
if (data.target === "node") {
|
|
78970
|
+
const wired2 = applyAll(target2, (id) => attachStep(tree, id, data.external));
|
|
78971
|
+
return {
|
|
78972
|
+
wired: wired2,
|
|
78973
|
+
destination: { name: data.name, account: data.account },
|
|
78974
|
+
hints: [`Picked "${data.name}". Autofill its fields from earlier answers in the step's form.autofilledFields.`]
|
|
78975
|
+
};
|
|
78976
|
+
}
|
|
78977
|
+
const sealed = { oauthProviderId: data.oauthProviderId, encryptedConfig: data.encryptedConfig };
|
|
78978
|
+
const wired = applyAll(target2, (id) => attachDestination(tree, id, sealed, kind));
|
|
78979
|
+
return {
|
|
78980
|
+
wired,
|
|
78981
|
+
destination: data.destination ? { ...data.destination, account: data.account } : { account: data.account },
|
|
78982
|
+
hints: sheetHints(slug, data)
|
|
78983
|
+
};
|
|
78984
|
+
}
|
|
78985
|
+
registerSchema({
|
|
78986
|
+
command: "flows.connect",
|
|
78987
|
+
description: "Fill a Form's step or destination yourself \u2014 no card for the user. Steps: Calendly, SavvyCal, GoHighLevel calendar/form (`--node <id> --resource <id>`). Destinations: HubSpot form (`--hubspot-form <id>`), Google Sheets (`--resource <spreadsheetId>` or `--new-sheet <title> --columns \u2026`), Pipedrive and GoHighLevel contact (no resource: the connected account is the destination). `--same-as <slug>:<id>` copies what another Form already has. `--all --type <kind>` fills every unwired one of that kind at once. Ids come from `baker flows options <kind>`. Fall back to request_flow_input only when nothing is connected, the sheet was never chosen, or several resources plausibly match.",
|
|
78988
|
+
args: {
|
|
78989
|
+
slug: { type: "positional", description: "Form slug", required: true },
|
|
78990
|
+
node: {
|
|
78991
|
+
type: "string",
|
|
78992
|
+
description: "Step id to fill (calendly, savvycal, highlevel, highlevelForm)",
|
|
78993
|
+
required: false
|
|
78994
|
+
},
|
|
78995
|
+
"side-effect": { type: "string", description: "Side-effect id to wire", required: false },
|
|
78996
|
+
all: { type: "boolean", description: "Every unwired one of --type in this Form", required: false, default: false },
|
|
78997
|
+
type: { type: "string", description: "The kind --all wires (e.g. googleSpreadsheet, calendly)", required: false },
|
|
78998
|
+
resource: { type: "string", description: "Option id from `baker flows options <kind>`", required: false },
|
|
78999
|
+
"hubspot-form": {
|
|
79000
|
+
type: "string",
|
|
79001
|
+
description: "HubSpot form id (from `baker hubspot forms list`)",
|
|
79002
|
+
required: false
|
|
79003
|
+
},
|
|
79004
|
+
"new-sheet": {
|
|
79005
|
+
type: "string",
|
|
79006
|
+
description: "Create a Google spreadsheet with this title and wire it",
|
|
79007
|
+
required: false
|
|
79008
|
+
},
|
|
79009
|
+
columns: {
|
|
79010
|
+
type: "string",
|
|
79011
|
+
description: "With --new-sheet: header row, comma-separated, from column A",
|
|
79012
|
+
required: false
|
|
79013
|
+
},
|
|
79014
|
+
tab: { type: "string", description: "Google Sheets tab to append to (default: the first)", required: false },
|
|
79015
|
+
"same-as": {
|
|
79016
|
+
type: "string",
|
|
79017
|
+
description: "<slug>:<id> \u2014 copy another Form's wired destination or picked step",
|
|
79018
|
+
required: false
|
|
79019
|
+
},
|
|
79020
|
+
account: {
|
|
79021
|
+
type: "string",
|
|
79022
|
+
description: "Connection id, when more than one account of the platform is connected",
|
|
79023
|
+
required: false
|
|
79024
|
+
}
|
|
79025
|
+
}
|
|
79026
|
+
});
|
|
79027
|
+
var connectCommand = defineCommand151({
|
|
79028
|
+
meta: {
|
|
79029
|
+
name: "connect",
|
|
79030
|
+
description: 'Fill a step or destination yourself. Start here: baker flows options calendly, then baker flows connect contact --node book --resource <id>. Sheets: --side-effect se-gsheet-1 --new-sheet "Leads" --columns "Name,Email". Same as another Form: --same-as madrid:se-gsheet-1'
|
|
79031
|
+
},
|
|
79032
|
+
args: {
|
|
79033
|
+
slug: { type: "positional", description: "Form slug", required: true },
|
|
79034
|
+
node: { type: "string", description: "Step id to fill" },
|
|
79035
|
+
"side-effect": { type: "string", description: "Side-effect id to wire" },
|
|
79036
|
+
all: { type: "boolean", description: "Every unwired one of --type" },
|
|
79037
|
+
type: { type: "string", description: "The kind --all wires" },
|
|
79038
|
+
resource: { type: "string", description: "Option id from baker flows options <kind>" },
|
|
79039
|
+
"hubspot-form": { type: "string", description: "HubSpot form id (from baker hubspot forms list)" },
|
|
79040
|
+
"new-sheet": { type: "string", description: "Create a spreadsheet with this title" },
|
|
79041
|
+
columns: { type: "string", description: "Header row for --new-sheet, comma-separated" },
|
|
79042
|
+
tab: { type: "string", description: "Sheet tab (default: the first)" },
|
|
79043
|
+
"same-as": { type: "string", description: "<slug>:<id> to copy" },
|
|
79044
|
+
account: { type: "string", description: "Connection id when several are connected" }
|
|
79045
|
+
},
|
|
79046
|
+
run: async ({ args: args8 }) => {
|
|
79047
|
+
const slug = String(args8.slug);
|
|
79048
|
+
const target2 = targetsFor(readFlowTree(slug), args8);
|
|
79049
|
+
const tree = readFlowTree(slug);
|
|
79050
|
+
const result = typeof args8["same-as"] === "string" ? sameAs(tree, target2, args8["same-as"]) : typeof args8["hubspot-form"] === "string" ? await fromHubspot(tree, target2, args8["hubspot-form"], slug) : await fromPlatform(tree, target2, args8, slug);
|
|
79051
|
+
writeFlowTree(slug, tree);
|
|
79052
|
+
writeJson({
|
|
79053
|
+
ok: true,
|
|
79054
|
+
data: {
|
|
79055
|
+
slug,
|
|
79056
|
+
kind: target2.kind,
|
|
79057
|
+
[target2.on === "node" ? "steps" : "sideEffects"]: result.wired,
|
|
79058
|
+
destination: result.destination,
|
|
79059
|
+
connected: true
|
|
79060
|
+
},
|
|
79061
|
+
hints: [...result.hints, "Staged like any other edit in this chat: it goes live when the chat is published."]
|
|
79062
|
+
});
|
|
79063
|
+
}
|
|
79064
|
+
});
|
|
79065
|
+
|
|
78550
79066
|
// src/commands/flows/map.ts
|
|
78551
79067
|
import { readFileSync as readFileSync18 } from "fs";
|
|
78552
|
-
import { defineCommand as
|
|
79068
|
+
import { defineCommand as defineCommand152 } from "citty";
|
|
78553
79069
|
|
|
78554
79070
|
// src/commands/flows/value-expression.ts
|
|
78555
79071
|
import { existsSync as existsSync9, readFileSync as readFileSync17 } from "fs";
|
|
@@ -79226,7 +79742,7 @@ function readSpecFile(path58) {
|
|
|
79226
79742
|
try {
|
|
79227
79743
|
raw = path58 === "-" ? readFileSync18(0, "utf-8") : readFileSync18(path58, "utf-8");
|
|
79228
79744
|
} catch (error) {
|
|
79229
|
-
|
|
79745
|
+
refuse2(
|
|
79230
79746
|
`Could not read ${path58 === "-" ? "the mapping from stdin" : `"${path58}"`}: ${error instanceof Error ? error.message : String(error)}`
|
|
79231
79747
|
);
|
|
79232
79748
|
}
|
|
@@ -79234,21 +79750,21 @@ function readSpecFile(path58) {
|
|
|
79234
79750
|
try {
|
|
79235
79751
|
parsed = JSON.parse(raw);
|
|
79236
79752
|
} catch (error) {
|
|
79237
|
-
|
|
79753
|
+
refuse2(
|
|
79238
79754
|
`${path58 === "-" ? "stdin" : `"${path58}"`} is not valid JSON: ${error instanceof Error ? error.message : String(error)}`,
|
|
79239
79755
|
'Expected { "map": { "<destField>": "<value>", \u2026 } }'
|
|
79240
79756
|
);
|
|
79241
79757
|
}
|
|
79242
79758
|
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
79243
|
-
|
|
79759
|
+
refuse2("A mapping file must be a JSON object.", 'Expected { "map": { "<destField>": "<value>", \u2026 } }');
|
|
79244
79760
|
}
|
|
79245
79761
|
const spec = parsed;
|
|
79246
79762
|
if (!spec.map || typeof spec.map !== "object" || Object.keys(spec.map).length === 0) {
|
|
79247
|
-
|
|
79763
|
+
refuse2("A mapping file needs a non-empty `map` object.", 'Expected { "map": { "firstname": "nombre", \u2026 } }');
|
|
79248
79764
|
}
|
|
79249
79765
|
return spec;
|
|
79250
79766
|
}
|
|
79251
|
-
function
|
|
79767
|
+
function refuse2(message, fix) {
|
|
79252
79768
|
writeJson({ ok: false, error: { code: "VALIDATION_ERROR", message, ...fix ? { fix } : {} } });
|
|
79253
79769
|
process.exit(1);
|
|
79254
79770
|
}
|
|
@@ -79257,14 +79773,14 @@ async function hubspotFieldCatalog(formId) {
|
|
|
79257
79773
|
try {
|
|
79258
79774
|
response = await apiPost("/api/hubspot/forms/view", { formId });
|
|
79259
79775
|
} catch (error) {
|
|
79260
|
-
|
|
79776
|
+
refuse2(
|
|
79261
79777
|
`Could not read HubSpot form "${formId}": ${error instanceof Error ? error.message : String(error)}`,
|
|
79262
79778
|
"Check the guid against the `destination` request_flow_input returned, or `baker hubspot forms list`. Drop --hubspot-form and write `<field>:<fieldType>=<value>` per mapping only if HubSpot is unreachable."
|
|
79263
79779
|
);
|
|
79264
79780
|
}
|
|
79265
79781
|
const fields = response.data.form?.fields ?? [];
|
|
79266
79782
|
if (fields.length === 0) {
|
|
79267
|
-
|
|
79783
|
+
refuse2(
|
|
79268
79784
|
`HubSpot form "${formId}" reports no fields, so nothing can be mapped against it.`,
|
|
79269
79785
|
"Confirm the guid names the form this side effect submits to: baker hubspot forms list"
|
|
79270
79786
|
);
|
|
@@ -79288,7 +79804,7 @@ function describeDestination(chosen) {
|
|
|
79288
79804
|
const type = String(chosen.sideEffect.type ?? "");
|
|
79289
79805
|
const slots = describeSlots(type);
|
|
79290
79806
|
if (slots.length === 0) {
|
|
79291
|
-
|
|
79807
|
+
refuse2(
|
|
79292
79808
|
`A ${type} side effect has no mappable field.`,
|
|
79293
79809
|
`Nothing on it addresses named values. \`baker flows schema side-effect ${type}\` shows what it does take.`
|
|
79294
79810
|
);
|
|
@@ -79313,7 +79829,7 @@ function shapeOrRefuse(type, into) {
|
|
|
79313
79829
|
try {
|
|
79314
79830
|
return shapeFor(type, into);
|
|
79315
79831
|
} catch (error) {
|
|
79316
|
-
if (error instanceof MappingError)
|
|
79832
|
+
if (error instanceof MappingError) refuse2(error.message, error.fix);
|
|
79317
79833
|
throw error;
|
|
79318
79834
|
}
|
|
79319
79835
|
}
|
|
@@ -79323,7 +79839,7 @@ function assertDestinationReady(slug, tree, chosen, into) {
|
|
|
79323
79839
|
const status = collectConfigStatusFor(tree, slug, String(chosen.sideEffect.id ?? ""));
|
|
79324
79840
|
const call = status ? requestFlowInputCall(slug, status) : `request_flow_input for the ${type} side effect`;
|
|
79325
79841
|
if (!namesComeFromAccount(shapeOrRefuse(type, into))) return;
|
|
79326
|
-
|
|
79842
|
+
refuse2(
|
|
79327
79843
|
`The ${type} destination is not configured yet, so its field names cannot be anything but a guess.`,
|
|
79328
79844
|
`Configure it first, then map against the names that call returns: ${call}`
|
|
79329
79845
|
);
|
|
@@ -79359,7 +79875,7 @@ function pendingEndpointHint(slug, tree, chosen) {
|
|
|
79359
79875
|
}
|
|
79360
79876
|
function pickSideEffect(slug, found, named) {
|
|
79361
79877
|
if (found.length === 0) {
|
|
79362
|
-
|
|
79878
|
+
refuse2(
|
|
79363
79879
|
`"${slug}" has no side effects \u2014 author the side effect first, then map into it.`,
|
|
79364
79880
|
`baker flows add-side-effect ${slug} --node <nodeId> --type <type>`
|
|
79365
79881
|
);
|
|
@@ -79367,14 +79883,14 @@ function pickSideEffect(slug, found, named) {
|
|
|
79367
79883
|
const chosen = named ? found.find((entry) => entry.sideEffect.id === named) : found.length === 1 ? found[0] : void 0;
|
|
79368
79884
|
if (chosen) return chosen;
|
|
79369
79885
|
const inventory = found.map((entry) => `${entry.sideEffect.id} (${entry.sideEffect.type})`).join(", ");
|
|
79370
|
-
|
|
79886
|
+
refuse2(
|
|
79371
79887
|
named ? `No side effect with id "${named}" in "${slug}".` : `"${slug}" has ${found.length} side effects \u2014 name one with --side-effect <id>.`,
|
|
79372
79888
|
`Side effects in this form: ${inventory}`
|
|
79373
79889
|
);
|
|
79374
79890
|
}
|
|
79375
79891
|
function customFlag(custom, standard) {
|
|
79376
79892
|
if (custom === true && standard === true) {
|
|
79377
|
-
|
|
79893
|
+
refuse2("--custom and --standard contradict each other. Pass one.");
|
|
79378
79894
|
}
|
|
79379
79895
|
if (custom === true) return true;
|
|
79380
79896
|
if (standard === true) return false;
|
|
@@ -79398,7 +79914,7 @@ async function mapOptions(args8, fromFile, into) {
|
|
|
79398
79914
|
] : []
|
|
79399
79915
|
};
|
|
79400
79916
|
}
|
|
79401
|
-
var mapCommand2 =
|
|
79917
|
+
var mapCommand2 = defineCommand152({
|
|
79402
79918
|
meta: {
|
|
79403
79919
|
name: "map",
|
|
79404
79920
|
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"
|
|
@@ -79454,7 +79970,7 @@ var mapCommand2 = defineCommand151({
|
|
|
79454
79970
|
built = buildFieldMapping(tree, chosen.sideEffect, specs, options);
|
|
79455
79971
|
} catch (error) {
|
|
79456
79972
|
if (error instanceof MappingError) {
|
|
79457
|
-
|
|
79973
|
+
refuse2(error.message, error.fix);
|
|
79458
79974
|
}
|
|
79459
79975
|
throw error;
|
|
79460
79976
|
}
|
|
@@ -79520,7 +80036,7 @@ function emitWritten(slug, chosen, built, slotHint) {
|
|
|
79520
80036
|
}
|
|
79521
80037
|
|
|
79522
80038
|
// src/commands/flows/normalize.ts
|
|
79523
|
-
import { defineCommand as
|
|
80039
|
+
import { defineCommand as defineCommand153 } from "citty";
|
|
79524
80040
|
var OPTIONAL_STRINGS = ["oauthProviderId"];
|
|
79525
80041
|
var ARRAY_FIELDS = [
|
|
79526
80042
|
"fieldMapping",
|
|
@@ -79602,7 +80118,7 @@ registerSchema({
|
|
|
79602
80118
|
}
|
|
79603
80119
|
}
|
|
79604
80120
|
});
|
|
79605
|
-
var normalizeCommand =
|
|
80121
|
+
var normalizeCommand = defineCommand153({
|
|
79606
80122
|
meta: {
|
|
79607
80123
|
name: "normalize",
|
|
79608
80124
|
description: "Repair the shapes a form file is allowed to get slightly wrong. Example: baker flows normalize contact --write"
|
|
@@ -79632,8 +80148,98 @@ var normalizeCommand = defineCommand152({
|
|
|
79632
80148
|
}
|
|
79633
80149
|
});
|
|
79634
80150
|
|
|
80151
|
+
// src/commands/flows/options.ts
|
|
80152
|
+
import { defineCommand as defineCommand154 } from "citty";
|
|
80153
|
+
var HUBSPOT_KINDS = {
|
|
80154
|
+
hubspot: "baker hubspot forms list",
|
|
80155
|
+
hubspotForm: "baker hubspot forms list",
|
|
80156
|
+
hubspotMeeting: "baker hubspot meetings list"
|
|
80157
|
+
};
|
|
80158
|
+
function optionsHints(data) {
|
|
80159
|
+
const { kind, options } = data;
|
|
80160
|
+
if (kind === "pipedrive" || kind === "goHighlevelContact") {
|
|
80161
|
+
return [
|
|
80162
|
+
`Nothing to choose: the connected account is the destination. Wire it: baker flows connect <slug> --side-effect <id> (or --all --type ${kind}).`
|
|
80163
|
+
];
|
|
80164
|
+
}
|
|
80165
|
+
if (kind === "googleSpreadsheet") {
|
|
80166
|
+
return [
|
|
80167
|
+
"These are the only spreadsheets Baker can reach: ones someone chose for a Form before, and ones Baker created. Pick one: baker flows connect <slug> --side-effect <id> --resource <id> [--tab <name>].",
|
|
80168
|
+
'None fits? Create one yourself: baker flows connect <slug> --side-effect <id> --new-sheet "<Form name> leads" --columns "Name,Email,\u2026". Only when the user wants their own existing sheet: request_flow_input.'
|
|
80169
|
+
];
|
|
80170
|
+
}
|
|
80171
|
+
const empty = options.length === 0 ? ["The account has none. Tell the user what to create there, or skip this step \u2014 do not invent one."] : [];
|
|
80172
|
+
return [
|
|
80173
|
+
...empty,
|
|
80174
|
+
`Fill the step: baker flows connect <slug> --node <stepId> --resource <id> (or --all --type ${kind}). One clear match \u2192 use it; several plausible \u2192 ask the user which.`
|
|
80175
|
+
];
|
|
80176
|
+
}
|
|
80177
|
+
registerSchema({
|
|
80178
|
+
command: "flows.options",
|
|
80179
|
+
description: "What a Form step or destination can be filled with, read from the connected account: Calendly events, SavvyCal links, GoHighLevel calendars and forms, the Google spreadsheets Baker can reach. Pipedrive and GoHighLevel contact have nothing to choose \u2014 the account is the destination. Next: `baker flows connect <slug> --node|--side-effect <id> --resource <id>`. HubSpot has its own: `baker hubspot forms list` / `meetings list`.",
|
|
80180
|
+
args: {
|
|
80181
|
+
kind: {
|
|
80182
|
+
type: "positional",
|
|
80183
|
+
description: `One of: ${FLOW_AGENT_DESTINATION_KINDS.join(", ")}`,
|
|
80184
|
+
required: true
|
|
80185
|
+
},
|
|
80186
|
+
account: {
|
|
80187
|
+
type: "string",
|
|
80188
|
+
description: "Connection id, when more than one account of the platform is connected",
|
|
80189
|
+
required: false
|
|
80190
|
+
}
|
|
80191
|
+
}
|
|
80192
|
+
});
|
|
80193
|
+
var optionsCommand = defineCommand154({
|
|
80194
|
+
meta: {
|
|
80195
|
+
name: "options",
|
|
80196
|
+
description: "What a step or destination can be filled with, from the connected account. Start here: baker flows options calendly"
|
|
80197
|
+
},
|
|
80198
|
+
args: {
|
|
80199
|
+
kind: { type: "positional", description: FLOW_AGENT_DESTINATION_KINDS.join(" | "), required: true },
|
|
80200
|
+
account: { type: "string", description: "Connection id when several are connected" }
|
|
80201
|
+
},
|
|
80202
|
+
run: async ({ args: args8 }) => {
|
|
80203
|
+
const kind = String(args8.kind);
|
|
80204
|
+
const hubspot = HUBSPOT_KINDS[kind];
|
|
80205
|
+
if (hubspot) {
|
|
80206
|
+
writeJson({ ok: false, error: { code: "VALIDATION_ERROR", message: `HubSpot has its own list: ${hubspot}.` } });
|
|
80207
|
+
process.exit(1);
|
|
80208
|
+
}
|
|
80209
|
+
if (!FLOW_AGENT_DESTINATION_KINDS.includes(kind)) {
|
|
80210
|
+
writeJson({
|
|
80211
|
+
ok: false,
|
|
80212
|
+
error: {
|
|
80213
|
+
code: "VALIDATION_ERROR",
|
|
80214
|
+
message: `"${kind}" is not filled from a platform account.`,
|
|
80215
|
+
fix: `Kinds: ${FLOW_AGENT_DESTINATION_KINDS.join(", ")}. Typed credentials (webhooks, Zapier, Crmble) go through request_flow_input.`
|
|
80216
|
+
}
|
|
80217
|
+
});
|
|
80218
|
+
process.exit(1);
|
|
80219
|
+
}
|
|
80220
|
+
try {
|
|
80221
|
+
const { data } = await apiPost("/api/flows/destinations/options", {
|
|
80222
|
+
kind,
|
|
80223
|
+
...args8.account ? { account: String(args8.account) } : {}
|
|
80224
|
+
});
|
|
80225
|
+
writeJson({
|
|
80226
|
+
ok: true,
|
|
80227
|
+
data: { ...data, accounts: data.accounts.length > 1 ? data.accounts : void 0 },
|
|
80228
|
+
hints: optionsHints(data)
|
|
80229
|
+
});
|
|
80230
|
+
} catch (err) {
|
|
80231
|
+
const refusal = err instanceof ApiError ? destinationRefusal(kind, err) : null;
|
|
80232
|
+
if (err instanceof ApiError && refusal !== null) {
|
|
80233
|
+
writeJson({ ok: false, error: { code: refusal.code, message: err.message, fix: refusal.fix } });
|
|
80234
|
+
process.exit(1);
|
|
80235
|
+
}
|
|
80236
|
+
failApi(err);
|
|
80237
|
+
}
|
|
80238
|
+
}
|
|
80239
|
+
});
|
|
80240
|
+
|
|
79635
80241
|
// src/commands/flows/schema.ts
|
|
79636
|
-
import { defineCommand as
|
|
80242
|
+
import { defineCommand as defineCommand155 } from "citty";
|
|
79637
80243
|
registerSchema({
|
|
79638
80244
|
command: "flows.schema",
|
|
79639
80245
|
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.",
|
|
@@ -79658,7 +80264,7 @@ function triggerHints(triggers) {
|
|
|
79658
80264
|
`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(", ")}.` : "")
|
|
79659
80265
|
];
|
|
79660
80266
|
}
|
|
79661
|
-
var schemaCommand =
|
|
80267
|
+
var schemaCommand = defineCommand155({
|
|
79662
80268
|
meta: {
|
|
79663
80269
|
name: "schema",
|
|
79664
80270
|
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)"
|
|
@@ -79763,11 +80369,28 @@ function pendingInputHints(slug, config) {
|
|
|
79763
80369
|
const calls = pending.slice(0, MAX_PENDING_HINTS).map((row2) => `${row2.kind}: ${requestFlowInputCall(slug, row2)}`);
|
|
79764
80370
|
const rest = pending.length - calls.length;
|
|
79765
80371
|
return [
|
|
79766
|
-
|
|
80372
|
+
...repeatedKindHints(slug, pending),
|
|
80373
|
+
`${pending.length} item${pending.length === 1 ? "" : "s"} still unwired. Wire each yourself with the command below when you know which resource is meant; the card is the fallback, and its result carries the destination \u2014 read the names from there rather than looking them up again.`,
|
|
79767
80374
|
...calls,
|
|
79768
80375
|
...rest > 0 ? [`\u2026and ${rest} more \u2014 see \`config\` above.`] : []
|
|
79769
80376
|
];
|
|
79770
80377
|
}
|
|
80378
|
+
function repeatedKindHints(slug, pending) {
|
|
80379
|
+
const counts = /* @__PURE__ */ new Map();
|
|
80380
|
+
for (const row2 of pending) counts.set(row2.kind, (counts.get(row2.kind) ?? 0) + 1);
|
|
80381
|
+
return [...counts].flatMap(([kind, count2]) => {
|
|
80382
|
+
if (count2 < 2) return [];
|
|
80383
|
+
if (kind === "hubspotForm") {
|
|
80384
|
+
return [
|
|
80385
|
+
`${count2} hubspotForm side effects are unwired. When they all send to the same HubSpot form: baker flows connect ${slug} --all --hubspot-form <formId>.`
|
|
80386
|
+
];
|
|
80387
|
+
}
|
|
80388
|
+
if (!FLOW_AGENT_DESTINATION_KINDS.includes(kind)) return [];
|
|
80389
|
+
return [
|
|
80390
|
+
`${count2} ${kind} items are unwired. When they share one destination: baker flows connect ${slug} --all --type ${kind} [--resource <id>].`
|
|
80391
|
+
];
|
|
80392
|
+
});
|
|
80393
|
+
}
|
|
79771
80394
|
var MAX_PENDING_HINTS = 6;
|
|
79772
80395
|
function inertSideEffectHints(tree) {
|
|
79773
80396
|
const dead = collectSideEffects(tree).flatMap(({ node, sideEffect }) => {
|
|
@@ -79820,7 +80443,7 @@ function displayName(slug) {
|
|
|
79820
80443
|
const name = tree.displayName;
|
|
79821
80444
|
return typeof name === "string" && name.trim() ? name.trim() : slug;
|
|
79822
80445
|
}
|
|
79823
|
-
var listCommand15 =
|
|
80446
|
+
var listCommand15 = defineCommand156({
|
|
79824
80447
|
meta: {
|
|
79825
80448
|
name: "list",
|
|
79826
80449
|
description: "List Forms in this workspace with the count of confidential fields still needing setup. Example: baker flows list"
|
|
@@ -79847,7 +80470,7 @@ var listCommand15 = defineCommand154({
|
|
|
79847
80470
|
});
|
|
79848
80471
|
}
|
|
79849
80472
|
});
|
|
79850
|
-
var showCommand5 =
|
|
80473
|
+
var showCommand5 = defineCommand156({
|
|
79851
80474
|
meta: {
|
|
79852
80475
|
name: "show",
|
|
79853
80476
|
description: "Show a Form's confidential fields and their configuration status (never secret values). Example: baker flows show contact"
|
|
@@ -79889,14 +80512,16 @@ var showCommand5 = defineCommand154({
|
|
|
79889
80512
|
});
|
|
79890
80513
|
}
|
|
79891
80514
|
});
|
|
79892
|
-
var flowsCommand =
|
|
80515
|
+
var flowsCommand = defineCommand156({
|
|
79893
80516
|
meta: {
|
|
79894
80517
|
name: "flows",
|
|
79895
80518
|
description: `Read and shape this workspace's Forms (flows).
|
|
79896
80519
|
|
|
79897
80520
|
Reads never reveal a secret value. Writes touch only the form's own _data.json \u2014 they stage structure, never a live system.
|
|
79898
80521
|
|
|
79899
|
-
|
|
80522
|
+
Wire a connected platform yourself once you know which resource is meant \u2014 no card for the user: \`baker flows options <kind>\` lists what the account holds, \`baker flows connect\` writes it (Calendly, SavvyCal, GoHighLevel steps; Google Sheets, Pipedrive, GoHighLevel and HubSpot destinations; \`--same-as\` copies another Form's). A HubSpot step takes \`baker hubspot forms view <id> --as-node\`. Anything sealed is written sealed; you never see a secret.
|
|
80523
|
+
|
|
80524
|
+
The request_flow_input tool (baker_ui MCP server) is the fallback: typed secrets (webhooks, Zapier, Crmble), a platform nobody connected, the user's own existing spreadsheet, or several resources that could be meant.
|
|
79900
80525
|
|
|
79901
80526
|
Examples:
|
|
79902
80527
|
baker flows list # every Form + how many fields still need setup
|
|
@@ -79904,6 +80529,9 @@ Examples:
|
|
|
79904
80529
|
baker flows schema node customForm # the shape of a step, before you author one
|
|
79905
80530
|
baker flows add-node contact --type text --name "Thanks"
|
|
79906
80531
|
baker flows add-side-effect contact --node <id> --type googleSpreadsheet
|
|
80532
|
+
baker flows options calendly # what the connected account holds
|
|
80533
|
+
baker flows connect contact --node book --resource <id>
|
|
80534
|
+
baker flows connect contact --side-effect se-hubspotForm-1 --hubspot-form <formId> # --all: every unwired one
|
|
79907
80535
|
baker flows map contact --map A=name --map B=email --write
|
|
79908
80536
|
Full guide: __tooling__/docs/tools/baker/flows.md`
|
|
79909
80537
|
},
|
|
@@ -79913,6 +80541,8 @@ Full guide: __tooling__/docs/tools/baker/flows.md`
|
|
|
79913
80541
|
schema: schemaCommand,
|
|
79914
80542
|
"add-node": addNodeCommand,
|
|
79915
80543
|
"add-side-effect": addSideEffectCommand,
|
|
80544
|
+
options: optionsCommand,
|
|
80545
|
+
connect: connectCommand,
|
|
79916
80546
|
map: mapCommand2,
|
|
79917
80547
|
normalize: normalizeCommand
|
|
79918
80548
|
},
|
|
@@ -79924,7 +80554,7 @@ Full guide: __tooling__/docs/tools/baker/flows.md`
|
|
|
79924
80554
|
|
|
79925
80555
|
// src/commands/funnel/index.ts
|
|
79926
80556
|
import { readFileSync as readFileSync19 } from "fs";
|
|
79927
|
-
import { defineCommand as
|
|
80557
|
+
import { defineCommand as defineCommand157 } from "citty";
|
|
79928
80558
|
|
|
79929
80559
|
// src/commands/funnel/formMoments.ts
|
|
79930
80560
|
function offeredEndings(form) {
|
|
@@ -80668,7 +81298,7 @@ registerSchema({
|
|
|
80668
81298
|
description: "Read the company's funnel, or draw one",
|
|
80669
81299
|
args: args7
|
|
80670
81300
|
});
|
|
80671
|
-
var funnelCommand2 =
|
|
81301
|
+
var funnelCommand2 = defineCommand157({
|
|
80672
81302
|
meta: {
|
|
80673
81303
|
name: "funnel",
|
|
80674
81304
|
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 produced, its sources, its landings, plus each Form\'s own outcome at zero). **To make an event count on a step \u2014 the usual job \u2014 use `--add-trigger <step> --event <key>`:** it adds that one way in and touches nothing else about the step. `--step \'<json>\'` is for adding or renaming a STEP; it replaces the step with that key, so it means restating its `after` and every trigger it keeps, and one left out is gone. 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.'
|
|
@@ -80727,10 +81357,10 @@ function workspaceForms() {
|
|
|
80727
81357
|
}
|
|
80728
81358
|
|
|
80729
81359
|
// src/commands/ga4/index.ts
|
|
80730
|
-
import { defineCommand as
|
|
81360
|
+
import { defineCommand as defineCommand164 } from "citty";
|
|
80731
81361
|
|
|
80732
81362
|
// src/commands/ga4/audit.ts
|
|
80733
|
-
import { defineCommand as
|
|
81363
|
+
import { defineCommand as defineCommand158 } from "citty";
|
|
80734
81364
|
|
|
80735
81365
|
// src/commands/ga4/resolve.ts
|
|
80736
81366
|
async function fetchProperties(useCache = true) {
|
|
@@ -80796,7 +81426,7 @@ registerSchema({
|
|
|
80796
81426
|
"no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false }
|
|
80797
81427
|
}
|
|
80798
81428
|
});
|
|
80799
|
-
var auditCommand2 =
|
|
81429
|
+
var auditCommand2 = defineCommand158({
|
|
80800
81430
|
meta: {
|
|
80801
81431
|
name: "audit",
|
|
80802
81432
|
description: `Run all GA4 admin health checks. Returns property config with playbook warnings.
|
|
@@ -80851,7 +81481,7 @@ Examples:
|
|
|
80851
81481
|
});
|
|
80852
81482
|
|
|
80853
81483
|
// src/commands/ga4/config.ts
|
|
80854
|
-
import { defineCommand as
|
|
81484
|
+
import { defineCommand as defineCommand159 } from "citty";
|
|
80855
81485
|
|
|
80856
81486
|
// src/commands/ga4/shared.ts
|
|
80857
81487
|
import { readFileSync as readFileSync20 } from "fs";
|
|
@@ -81050,7 +81680,7 @@ function configHints(config) {
|
|
|
81050
81680
|
}
|
|
81051
81681
|
return hints2;
|
|
81052
81682
|
}
|
|
81053
|
-
var configCommand =
|
|
81683
|
+
var configCommand = defineCommand159({
|
|
81054
81684
|
meta: {
|
|
81055
81685
|
name: "config",
|
|
81056
81686
|
description: `Read how the property is configured to measure \u2014 key events, custom definitions, custom events, retention
|
|
@@ -81082,7 +81712,7 @@ Examples:
|
|
|
81082
81712
|
});
|
|
81083
81713
|
|
|
81084
81714
|
// src/commands/ga4/draft.ts
|
|
81085
|
-
import { defineCommand as
|
|
81715
|
+
import { defineCommand as defineCommand160 } from "citty";
|
|
81086
81716
|
registerSchema({
|
|
81087
81717
|
command: "ga4.draft",
|
|
81088
81718
|
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.",
|
|
@@ -81091,13 +81721,13 @@ registerSchema({
|
|
|
81091
81721
|
chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
|
|
81092
81722
|
}
|
|
81093
81723
|
});
|
|
81094
|
-
var draftCommand5 =
|
|
81724
|
+
var draftCommand5 = defineCommand160({
|
|
81095
81725
|
meta: {
|
|
81096
81726
|
name: "draft",
|
|
81097
81727
|
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."
|
|
81098
81728
|
},
|
|
81099
81729
|
subCommands: {
|
|
81100
|
-
list:
|
|
81730
|
+
list: defineCommand160({
|
|
81101
81731
|
meta: { name: "list", description: "Review everything staged on this chat (--json for the raw envelope)" },
|
|
81102
81732
|
args: {
|
|
81103
81733
|
json: { type: "boolean", description: "Print the raw JSON envelope", required: false },
|
|
@@ -81107,7 +81737,7 @@ var draftCommand5 = defineCommand158({
|
|
|
81107
81737
|
await draftList(args8.json === true, args8.chat);
|
|
81108
81738
|
}
|
|
81109
81739
|
}),
|
|
81110
|
-
show:
|
|
81740
|
+
show: defineCommand160({
|
|
81111
81741
|
meta: {
|
|
81112
81742
|
name: "show",
|
|
81113
81743
|
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)."
|
|
@@ -81124,7 +81754,7 @@ var draftCommand5 = defineCommand158({
|
|
|
81124
81754
|
);
|
|
81125
81755
|
}
|
|
81126
81756
|
}),
|
|
81127
|
-
amend:
|
|
81757
|
+
amend: defineCommand160({
|
|
81128
81758
|
meta: {
|
|
81129
81759
|
name: "amend",
|
|
81130
81760
|
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."
|
|
@@ -81141,7 +81771,7 @@ var draftCommand5 = defineCommand158({
|
|
|
81141
81771
|
});
|
|
81142
81772
|
}
|
|
81143
81773
|
}),
|
|
81144
|
-
remove:
|
|
81774
|
+
remove: defineCommand160({
|
|
81145
81775
|
meta: { name: "remove", description: "Remove one staged change" },
|
|
81146
81776
|
args: { ref: { type: "positional", description: "Staged ref or target id", required: false } },
|
|
81147
81777
|
run: async ({ args: args8 }) => {
|
|
@@ -81150,7 +81780,7 @@ var draftCommand5 = defineCommand158({
|
|
|
81150
81780
|
});
|
|
81151
81781
|
}
|
|
81152
81782
|
}),
|
|
81153
|
-
clear:
|
|
81783
|
+
clear: defineCommand160({
|
|
81154
81784
|
meta: { name: "clear", description: "Discard all Google Analytics changes staged on this chat" },
|
|
81155
81785
|
run: async () => {
|
|
81156
81786
|
await draftAction2("/api/ga4/draft/clear", {});
|
|
@@ -81160,7 +81790,7 @@ var draftCommand5 = defineCommand158({
|
|
|
81160
81790
|
});
|
|
81161
81791
|
|
|
81162
81792
|
// src/commands/ga4/properties.ts
|
|
81163
|
-
import { defineCommand as
|
|
81793
|
+
import { defineCommand as defineCommand161 } from "citty";
|
|
81164
81794
|
registerSchema({
|
|
81165
81795
|
command: "ga4.properties",
|
|
81166
81796
|
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.",
|
|
@@ -81176,7 +81806,7 @@ function propertyHints(properties) {
|
|
|
81176
81806
|
resources: properties.map((property) => ({ id: property.externalId, label: property.name }))
|
|
81177
81807
|
});
|
|
81178
81808
|
}
|
|
81179
|
-
var propertiesCommand =
|
|
81809
|
+
var propertiesCommand = defineCommand161({
|
|
81180
81810
|
meta: {
|
|
81181
81811
|
name: "properties",
|
|
81182
81812
|
description: `List accessible GA4 properties.
|
|
@@ -81226,7 +81856,7 @@ Examples:
|
|
|
81226
81856
|
// src/commands/ga4/query.ts
|
|
81227
81857
|
import { appendFileSync as appendFileSync2, existsSync as existsSync10, readFileSync as readFileSync21, writeFileSync as writeFileSync4 } from "fs";
|
|
81228
81858
|
import { resolve as resolve2 } from "path";
|
|
81229
|
-
import { defineCommand as
|
|
81859
|
+
import { defineCommand as defineCommand162 } from "citty";
|
|
81230
81860
|
|
|
81231
81861
|
// src/commands/ga4/presets.ts
|
|
81232
81862
|
var GA4_PRESETS = [
|
|
@@ -81361,7 +81991,7 @@ function handleError6(err) {
|
|
|
81361
81991
|
});
|
|
81362
81992
|
process.exit(1);
|
|
81363
81993
|
}
|
|
81364
|
-
var queryCommand2 =
|
|
81994
|
+
var queryCommand2 = defineCommand162({
|
|
81365
81995
|
meta: {
|
|
81366
81996
|
name: "query",
|
|
81367
81997
|
description: `Run GA4 Data API reports. Preset-first with free-form escape hatch.
|
|
@@ -81432,7 +82062,7 @@ Free-form (escape hatch):
|
|
|
81432
82062
|
});
|
|
81433
82063
|
|
|
81434
82064
|
// src/commands/ga4/write-commands.ts
|
|
81435
|
-
import { defineCommand as
|
|
82065
|
+
import { defineCommand as defineCommand163 } from "citty";
|
|
81436
82066
|
var PROPERTY_ARG_DESCRIPTION = "GA4 property id (optional only when one property is connected \u2014 run `baker ga4 properties`)";
|
|
81437
82067
|
var propertyArg = { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false };
|
|
81438
82068
|
function createJsonDescription(noun) {
|
|
@@ -81450,7 +82080,7 @@ registerSchema({
|
|
|
81450
82080
|
"property-id": { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false }
|
|
81451
82081
|
}
|
|
81452
82082
|
});
|
|
81453
|
-
var keyEventCommand =
|
|
82083
|
+
var keyEventCommand = defineCommand163({
|
|
81454
82084
|
meta: {
|
|
81455
82085
|
name: "key-event",
|
|
81456
82086
|
description: `Stage key-event (conversion) changes
|
|
@@ -81463,7 +82093,7 @@ Examples:
|
|
|
81463
82093
|
baker ga4 key-event delete 4185`
|
|
81464
82094
|
},
|
|
81465
82095
|
subCommands: {
|
|
81466
|
-
create:
|
|
82096
|
+
create: defineCommand163({
|
|
81467
82097
|
meta: {
|
|
81468
82098
|
name: "create",
|
|
81469
82099
|
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."
|
|
@@ -81484,7 +82114,7 @@ Examples:
|
|
|
81484
82114
|
);
|
|
81485
82115
|
}
|
|
81486
82116
|
}),
|
|
81487
|
-
update:
|
|
82117
|
+
update: defineCommand163({
|
|
81488
82118
|
meta: {
|
|
81489
82119
|
name: "update",
|
|
81490
82120
|
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."
|
|
@@ -81504,7 +82134,7 @@ Examples:
|
|
|
81504
82134
|
});
|
|
81505
82135
|
}
|
|
81506
82136
|
}),
|
|
81507
|
-
delete:
|
|
82137
|
+
delete: defineCommand163({
|
|
81508
82138
|
meta: {
|
|
81509
82139
|
name: "delete",
|
|
81510
82140
|
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."
|
|
@@ -81552,7 +82182,7 @@ for (const { kind, noun, createHint } of DEFINITIONS) {
|
|
|
81552
82182
|
}
|
|
81553
82183
|
function definitionCommand(definition) {
|
|
81554
82184
|
const { command, kind, noun, example } = definition;
|
|
81555
|
-
return
|
|
82185
|
+
return defineCommand163({
|
|
81556
82186
|
meta: {
|
|
81557
82187
|
name: command,
|
|
81558
82188
|
description: `Stage ${noun} changes
|
|
@@ -81564,7 +82194,7 @@ Examples:
|
|
|
81564
82194
|
baker ga4 ${command} archive 12`
|
|
81565
82195
|
},
|
|
81566
82196
|
subCommands: {
|
|
81567
|
-
create:
|
|
82197
|
+
create: defineCommand163({
|
|
81568
82198
|
meta: { name: "create", description: `Stage a new ${noun} (or a JSON array of them, staged together)` },
|
|
81569
82199
|
args: {
|
|
81570
82200
|
json: { type: "string", description: createJsonDescription(noun), required: false },
|
|
@@ -81582,7 +82212,7 @@ Examples:
|
|
|
81582
82212
|
);
|
|
81583
82213
|
}
|
|
81584
82214
|
}),
|
|
81585
|
-
update:
|
|
82215
|
+
update: defineCommand163({
|
|
81586
82216
|
meta: {
|
|
81587
82217
|
name: "update",
|
|
81588
82218
|
description: `Stage a change to an existing ${noun} (pass its id). The parameter name and scope cannot change \u2014 archive and recreate for that.`
|
|
@@ -81602,7 +82232,7 @@ Examples:
|
|
|
81602
82232
|
});
|
|
81603
82233
|
}
|
|
81604
82234
|
}),
|
|
81605
|
-
archive:
|
|
82235
|
+
archive: defineCommand163({
|
|
81606
82236
|
meta: {
|
|
81607
82237
|
name: "archive",
|
|
81608
82238
|
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.`
|
|
@@ -81647,7 +82277,7 @@ var dataStreamArg = {
|
|
|
81647
82277
|
function withStream(args8) {
|
|
81648
82278
|
return typeof args8["data-stream"] === "string" ? { dataStream: args8["data-stream"] } : {};
|
|
81649
82279
|
}
|
|
81650
|
-
var customEventCommand =
|
|
82280
|
+
var customEventCommand = defineCommand163({
|
|
81651
82281
|
meta: {
|
|
81652
82282
|
name: "custom-event",
|
|
81653
82283
|
description: `Stage custom events \u2014 new events built from events the site already sends
|
|
@@ -81658,7 +82288,7 @@ Examples:
|
|
|
81658
82288
|
baker ga4 custom-event delete 7`
|
|
81659
82289
|
},
|
|
81660
82290
|
subCommands: {
|
|
81661
|
-
create:
|
|
82291
|
+
create: defineCommand163({
|
|
81662
82292
|
meta: {
|
|
81663
82293
|
name: "create",
|
|
81664
82294
|
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."
|
|
@@ -81681,7 +82311,7 @@ Examples:
|
|
|
81681
82311
|
);
|
|
81682
82312
|
}
|
|
81683
82313
|
}),
|
|
81684
|
-
update:
|
|
82314
|
+
update: defineCommand163({
|
|
81685
82315
|
meta: { name: "update", description: "Stage a change to an existing custom event (pass its id)" },
|
|
81686
82316
|
args: {
|
|
81687
82317
|
id: { type: "positional", description: "Custom event rule id", required: false },
|
|
@@ -81700,7 +82330,7 @@ Examples:
|
|
|
81700
82330
|
});
|
|
81701
82331
|
}
|
|
81702
82332
|
}),
|
|
81703
|
-
delete:
|
|
82333
|
+
delete: defineCommand163({
|
|
81704
82334
|
meta: {
|
|
81705
82335
|
name: "delete",
|
|
81706
82336
|
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."
|
|
@@ -81755,7 +82385,7 @@ function booleanArg(input, flag) {
|
|
|
81755
82385
|
if (input === "false") return false;
|
|
81756
82386
|
return failValidation3(`--${flag} must be true or false`);
|
|
81757
82387
|
}
|
|
81758
|
-
var dataRetentionCommand =
|
|
82388
|
+
var dataRetentionCommand = defineCommand163({
|
|
81759
82389
|
meta: {
|
|
81760
82390
|
name: "data-retention",
|
|
81761
82391
|
description: `Stage a change to how long Google Analytics keeps data
|
|
@@ -81765,7 +82395,7 @@ Examples:
|
|
|
81765
82395
|
baker ga4 data-retention set --event-data 14 --user-data 14 --reset-on-activity true`
|
|
81766
82396
|
},
|
|
81767
82397
|
subCommands: {
|
|
81768
|
-
set:
|
|
82398
|
+
set: defineCommand163({
|
|
81769
82399
|
meta: { name: "set", description: "Stage the retention window (months)" },
|
|
81770
82400
|
args: {
|
|
81771
82401
|
"event-data": { type: "string", description: "2, 14, 26, 38 or 50", required: false },
|
|
@@ -81801,7 +82431,7 @@ registerSchema({
|
|
|
81801
82431
|
"property-id": { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false }
|
|
81802
82432
|
}
|
|
81803
82433
|
});
|
|
81804
|
-
var audienceCommand =
|
|
82434
|
+
var audienceCommand = defineCommand163({
|
|
81805
82435
|
meta: {
|
|
81806
82436
|
name: "audience",
|
|
81807
82437
|
description: `Stage audience changes (saved groups of users, for retargeting and analysis)
|
|
@@ -81833,7 +82463,7 @@ Examples:
|
|
|
81833
82463
|
baker ga4 audience archive 8813`
|
|
81834
82464
|
},
|
|
81835
82465
|
subCommands: {
|
|
81836
|
-
create:
|
|
82466
|
+
create: defineCommand163({
|
|
81837
82467
|
meta: { name: "create", description: createJsonDescription("audience") },
|
|
81838
82468
|
args: {
|
|
81839
82469
|
json: { type: "string", description: createJsonDescription("audience"), required: false },
|
|
@@ -81851,7 +82481,7 @@ Examples:
|
|
|
81851
82481
|
);
|
|
81852
82482
|
}
|
|
81853
82483
|
}),
|
|
81854
|
-
update:
|
|
82484
|
+
update: defineCommand163({
|
|
81855
82485
|
meta: {
|
|
81856
82486
|
name: "update",
|
|
81857
82487
|
description: "Stage a new name or description (pass the audience id). Who is in it cannot be changed."
|
|
@@ -81872,7 +82502,7 @@ Examples:
|
|
|
81872
82502
|
});
|
|
81873
82503
|
}
|
|
81874
82504
|
}),
|
|
81875
|
-
archive:
|
|
82505
|
+
archive: defineCommand163({
|
|
81876
82506
|
meta: {
|
|
81877
82507
|
name: "archive",
|
|
81878
82508
|
description: "Stage retiring an audience. Cannot be undone \u2014 the users it gathered do not come back."
|
|
@@ -81901,7 +82531,7 @@ registerSchema({
|
|
|
81901
82531
|
"property-id": { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false }
|
|
81902
82532
|
}
|
|
81903
82533
|
});
|
|
81904
|
-
var propertyCommand =
|
|
82534
|
+
var propertyCommand = defineCommand163({
|
|
81905
82535
|
meta: {
|
|
81906
82536
|
name: "property",
|
|
81907
82537
|
description: `Stage a change to the property's own settings
|
|
@@ -81911,7 +82541,7 @@ Examples:
|
|
|
81911
82541
|
baker ga4 property set --name "Acme \u2014 Web" --industry REAL_ESTATE`
|
|
81912
82542
|
},
|
|
81913
82543
|
subCommands: {
|
|
81914
|
-
set:
|
|
82544
|
+
set: defineCommand163({
|
|
81915
82545
|
meta: { name: "set", description: "Stage the property name and/or industry category" },
|
|
81916
82546
|
args: {
|
|
81917
82547
|
name: { type: "string", description: "New property display name", required: false },
|
|
@@ -81951,7 +82581,7 @@ registerSchema({
|
|
|
81951
82581
|
"property-id": { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false }
|
|
81952
82582
|
}
|
|
81953
82583
|
});
|
|
81954
|
-
var adsLinkCommand =
|
|
82584
|
+
var adsLinkCommand = defineCommand163({
|
|
81955
82585
|
meta: {
|
|
81956
82586
|
name: "ads-link",
|
|
81957
82587
|
description: `Stage linking this property to a Google Ads account
|
|
@@ -81966,7 +82596,7 @@ Examples:
|
|
|
81966
82596
|
baker ga4 ads-link delete L1234`
|
|
81967
82597
|
},
|
|
81968
82598
|
subCommands: {
|
|
81969
|
-
create:
|
|
82599
|
+
create: defineCommand163({
|
|
81970
82600
|
meta: { name: "create", description: "Stage linking the property to a Google Ads account" },
|
|
81971
82601
|
args: {
|
|
81972
82602
|
"customer-id": { type: "string", description: "Google Ads customer id (123-456-7890)", required: false },
|
|
@@ -81985,7 +82615,7 @@ Examples:
|
|
|
81985
82615
|
await stageOp3({ kind: "ga4.googleAdsLink.create", payload, ...withProperty(args8) });
|
|
81986
82616
|
}
|
|
81987
82617
|
}),
|
|
81988
|
-
update:
|
|
82618
|
+
update: defineCommand163({
|
|
81989
82619
|
meta: {
|
|
81990
82620
|
name: "update",
|
|
81991
82621
|
description: "Stage the ads-personalisation setting on an existing link (pass its id)"
|
|
@@ -82007,7 +82637,7 @@ Examples:
|
|
|
82007
82637
|
});
|
|
82008
82638
|
}
|
|
82009
82639
|
}),
|
|
82010
|
-
delete:
|
|
82640
|
+
delete: defineCommand163({
|
|
82011
82641
|
meta: {
|
|
82012
82642
|
name: "delete",
|
|
82013
82643
|
description: "Stage unlinking. Stops conversion imports and strands every audience on this property."
|
|
@@ -82058,7 +82688,7 @@ var MEASUREMENT_FLAGS = {
|
|
|
82058
82688
|
"page-changes": "pageChangesEnabled",
|
|
82059
82689
|
"form-interactions": "formInteractionsEnabled"
|
|
82060
82690
|
};
|
|
82061
|
-
var enhancedMeasurementCommand =
|
|
82691
|
+
var enhancedMeasurementCommand = defineCommand163({
|
|
82062
82692
|
meta: {
|
|
82063
82693
|
name: "enhanced-measurement",
|
|
82064
82694
|
description: `Stage the automatic events GA4 collects on a website stream
|
|
@@ -82072,7 +82702,7 @@ Examples:
|
|
|
82072
82702
|
baker ga4 enhanced-measurement set --video false`
|
|
82073
82703
|
},
|
|
82074
82704
|
subCommands: {
|
|
82075
|
-
set:
|
|
82705
|
+
set: defineCommand163({
|
|
82076
82706
|
meta: { name: "set", description: "Stage which automatic events the website stream collects" },
|
|
82077
82707
|
args: {
|
|
82078
82708
|
scrolls: { type: "string", description: "true|false", required: false },
|
|
@@ -82115,7 +82745,7 @@ Examples:
|
|
|
82115
82745
|
});
|
|
82116
82746
|
|
|
82117
82747
|
// src/commands/ga4/index.ts
|
|
82118
|
-
var ga4Command =
|
|
82748
|
+
var ga4Command = defineCommand164({
|
|
82119
82749
|
meta: {
|
|
82120
82750
|
name: "ga4",
|
|
82121
82751
|
description: `Google Analytics 4. Report on a property, audit its config, and change what it measures.
|
|
@@ -82164,12 +82794,12 @@ Full guide: __tooling__/docs/tools/baker/ga4.md`
|
|
|
82164
82794
|
});
|
|
82165
82795
|
|
|
82166
82796
|
// src/commands/gsc/index.ts
|
|
82167
|
-
import { defineCommand as
|
|
82797
|
+
import { defineCommand as defineCommand168 } from "citty";
|
|
82168
82798
|
|
|
82169
82799
|
// src/commands/gsc/query.ts
|
|
82170
82800
|
import { appendFileSync as appendFileSync3, existsSync as existsSync11, readFileSync as readFileSync22, writeFileSync as writeFileSync5 } from "fs";
|
|
82171
82801
|
import { resolve as resolve3 } from "path";
|
|
82172
|
-
import { defineCommand as
|
|
82802
|
+
import { defineCommand as defineCommand165 } from "citty";
|
|
82173
82803
|
|
|
82174
82804
|
// src/commands/gsc/presets.ts
|
|
82175
82805
|
var GSC_PRESETS = [
|
|
@@ -82363,7 +82993,7 @@ function handleError7(err) {
|
|
|
82363
82993
|
});
|
|
82364
82994
|
process.exit(1);
|
|
82365
82995
|
}
|
|
82366
|
-
var queryCommand3 =
|
|
82996
|
+
var queryCommand3 = defineCommand165({
|
|
82367
82997
|
meta: {
|
|
82368
82998
|
name: "query",
|
|
82369
82999
|
description: `Run GSC Search Analytics queries. Preset-first with free-form escape hatch.
|
|
@@ -82441,7 +83071,7 @@ Free-form (escape hatch):
|
|
|
82441
83071
|
});
|
|
82442
83072
|
|
|
82443
83073
|
// src/commands/gsc/sitemaps.ts
|
|
82444
|
-
import { defineCommand as
|
|
83074
|
+
import { defineCommand as defineCommand166 } from "citty";
|
|
82445
83075
|
registerSchema({
|
|
82446
83076
|
command: "gsc.sitemaps",
|
|
82447
83077
|
description: "List sitemaps for a Search Console site. Check sitemap health and errors.",
|
|
@@ -82450,7 +83080,7 @@ registerSchema({
|
|
|
82450
83080
|
"no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false }
|
|
82451
83081
|
}
|
|
82452
83082
|
});
|
|
82453
|
-
var sitemapsCommand =
|
|
83083
|
+
var sitemapsCommand = defineCommand166({
|
|
82454
83084
|
meta: {
|
|
82455
83085
|
name: "sitemaps",
|
|
82456
83086
|
description: `List sitemaps for a site. Check health and errors.
|
|
@@ -82503,7 +83133,7 @@ Examples:
|
|
|
82503
83133
|
});
|
|
82504
83134
|
|
|
82505
83135
|
// src/commands/gsc/sites.ts
|
|
82506
|
-
import { defineCommand as
|
|
83136
|
+
import { defineCommand as defineCommand167 } from "citty";
|
|
82507
83137
|
registerSchema({
|
|
82508
83138
|
command: "gsc.sites",
|
|
82509
83139
|
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.",
|
|
@@ -82519,7 +83149,7 @@ function siteHints(sites) {
|
|
|
82519
83149
|
resources: sites.map((site) => ({ id: site.siteUrl, label: site.permissionLevel }))
|
|
82520
83150
|
});
|
|
82521
83151
|
}
|
|
82522
|
-
var sitesCommand2 =
|
|
83152
|
+
var sitesCommand2 = defineCommand167({
|
|
82523
83153
|
meta: {
|
|
82524
83154
|
name: "sites",
|
|
82525
83155
|
description: `List verified Search Console sites.
|
|
@@ -82567,7 +83197,7 @@ Examples:
|
|
|
82567
83197
|
});
|
|
82568
83198
|
|
|
82569
83199
|
// src/commands/gsc/index.ts
|
|
82570
|
-
var gscCommand =
|
|
83200
|
+
var gscCommand = defineCommand168({
|
|
82571
83201
|
meta: {
|
|
82572
83202
|
name: "gsc",
|
|
82573
83203
|
description: `Google Search Console commands. PPC-SEO arbitrage, brand halo analysis, negative keyword discovery.
|
|
@@ -82591,7 +83221,7 @@ Full guide: __tooling__/docs/tools/baker/gsc.md`
|
|
|
82591
83221
|
});
|
|
82592
83222
|
|
|
82593
83223
|
// src/commands/history/index.ts
|
|
82594
|
-
import { defineCommand as
|
|
83224
|
+
import { defineCommand as defineCommand169 } from "citty";
|
|
82595
83225
|
registerSchema({
|
|
82596
83226
|
command: "history.list",
|
|
82597
83227
|
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.",
|
|
@@ -82646,7 +83276,7 @@ function parseBoundedInt2(raw, name, min, max) {
|
|
|
82646
83276
|
}
|
|
82647
83277
|
return value2;
|
|
82648
83278
|
}
|
|
82649
|
-
var listCommand16 =
|
|
83279
|
+
var listCommand16 = defineCommand169({
|
|
82650
83280
|
meta: {
|
|
82651
83281
|
name: "list",
|
|
82652
83282
|
description: "List recent account changes (unified audit log), newest first."
|
|
@@ -82692,7 +83322,7 @@ var listCommand16 = defineCommand167({
|
|
|
82692
83322
|
}
|
|
82693
83323
|
}
|
|
82694
83324
|
});
|
|
82695
|
-
var historyCommand3 =
|
|
83325
|
+
var historyCommand3 = defineCommand169({
|
|
82696
83326
|
meta: {
|
|
82697
83327
|
name: "history",
|
|
82698
83328
|
description: `Unified account history (audit log): what changed, who did it, and when.
|
|
@@ -82702,7 +83332,7 @@ Full guide: __tooling__/docs/tools/baker/history.md`
|
|
|
82702
83332
|
});
|
|
82703
83333
|
|
|
82704
83334
|
// src/commands/hubspot/index.ts
|
|
82705
|
-
import { defineCommand as
|
|
83335
|
+
import { defineCommand as defineCommand170 } from "citty";
|
|
82706
83336
|
var EMBED_TYPES = ["legacy", "v4", "unknown"];
|
|
82707
83337
|
function failNotConnected(err) {
|
|
82708
83338
|
const refusal = err instanceof ApiError ? hubspotRefusal(err.code, err.message) : null;
|
|
@@ -82843,7 +83473,7 @@ registerSchema({
|
|
|
82843
83473
|
}
|
|
82844
83474
|
}
|
|
82845
83475
|
});
|
|
82846
|
-
var formsListCommand =
|
|
83476
|
+
var formsListCommand = defineCommand170({
|
|
82847
83477
|
meta: {
|
|
82848
83478
|
name: "list",
|
|
82849
83479
|
description: "List HubSpot forms with embed type and post-submit action. Example: baker hubspot forms list --redirecting-only"
|
|
@@ -82925,7 +83555,7 @@ function formNodeHints(external) {
|
|
|
82925
83555
|
] : []
|
|
82926
83556
|
];
|
|
82927
83557
|
}
|
|
82928
|
-
var formsViewCommand =
|
|
83558
|
+
var formsViewCommand = defineCommand170({
|
|
82929
83559
|
meta: {
|
|
82930
83560
|
name: "view",
|
|
82931
83561
|
description: "Show one HubSpot form's fields and configuration. Example: baker hubspot forms view 1a2b3c"
|
|
@@ -82957,7 +83587,7 @@ var formsViewCommand = defineCommand168({
|
|
|
82957
83587
|
}
|
|
82958
83588
|
}
|
|
82959
83589
|
});
|
|
82960
|
-
var meetingsListCommand =
|
|
83590
|
+
var meetingsListCommand = defineCommand170({
|
|
82961
83591
|
meta: {
|
|
82962
83592
|
name: "list",
|
|
82963
83593
|
description: "List HubSpot meeting links (calendars). Example: baker hubspot meetings list"
|
|
@@ -82999,7 +83629,7 @@ var meetingsListCommand = defineCommand168({
|
|
|
82999
83629
|
}
|
|
83000
83630
|
}
|
|
83001
83631
|
});
|
|
83002
|
-
var meetingsViewCommand =
|
|
83632
|
+
var meetingsViewCommand = defineCommand170({
|
|
83003
83633
|
meta: {
|
|
83004
83634
|
name: "view",
|
|
83005
83635
|
description: "Show one HubSpot meeting link's booking fields. Example: baker hubspot meetings view discovery-call"
|
|
@@ -83043,7 +83673,7 @@ var meetingsViewCommand = defineCommand168({
|
|
|
83043
83673
|
}
|
|
83044
83674
|
}
|
|
83045
83675
|
});
|
|
83046
|
-
var formsSubmissionsCommand =
|
|
83676
|
+
var formsSubmissionsCommand = defineCommand170({
|
|
83047
83677
|
meta: {
|
|
83048
83678
|
name: "submissions",
|
|
83049
83679
|
description: "How many leads a form received, and when. Example: baker hubspot forms submissions <formId> --days 30"
|
|
@@ -83092,7 +83722,7 @@ var formsSubmissionsCommand = defineCommand168({
|
|
|
83092
83722
|
}
|
|
83093
83723
|
}
|
|
83094
83724
|
});
|
|
83095
|
-
var workflowsListCommand =
|
|
83725
|
+
var workflowsListCommand = defineCommand170({
|
|
83096
83726
|
meta: {
|
|
83097
83727
|
name: "list",
|
|
83098
83728
|
description: "List HubSpot workflows. Example: baker hubspot workflows list --enabled-only"
|
|
@@ -83157,7 +83787,7 @@ function workflowViewHints(workflow) {
|
|
|
83157
83787
|
}
|
|
83158
83788
|
return hints2;
|
|
83159
83789
|
}
|
|
83160
|
-
var workflowsViewCommand =
|
|
83790
|
+
var workflowsViewCommand = defineCommand170({
|
|
83161
83791
|
meta: {
|
|
83162
83792
|
name: "view",
|
|
83163
83793
|
description: "Read one workflow's real configuration \u2014 enrolment, branches in order, and what each step writes. Example: baker hubspot workflows view 121183594 --full"
|
|
@@ -83184,7 +83814,7 @@ var workflowsViewCommand = defineCommand168({
|
|
|
83184
83814
|
}
|
|
83185
83815
|
}
|
|
83186
83816
|
});
|
|
83187
|
-
var pipelinesListCommand =
|
|
83817
|
+
var pipelinesListCommand = defineCommand170({
|
|
83188
83818
|
meta: {
|
|
83189
83819
|
name: "list",
|
|
83190
83820
|
description: "List HubSpot deal pipelines and their stages. Example: baker hubspot pipelines list"
|
|
@@ -83220,7 +83850,7 @@ var OBJECT_WORDS = {
|
|
|
83220
83850
|
};
|
|
83221
83851
|
function propertiesCommand2(object) {
|
|
83222
83852
|
const words2 = OBJECT_WORDS[object];
|
|
83223
|
-
return
|
|
83853
|
+
return defineCommand170({
|
|
83224
83854
|
meta: {
|
|
83225
83855
|
name: "properties",
|
|
83226
83856
|
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`
|
|
@@ -83245,7 +83875,7 @@ function propertiesCommand2(object) {
|
|
|
83245
83875
|
});
|
|
83246
83876
|
}
|
|
83247
83877
|
var contactsPropertiesCommand = propertiesCommand2("contact");
|
|
83248
|
-
var contactsSummaryCommand =
|
|
83878
|
+
var contactsSummaryCommand = defineCommand170({
|
|
83249
83879
|
meta: {
|
|
83250
83880
|
name: "summary",
|
|
83251
83881
|
description: "Whether recent leads are being worked, as counts. Example: baker hubspot contacts summary --days 30"
|
|
@@ -83315,7 +83945,7 @@ function contactLookupHints(data) {
|
|
|
83315
83945
|
}
|
|
83316
83946
|
return hints2;
|
|
83317
83947
|
}
|
|
83318
|
-
var contactsLookupCommand =
|
|
83948
|
+
var contactsLookupCommand = defineCommand170({
|
|
83319
83949
|
meta: {
|
|
83320
83950
|
name: "lookup",
|
|
83321
83951
|
description: "Find one contact by email and see whether it was worked. Example: baker hubspot contacts lookup a@b.com"
|
|
@@ -83341,7 +83971,7 @@ var contactsLookupCommand = defineCommand168({
|
|
|
83341
83971
|
});
|
|
83342
83972
|
function fieldsCommand(object) {
|
|
83343
83973
|
const words2 = OBJECT_WORDS[object];
|
|
83344
|
-
return
|
|
83974
|
+
return defineCommand170({
|
|
83345
83975
|
meta: {
|
|
83346
83976
|
name: "fields",
|
|
83347
83977
|
description: `List every property a HubSpot event on a ${object} can read into its rows, with HubSpot's type${object === "contact" ? "" : ` \u2014 the ${object}'s own, and its contact's as contact.<name>`}. Example: ${words2.command} fields`
|
|
@@ -83365,21 +83995,21 @@ function fieldsCommand(object) {
|
|
|
83365
83995
|
});
|
|
83366
83996
|
}
|
|
83367
83997
|
var contactsFieldsCommand = fieldsCommand("contact");
|
|
83368
|
-
var dealsCommand =
|
|
83998
|
+
var dealsCommand = defineCommand170({
|
|
83369
83999
|
meta: {
|
|
83370
84000
|
name: "deals",
|
|
83371
84001
|
description: "Deals on the connected HubSpot account: what a HubSpot event on a deal can watch (`properties`) and read (`fields`)."
|
|
83372
84002
|
},
|
|
83373
84003
|
subCommands: { properties: propertiesCommand2("deal"), fields: fieldsCommand("deal") }
|
|
83374
84004
|
});
|
|
83375
|
-
var leadsCommand3 =
|
|
84005
|
+
var leadsCommand3 = defineCommand170({
|
|
83376
84006
|
meta: {
|
|
83377
84007
|
name: "leads",
|
|
83378
84008
|
description: "Leads on the connected HubSpot account: what a HubSpot event on a lead can watch (`properties`) and read (`fields`). Start here for qualification and disqualification \u2014 a lead's stage is where HubSpot records both, and `hs_pipeline_stage` lists the account's own stages with their labels. Needs Sales Hub Professional or Enterprise; on any other plan the account has no leads to read."
|
|
83379
84009
|
},
|
|
83380
84010
|
subCommands: { properties: propertiesCommand2("lead"), fields: fieldsCommand("lead") }
|
|
83381
84011
|
});
|
|
83382
|
-
var contactsCommand =
|
|
84012
|
+
var contactsCommand = defineCommand170({
|
|
83383
84013
|
meta: { name: "contacts", description: "Contacts on the connected HubSpot account." },
|
|
83384
84014
|
subCommands: {
|
|
83385
84015
|
summary: contactsSummaryCommand,
|
|
@@ -83388,23 +84018,23 @@ var contactsCommand = defineCommand168({
|
|
|
83388
84018
|
fields: contactsFieldsCommand
|
|
83389
84019
|
}
|
|
83390
84020
|
});
|
|
83391
|
-
var formsCommand =
|
|
84021
|
+
var formsCommand = defineCommand170({
|
|
83392
84022
|
meta: { name: "forms", description: "HubSpot forms on the connected account." },
|
|
83393
84023
|
subCommands: { list: formsListCommand, view: formsViewCommand, submissions: formsSubmissionsCommand }
|
|
83394
84024
|
});
|
|
83395
|
-
var workflowsCommand =
|
|
84025
|
+
var workflowsCommand = defineCommand170({
|
|
83396
84026
|
meta: { name: "workflows", description: "HubSpot workflows on the connected account." },
|
|
83397
84027
|
subCommands: { list: workflowsListCommand, view: workflowsViewCommand }
|
|
83398
84028
|
});
|
|
83399
|
-
var pipelinesCommand =
|
|
84029
|
+
var pipelinesCommand = defineCommand170({
|
|
83400
84030
|
meta: { name: "pipelines", description: "HubSpot deal pipelines on the connected account." },
|
|
83401
84031
|
subCommands: { list: pipelinesListCommand }
|
|
83402
84032
|
});
|
|
83403
|
-
var meetingsCommand =
|
|
84033
|
+
var meetingsCommand = defineCommand170({
|
|
83404
84034
|
meta: { name: "meetings", description: "HubSpot meeting links (calendars) on the connected account." },
|
|
83405
84035
|
subCommands: { list: meetingsListCommand, view: meetingsViewCommand }
|
|
83406
84036
|
});
|
|
83407
|
-
var hubspotCommand =
|
|
84037
|
+
var hubspotCommand = defineCommand170({
|
|
83408
84038
|
meta: {
|
|
83409
84039
|
name: "hubspot",
|
|
83410
84040
|
description: `Read the connected HubSpot account \u2014 forms, the leads they received, workflows, deal pipelines and
|
|
@@ -83446,10 +84076,10 @@ Full guide: __tooling__/docs/tools/baker/hubspot.md`
|
|
|
83446
84076
|
});
|
|
83447
84077
|
|
|
83448
84078
|
// src/commands/images/index.ts
|
|
83449
|
-
import { defineCommand as
|
|
84079
|
+
import { defineCommand as defineCommand197 } from "citty";
|
|
83450
84080
|
|
|
83451
84081
|
// src/commands/images/crop.ts
|
|
83452
|
-
import { defineCommand as
|
|
84082
|
+
import { defineCommand as defineCommand171 } from "citty";
|
|
83453
84083
|
|
|
83454
84084
|
// src/lib/image/crop-sprite.ts
|
|
83455
84085
|
import sharp3 from "sharp";
|
|
@@ -83571,7 +84201,7 @@ function emitError2(err) {
|
|
|
83571
84201
|
}
|
|
83572
84202
|
process.exit(1);
|
|
83573
84203
|
}
|
|
83574
|
-
var cropCommand =
|
|
84204
|
+
var cropCommand = defineCommand171({
|
|
83575
84205
|
meta: {
|
|
83576
84206
|
name: "crop",
|
|
83577
84207
|
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"
|
|
@@ -83607,7 +84237,7 @@ var cropCommand = defineCommand169({
|
|
|
83607
84237
|
});
|
|
83608
84238
|
|
|
83609
84239
|
// src/commands/images/delete.ts
|
|
83610
|
-
import { defineCommand as
|
|
84240
|
+
import { defineCommand as defineCommand172 } from "citty";
|
|
83611
84241
|
registerSchema({
|
|
83612
84242
|
command: "images.delete",
|
|
83613
84243
|
description: "Delete an image by ID",
|
|
@@ -83621,7 +84251,7 @@ registerSchema({
|
|
|
83621
84251
|
}
|
|
83622
84252
|
}
|
|
83623
84253
|
});
|
|
83624
|
-
var deleteCommand2 =
|
|
84254
|
+
var deleteCommand2 = defineCommand172({
|
|
83625
84255
|
meta: {
|
|
83626
84256
|
name: "delete",
|
|
83627
84257
|
description: "Delete an image by ID. Use --dry-run to preview. Example: baker images delete j571abc123 --dry-run"
|
|
@@ -83662,7 +84292,7 @@ var deleteCommand2 = defineCommand170({
|
|
|
83662
84292
|
});
|
|
83663
84293
|
|
|
83664
84294
|
// src/commands/images/describe.ts
|
|
83665
|
-
import { defineCommand as
|
|
84295
|
+
import { defineCommand as defineCommand173 } from "citty";
|
|
83666
84296
|
|
|
83667
84297
|
// src/lib/describeArgs.ts
|
|
83668
84298
|
function describeTags(rawArgs, parsed) {
|
|
@@ -83713,7 +84343,7 @@ registerSchema({
|
|
|
83713
84343
|
full: { type: "boolean", description: "Return the whole library row, not just what changed", required: false }
|
|
83714
84344
|
}
|
|
83715
84345
|
});
|
|
83716
|
-
var describeCommand =
|
|
84346
|
+
var describeCommand = defineCommand173({
|
|
83717
84347
|
meta: {
|
|
83718
84348
|
name: "describe",
|
|
83719
84349
|
description: `Correct what the library says an image is. Only the fields you pass change; the rest keep their current values.
|
|
@@ -83771,7 +84401,7 @@ Example: baker images describe j571abc123 --description "Founder speaking on sta
|
|
|
83771
84401
|
});
|
|
83772
84402
|
|
|
83773
84403
|
// src/commands/images/dimensions.ts
|
|
83774
|
-
import { defineCommand as
|
|
84404
|
+
import { defineCommand as defineCommand174 } from "citty";
|
|
83775
84405
|
|
|
83776
84406
|
// src/lib/image/dimensions.ts
|
|
83777
84407
|
import { imageSize } from "image-size";
|
|
@@ -83800,7 +84430,7 @@ registerSchema({
|
|
|
83800
84430
|
}
|
|
83801
84431
|
}
|
|
83802
84432
|
});
|
|
83803
|
-
var dimensionsCommand =
|
|
84433
|
+
var dimensionsCommand = defineCommand174({
|
|
83804
84434
|
meta: {
|
|
83805
84435
|
name: "dimensions",
|
|
83806
84436
|
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"
|
|
@@ -83856,7 +84486,7 @@ var dimensionsCommand = defineCommand172({
|
|
|
83856
84486
|
});
|
|
83857
84487
|
|
|
83858
84488
|
// src/commands/images/download.ts
|
|
83859
|
-
import { defineCommand as
|
|
84489
|
+
import { defineCommand as defineCommand175 } from "citty";
|
|
83860
84490
|
|
|
83861
84491
|
// src/commands/images/downloadPaths.ts
|
|
83862
84492
|
import { basename as basename3, extname as extname4, join as join6 } from "path";
|
|
@@ -84097,7 +84727,7 @@ function emitError3(err) {
|
|
|
84097
84727
|
writeJson({ ok: false, error: { code: "INTERNAL_ERROR", message: "Unexpected error" } });
|
|
84098
84728
|
process.exit(1);
|
|
84099
84729
|
}
|
|
84100
|
-
var downloadCommand =
|
|
84730
|
+
var downloadCommand = defineCommand175({
|
|
84101
84731
|
meta: {
|
|
84102
84732
|
name: "download",
|
|
84103
84733
|
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"
|
|
@@ -84130,7 +84760,7 @@ var downloadCommand = defineCommand173({
|
|
|
84130
84760
|
});
|
|
84131
84761
|
|
|
84132
84762
|
// src/commands/images/extract.ts
|
|
84133
|
-
import { defineCommand as
|
|
84763
|
+
import { defineCommand as defineCommand176 } from "citty";
|
|
84134
84764
|
|
|
84135
84765
|
// src/commands/images/autoIngest.ts
|
|
84136
84766
|
var AUTO_INGEST_MAX = {
|
|
@@ -84193,7 +84823,7 @@ registerSchema({
|
|
|
84193
84823
|
}
|
|
84194
84824
|
}
|
|
84195
84825
|
});
|
|
84196
|
-
var extractCommand =
|
|
84826
|
+
var extractCommand = defineCommand176({
|
|
84197
84827
|
meta: {
|
|
84198
84828
|
name: "extract",
|
|
84199
84829
|
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"
|
|
@@ -84248,7 +84878,7 @@ var extractCommand = defineCommand174({
|
|
|
84248
84878
|
});
|
|
84249
84879
|
|
|
84250
84880
|
// src/commands/images/find.ts
|
|
84251
|
-
import { defineCommand as
|
|
84881
|
+
import { defineCommand as defineCommand177 } from "citty";
|
|
84252
84882
|
|
|
84253
84883
|
// src/commands/images/providerHits.ts
|
|
84254
84884
|
function asRecord3(value2) {
|
|
@@ -84386,7 +85016,7 @@ registerSchema({
|
|
|
84386
85016
|
full: { type: "boolean", description: "Include full metadata", required: false, default: false }
|
|
84387
85017
|
}
|
|
84388
85018
|
});
|
|
84389
|
-
var findCommand =
|
|
85019
|
+
var findCommand = defineCommand177({
|
|
84390
85020
|
meta: {
|
|
84391
85021
|
name: "find",
|
|
84392
85022
|
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"
|
|
@@ -84459,7 +85089,7 @@ var findCommand = defineCommand175({
|
|
|
84459
85089
|
});
|
|
84460
85090
|
|
|
84461
85091
|
// src/commands/images/get.ts
|
|
84462
|
-
import { defineCommand as
|
|
85092
|
+
import { defineCommand as defineCommand178 } from "citty";
|
|
84463
85093
|
registerSchema({
|
|
84464
85094
|
command: "images.get",
|
|
84465
85095
|
description: "Get a single image by ID",
|
|
@@ -84467,7 +85097,7 @@ registerSchema({
|
|
|
84467
85097
|
id: { type: "string", description: "Image ID", required: true }
|
|
84468
85098
|
}
|
|
84469
85099
|
});
|
|
84470
|
-
var getCommand3 =
|
|
85100
|
+
var getCommand3 = defineCommand178({
|
|
84471
85101
|
meta: { name: "get", description: "Get a single image by ID. Example: baker images get j571abc123" },
|
|
84472
85102
|
args: {
|
|
84473
85103
|
id: { type: "positional", description: "Image ID", required: false },
|
|
@@ -84503,7 +85133,7 @@ var getCommand3 = defineCommand176({
|
|
|
84503
85133
|
});
|
|
84504
85134
|
|
|
84505
85135
|
// src/commands/images/gif.ts
|
|
84506
|
-
import { defineCommand as
|
|
85136
|
+
import { defineCommand as defineCommand179 } from "citty";
|
|
84507
85137
|
registerSchema({
|
|
84508
85138
|
command: "images.gif",
|
|
84509
85139
|
description: "Search Giphy for GIFs / reaction memes (paid social creative).",
|
|
@@ -84535,7 +85165,7 @@ registerSchema({
|
|
|
84535
85165
|
}
|
|
84536
85166
|
}
|
|
84537
85167
|
});
|
|
84538
|
-
var gifCommand =
|
|
85168
|
+
var gifCommand = defineCommand179({
|
|
84539
85169
|
meta: {
|
|
84540
85170
|
name: "gif",
|
|
84541
85171
|
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"
|
|
@@ -84582,7 +85212,7 @@ var gifCommand = defineCommand177({
|
|
|
84582
85212
|
});
|
|
84583
85213
|
|
|
84584
85214
|
// src/commands/images/google.ts
|
|
84585
|
-
import { defineCommand as
|
|
85215
|
+
import { defineCommand as defineCommand180 } from "citty";
|
|
84586
85216
|
var GOOGLE_ERROR_FIX = {
|
|
84587
85217
|
action: "use_different_resource",
|
|
84588
85218
|
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."
|
|
@@ -84622,7 +85252,7 @@ registerSchema({
|
|
|
84622
85252
|
}
|
|
84623
85253
|
}
|
|
84624
85254
|
});
|
|
84625
|
-
var googleCommand2 =
|
|
85255
|
+
var googleCommand2 = defineCommand180({
|
|
84626
85256
|
meta: {
|
|
84627
85257
|
name: "google",
|
|
84628
85258
|
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"
|
|
@@ -84695,7 +85325,7 @@ var googleCommand2 = defineCommand178({
|
|
|
84695
85325
|
});
|
|
84696
85326
|
|
|
84697
85327
|
// src/commands/images/group.ts
|
|
84698
|
-
import { defineCommand as
|
|
85328
|
+
import { defineCommand as defineCommand181 } from "citty";
|
|
84699
85329
|
|
|
84700
85330
|
// src/commands/mediaGroup.ts
|
|
84701
85331
|
async function runMediaGroupLookup(input) {
|
|
@@ -84748,7 +85378,7 @@ registerSchema({
|
|
|
84748
85378
|
"group-key": { type: "string", description: "The set key directly, when you already have it", required: false }
|
|
84749
85379
|
}
|
|
84750
85380
|
});
|
|
84751
|
-
var groupCommand =
|
|
85381
|
+
var groupCommand = defineCommand181({
|
|
84752
85382
|
meta: {
|
|
84753
85383
|
name: "group",
|
|
84754
85384
|
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>"
|
|
@@ -84768,7 +85398,7 @@ var groupCommand = defineCommand179({
|
|
|
84768
85398
|
});
|
|
84769
85399
|
|
|
84770
85400
|
// src/commands/images/icon.ts
|
|
84771
|
-
import { defineCommand as
|
|
85401
|
+
import { defineCommand as defineCommand182 } from "citty";
|
|
84772
85402
|
|
|
84773
85403
|
// src/commands/images/brandVerification.ts
|
|
84774
85404
|
function brandToken(domain) {
|
|
@@ -84865,7 +85495,7 @@ registerSchema({
|
|
|
84865
85495
|
full: { type: "boolean", description: "Include full metadata", required: false, default: false }
|
|
84866
85496
|
}
|
|
84867
85497
|
});
|
|
84868
|
-
var iconCommand =
|
|
85498
|
+
var iconCommand = defineCommand182({
|
|
84869
85499
|
meta: {
|
|
84870
85500
|
name: "icon",
|
|
84871
85501
|
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'"
|
|
@@ -84935,7 +85565,7 @@ var iconCommand = defineCommand180({
|
|
|
84935
85565
|
});
|
|
84936
85566
|
|
|
84937
85567
|
// src/commands/images/ingest.ts
|
|
84938
|
-
import { defineCommand as
|
|
85568
|
+
import { defineCommand as defineCommand183 } from "citty";
|
|
84939
85569
|
var SOURCE_VALUES = imageSourceSchema.options.join(" | ");
|
|
84940
85570
|
registerSchema({
|
|
84941
85571
|
command: "images.ingest",
|
|
@@ -84950,7 +85580,7 @@ registerSchema({
|
|
|
84950
85580
|
fields: { type: "string", description: "Comma-separated field names to include", required: false }
|
|
84951
85581
|
}
|
|
84952
85582
|
});
|
|
84953
|
-
var ingestCommand =
|
|
85583
|
+
var ingestCommand = defineCommand183({
|
|
84954
85584
|
meta: {
|
|
84955
85585
|
name: "ingest",
|
|
84956
85586
|
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"
|
|
@@ -85019,7 +85649,7 @@ var ingestCommand = defineCommand181({
|
|
|
85019
85649
|
});
|
|
85020
85650
|
|
|
85021
85651
|
// src/commands/images/layerize.ts
|
|
85022
|
-
import { defineCommand as
|
|
85652
|
+
import { defineCommand as defineCommand184 } from "citty";
|
|
85023
85653
|
registerSchema({
|
|
85024
85654
|
command: "images.layerize",
|
|
85025
85655
|
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.",
|
|
@@ -85083,7 +85713,7 @@ async function pollUntilSettled(imageId, maxWait) {
|
|
|
85083
85713
|
}
|
|
85084
85714
|
return null;
|
|
85085
85715
|
}
|
|
85086
|
-
var layerizeCommand =
|
|
85716
|
+
var layerizeCommand = defineCommand184({
|
|
85087
85717
|
meta: {
|
|
85088
85718
|
name: "layerize",
|
|
85089
85719
|
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'"
|
|
@@ -85152,7 +85782,7 @@ registerSchema({
|
|
|
85152
85782
|
full: { type: "boolean", description: "Include geometry and typography for every layer", required: false }
|
|
85153
85783
|
}
|
|
85154
85784
|
});
|
|
85155
|
-
var layersCommand =
|
|
85785
|
+
var layersCommand = defineCommand184({
|
|
85156
85786
|
meta: {
|
|
85157
85787
|
name: "layers",
|
|
85158
85788
|
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"
|
|
@@ -85192,7 +85822,7 @@ var layersCommand = defineCommand182({
|
|
|
85192
85822
|
});
|
|
85193
85823
|
|
|
85194
85824
|
// src/commands/images/library.ts
|
|
85195
|
-
import { defineCommand as
|
|
85825
|
+
import { defineCommand as defineCommand185 } from "citty";
|
|
85196
85826
|
registerSchema({
|
|
85197
85827
|
command: "images.library",
|
|
85198
85828
|
description: "Search the company image library. Returns only ready images.",
|
|
@@ -85218,7 +85848,7 @@ registerSchema({
|
|
|
85218
85848
|
}
|
|
85219
85849
|
}
|
|
85220
85850
|
});
|
|
85221
|
-
var libraryCommand =
|
|
85851
|
+
var libraryCommand = defineCommand185({
|
|
85222
85852
|
meta: {
|
|
85223
85853
|
name: "library",
|
|
85224
85854
|
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"
|
|
@@ -85281,7 +85911,7 @@ var libraryCommand = defineCommand183({
|
|
|
85281
85911
|
});
|
|
85282
85912
|
|
|
85283
85913
|
// src/commands/images/logo.ts
|
|
85284
|
-
import { defineCommand as
|
|
85914
|
+
import { defineCommand as defineCommand186 } from "citty";
|
|
85285
85915
|
registerSchema({
|
|
85286
85916
|
command: "images.logo",
|
|
85287
85917
|
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.",
|
|
@@ -85309,7 +85939,7 @@ registerSchema({
|
|
|
85309
85939
|
full: { type: "boolean", description: "Include full metadata", required: false, default: false }
|
|
85310
85940
|
}
|
|
85311
85941
|
});
|
|
85312
|
-
var logoCommand =
|
|
85942
|
+
var logoCommand = defineCommand186({
|
|
85313
85943
|
meta: {
|
|
85314
85944
|
name: "logo",
|
|
85315
85945
|
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"
|
|
@@ -85382,7 +86012,7 @@ var logoCommand = defineCommand184({
|
|
|
85382
86012
|
});
|
|
85383
86013
|
|
|
85384
86014
|
// src/commands/images/normalize.ts
|
|
85385
|
-
import { defineCommand as
|
|
86015
|
+
import { defineCommand as defineCommand187 } from "citty";
|
|
85386
86016
|
|
|
85387
86017
|
// src/lib/image/color-changer.ts
|
|
85388
86018
|
import quantize from "quantize";
|
|
@@ -86114,7 +86744,7 @@ function coerceRawArgs(args8) {
|
|
|
86114
86744
|
"dry-run": bool(args8["dry-run"])
|
|
86115
86745
|
};
|
|
86116
86746
|
}
|
|
86117
|
-
var normalizeCommand2 =
|
|
86747
|
+
var normalizeCommand2 = defineCommand187({
|
|
86118
86748
|
meta: {
|
|
86119
86749
|
name: "normalize",
|
|
86120
86750
|
description: `Normalize logos / images: declarative recolor + bg removal + trim + resize. Operates on local files; writes in-place by default.
|
|
@@ -86169,7 +86799,7 @@ Examples:
|
|
|
86169
86799
|
});
|
|
86170
86800
|
|
|
86171
86801
|
// src/commands/images/pinterest.ts
|
|
86172
|
-
import { defineCommand as
|
|
86802
|
+
import { defineCommand as defineCommand188 } from "citty";
|
|
86173
86803
|
registerSchema({
|
|
86174
86804
|
command: "images.pinterest",
|
|
86175
86805
|
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.",
|
|
@@ -86189,7 +86819,7 @@ registerSchema({
|
|
|
86189
86819
|
}
|
|
86190
86820
|
}
|
|
86191
86821
|
});
|
|
86192
|
-
var pinterestCommand =
|
|
86822
|
+
var pinterestCommand = defineCommand188({
|
|
86193
86823
|
meta: {
|
|
86194
86824
|
name: "pinterest",
|
|
86195
86825
|
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'"
|
|
@@ -86246,7 +86876,7 @@ var pinterestCommand = defineCommand186({
|
|
|
86246
86876
|
});
|
|
86247
86877
|
|
|
86248
86878
|
// src/commands/images/screenshot.ts
|
|
86249
|
-
import { defineCommand as
|
|
86879
|
+
import { defineCommand as defineCommand189 } from "citty";
|
|
86250
86880
|
registerSchema({
|
|
86251
86881
|
command: "images.screenshot",
|
|
86252
86882
|
description: "Capture a website screenshot via ScreenshotOne. Auto-ingests on success.",
|
|
@@ -86265,7 +86895,7 @@ registerSchema({
|
|
|
86265
86895
|
full: { type: "boolean", description: "Include full metadata", required: false, default: false }
|
|
86266
86896
|
}
|
|
86267
86897
|
});
|
|
86268
|
-
var screenshotCommand =
|
|
86898
|
+
var screenshotCommand = defineCommand189({
|
|
86269
86899
|
meta: {
|
|
86270
86900
|
name: "screenshot",
|
|
86271
86901
|
description: "Screenshot a URL via ScreenshotOne. $0.009/capture. Auto-ingests to library.\n\nExample: baker images screenshot https://stripe.com --full-page"
|
|
@@ -86329,7 +86959,7 @@ var screenshotCommand = defineCommand187({
|
|
|
86329
86959
|
});
|
|
86330
86960
|
|
|
86331
86961
|
// src/commands/images/search.ts
|
|
86332
|
-
import { defineCommand as
|
|
86962
|
+
import { defineCommand as defineCommand190 } from "citty";
|
|
86333
86963
|
registerSchema({
|
|
86334
86964
|
command: "images.search",
|
|
86335
86965
|
description: "Search images by text query. Only returns ready images.",
|
|
@@ -86345,7 +86975,7 @@ registerSchema({
|
|
|
86345
86975
|
tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
|
|
86346
86976
|
}
|
|
86347
86977
|
});
|
|
86348
|
-
var searchCommand =
|
|
86978
|
+
var searchCommand = defineCommand190({
|
|
86349
86979
|
meta: {
|
|
86350
86980
|
name: "search",
|
|
86351
86981
|
description: "Semantic search images by text query. Uses hybrid BM25 + vector + reranking. Example: baker images search 'hero banner' --aspect-ratio 16:9 --tags logo"
|
|
@@ -86405,7 +87035,7 @@ var searchCommand = defineCommand188({
|
|
|
86405
87035
|
});
|
|
86406
87036
|
|
|
86407
87037
|
// src/commands/images/sticker.ts
|
|
86408
|
-
import { defineCommand as
|
|
87038
|
+
import { defineCommand as defineCommand191 } from "citty";
|
|
86409
87039
|
registerSchema({
|
|
86410
87040
|
command: "images.sticker",
|
|
86411
87041
|
description: "Search Giphy stickers \u2014 transparent-background overlays for ad creative.",
|
|
@@ -86437,7 +87067,7 @@ registerSchema({
|
|
|
86437
87067
|
}
|
|
86438
87068
|
}
|
|
86439
87069
|
});
|
|
86440
|
-
var stickerCommand =
|
|
87070
|
+
var stickerCommand = defineCommand191({
|
|
86441
87071
|
meta: {
|
|
86442
87072
|
name: "sticker",
|
|
86443
87073
|
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"
|
|
@@ -86484,7 +87114,7 @@ var stickerCommand = defineCommand189({
|
|
|
86484
87114
|
});
|
|
86485
87115
|
|
|
86486
87116
|
// src/commands/images/stock.ts
|
|
86487
|
-
import { defineCommand as
|
|
87117
|
+
import { defineCommand as defineCommand192 } from "citty";
|
|
86488
87118
|
var STOCK_ERROR_FIX = {
|
|
86489
87119
|
action: "use_different_resource",
|
|
86490
87120
|
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."
|
|
@@ -86564,7 +87194,7 @@ function partialLibraryHints(errors, hitCount) {
|
|
|
86564
87194
|
`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.`
|
|
86565
87195
|
];
|
|
86566
87196
|
}
|
|
86567
|
-
var stockCommand =
|
|
87197
|
+
var stockCommand = defineCommand192({
|
|
86568
87198
|
meta: {
|
|
86569
87199
|
name: "stock",
|
|
86570
87200
|
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"
|
|
@@ -86639,7 +87269,7 @@ var stockCommand = defineCommand190({
|
|
|
86639
87269
|
});
|
|
86640
87270
|
|
|
86641
87271
|
// src/lib/tags-command.ts
|
|
86642
|
-
import { defineCommand as
|
|
87272
|
+
import { defineCommand as defineCommand193 } from "citty";
|
|
86643
87273
|
function makeTagsCommand(command, label, endpoint) {
|
|
86644
87274
|
registerSchema({
|
|
86645
87275
|
command: `${command}.tags`,
|
|
@@ -86648,7 +87278,7 @@ function makeTagsCommand(command, label, endpoint) {
|
|
|
86648
87278
|
output: { type: "string", description: "Output format: md|json", required: false, default: "md" }
|
|
86649
87279
|
}
|
|
86650
87280
|
});
|
|
86651
|
-
return
|
|
87281
|
+
return defineCommand193({
|
|
86652
87282
|
meta: {
|
|
86653
87283
|
name: "tags",
|
|
86654
87284
|
description: `List the available ${label} tag names (defaults + company custom tags). Use before filtering with --tags. Example: baker ${command} tags`
|
|
@@ -86684,7 +87314,7 @@ function makeTagsCommand(command, label, endpoint) {
|
|
|
86684
87314
|
var tagsCommand3 = makeTagsCommand("images", "image", "/api/images/tags");
|
|
86685
87315
|
|
|
86686
87316
|
// src/commands/images/upload.ts
|
|
86687
|
-
import { defineCommand as
|
|
87317
|
+
import { defineCommand as defineCommand194 } from "citty";
|
|
86688
87318
|
registerSchema({
|
|
86689
87319
|
command: "images.upload",
|
|
86690
87320
|
description: "Upload an image to the library \u2014 local file path or remote http(s) URL.",
|
|
@@ -86722,7 +87352,7 @@ registerSchema({
|
|
|
86722
87352
|
function isRemoteUrl2(value2) {
|
|
86723
87353
|
return /^https?:\/\//i.test(value2);
|
|
86724
87354
|
}
|
|
86725
|
-
var uploadCommand =
|
|
87355
|
+
var uploadCommand = defineCommand194({
|
|
86726
87356
|
meta: {
|
|
86727
87357
|
name: "upload",
|
|
86728
87358
|
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'"
|
|
@@ -86815,7 +87445,7 @@ async function uploadLocal(target2, args8) {
|
|
|
86815
87445
|
}
|
|
86816
87446
|
|
|
86817
87447
|
// src/commands/images/upscale.ts
|
|
86818
|
-
import { defineCommand as
|
|
87448
|
+
import { defineCommand as defineCommand195 } from "citty";
|
|
86819
87449
|
registerSchema({
|
|
86820
87450
|
command: "images.upscale",
|
|
86821
87451
|
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).",
|
|
@@ -86830,7 +87460,7 @@ registerSchema({
|
|
|
86830
87460
|
}
|
|
86831
87461
|
});
|
|
86832
87462
|
var POLL_INTERVAL_MS4 = 1500;
|
|
86833
|
-
var upscaleCommand =
|
|
87463
|
+
var upscaleCommand = defineCommand195({
|
|
86834
87464
|
meta: {
|
|
86835
87465
|
name: "upscale",
|
|
86836
87466
|
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"
|
|
@@ -86885,7 +87515,7 @@ var upscaleCommand = defineCommand193({
|
|
|
86885
87515
|
});
|
|
86886
87516
|
|
|
86887
87517
|
// src/commands/images/use.ts
|
|
86888
|
-
import { defineCommand as
|
|
87518
|
+
import { defineCommand as defineCommand196 } from "citty";
|
|
86889
87519
|
registerSchema({
|
|
86890
87520
|
command: "images.use",
|
|
86891
87521
|
description: "Ingest a URL and wait for the library record to be ready.",
|
|
@@ -86914,7 +87544,7 @@ function emitReady(ingestResult, doc, args8) {
|
|
|
86914
87544
|
args8.full === true
|
|
86915
87545
|
);
|
|
86916
87546
|
}
|
|
86917
|
-
var useCommand =
|
|
87547
|
+
var useCommand = defineCommand196({
|
|
86918
87548
|
meta: {
|
|
86919
87549
|
name: "use",
|
|
86920
87550
|
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"
|
|
@@ -86963,7 +87593,7 @@ var useCommand = defineCommand194({
|
|
|
86963
87593
|
});
|
|
86964
87594
|
|
|
86965
87595
|
// src/commands/images/index.ts
|
|
86966
|
-
var imagesCommand =
|
|
87596
|
+
var imagesCommand = defineCommand197({
|
|
86967
87597
|
meta: {
|
|
86968
87598
|
name: "images",
|
|
86969
87599
|
description: `Find, source, and normalize images. Subcommands route by provider so cost + license are explicit.
|
|
@@ -87043,12 +87673,12 @@ Full guide: __tooling__/docs/tools/baker/images.md`
|
|
|
87043
87673
|
});
|
|
87044
87674
|
|
|
87045
87675
|
// src/commands/landing/index.ts
|
|
87046
|
-
import { defineCommand as
|
|
87676
|
+
import { defineCommand as defineCommand209 } from "citty";
|
|
87047
87677
|
|
|
87048
87678
|
// src/commands/landing/critique.ts
|
|
87049
87679
|
import { readdir as readdir17, readFile as readFile40, stat as stat10 } from "fs/promises";
|
|
87050
87680
|
import path46 from "path";
|
|
87051
|
-
import { defineCommand as
|
|
87681
|
+
import { defineCommand as defineCommand198 } from "citty";
|
|
87052
87682
|
|
|
87053
87683
|
// src/engine/landing/lib/constants.ts
|
|
87054
87684
|
var OVERUSED_FONTS = /* @__PURE__ */ new Set([
|
|
@@ -88356,7 +88986,7 @@ function fail8(code, message, fix) {
|
|
|
88356
88986
|
);
|
|
88357
88987
|
process.exit(2);
|
|
88358
88988
|
}
|
|
88359
|
-
var critiqueCommand2 =
|
|
88989
|
+
var critiqueCommand2 = defineCommand198({
|
|
88360
88990
|
meta: {
|
|
88361
88991
|
name: "critique",
|
|
88362
88992
|
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."
|
|
@@ -88490,10 +89120,10 @@ async function isDir2(p) {
|
|
|
88490
89120
|
}
|
|
88491
89121
|
|
|
88492
89122
|
// src/commands/landing/inspiration/index.ts
|
|
88493
|
-
import { defineCommand as
|
|
89123
|
+
import { defineCommand as defineCommand207 } from "citty";
|
|
88494
89124
|
|
|
88495
89125
|
// src/commands/landing/inspiration/add.ts
|
|
88496
|
-
import { defineCommand as
|
|
89126
|
+
import { defineCommand as defineCommand199 } from "citty";
|
|
88497
89127
|
|
|
88498
89128
|
// src/commands/landing/inspiration/shared.ts
|
|
88499
89129
|
var INSPIRATION_HINTS = {
|
|
@@ -88575,7 +89205,7 @@ registerSchema({
|
|
|
88575
89205
|
note: { type: "string", description: "Why this page is worth keeping", required: false }
|
|
88576
89206
|
}
|
|
88577
89207
|
});
|
|
88578
|
-
var addCommand =
|
|
89208
|
+
var addCommand = defineCommand199({
|
|
88579
89209
|
meta: {
|
|
88580
89210
|
name: "add",
|
|
88581
89211
|
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'"
|
|
@@ -88617,7 +89247,7 @@ var addCommand = defineCommand197({
|
|
|
88617
89247
|
// src/commands/landing/inspiration/code.ts
|
|
88618
89248
|
import { mkdir as mkdir13, writeFile as writeFile20 } from "fs/promises";
|
|
88619
89249
|
import path47 from "path";
|
|
88620
|
-
import { defineCommand as
|
|
89250
|
+
import { defineCommand as defineCommand200 } from "citty";
|
|
88621
89251
|
registerSchema({
|
|
88622
89252
|
command: "landing.inspiration.code",
|
|
88623
89253
|
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.",
|
|
@@ -88626,7 +89256,7 @@ registerSchema({
|
|
|
88626
89256
|
full: { type: "boolean", description: "Print the markup inline as well as writing it", required: false }
|
|
88627
89257
|
}
|
|
88628
89258
|
});
|
|
88629
|
-
var codeCommand =
|
|
89259
|
+
var codeCommand = defineCommand200({
|
|
88630
89260
|
meta: {
|
|
88631
89261
|
name: "code",
|
|
88632
89262
|
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."
|
|
@@ -88672,7 +89302,7 @@ var codeCommand = defineCommand198({
|
|
|
88672
89302
|
});
|
|
88673
89303
|
|
|
88674
89304
|
// src/commands/landing/inspiration/favorites.ts
|
|
88675
|
-
import { defineCommand as
|
|
89305
|
+
import { defineCommand as defineCommand201 } from "citty";
|
|
88676
89306
|
registerSchema({
|
|
88677
89307
|
command: "landing.inspiration.favorites",
|
|
88678
89308
|
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.",
|
|
@@ -88686,7 +89316,7 @@ registerSchema({
|
|
|
88686
89316
|
}
|
|
88687
89317
|
}
|
|
88688
89318
|
});
|
|
88689
|
-
var favoritesCommand =
|
|
89319
|
+
var favoritesCommand = defineCommand201({
|
|
88690
89320
|
meta: {
|
|
88691
89321
|
name: "favorites",
|
|
88692
89322
|
description: "List this company's saved reference sections. Example: baker landing inspiration favorites --type hero,pricing"
|
|
@@ -88766,7 +89396,7 @@ registerSchema({
|
|
|
88766
89396
|
note: { type: "string", description: "Why this is worth keeping", required: false }
|
|
88767
89397
|
}
|
|
88768
89398
|
});
|
|
88769
|
-
var favoriteCommand =
|
|
89399
|
+
var favoriteCommand = defineCommand201({
|
|
88770
89400
|
meta: {
|
|
88771
89401
|
name: "favorite",
|
|
88772
89402
|
description: "Save a reference section to this company. Example: baker landing inspiration favorite k57abc\u2026"
|
|
@@ -88804,7 +89434,7 @@ registerSchema({
|
|
|
88804
89434
|
page: { type: "boolean", description: "Treat the id as a page rather than a section", required: false }
|
|
88805
89435
|
}
|
|
88806
89436
|
});
|
|
88807
|
-
var unfavoriteCommand =
|
|
89437
|
+
var unfavoriteCommand = defineCommand201({
|
|
88808
89438
|
meta: {
|
|
88809
89439
|
name: "unfavorite",
|
|
88810
89440
|
description: "Remove a reference section from this company's saved set. Example: baker landing inspiration unfavorite k57abc\u2026"
|
|
@@ -88826,7 +89456,7 @@ var unfavoriteCommand = defineCommand199({
|
|
|
88826
89456
|
});
|
|
88827
89457
|
|
|
88828
89458
|
// src/commands/landing/inspiration/page.ts
|
|
88829
|
-
import { defineCommand as
|
|
89459
|
+
import { defineCommand as defineCommand202 } from "citty";
|
|
88830
89460
|
registerSchema({
|
|
88831
89461
|
command: "landing.inspiration.page",
|
|
88832
89462
|
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.",
|
|
@@ -88843,7 +89473,7 @@ registerSchema({
|
|
|
88843
89473
|
}
|
|
88844
89474
|
}
|
|
88845
89475
|
});
|
|
88846
|
-
var pageCommand2 =
|
|
89476
|
+
var pageCommand2 = defineCommand202({
|
|
88847
89477
|
meta: {
|
|
88848
89478
|
name: "page",
|
|
88849
89479
|
description: "Show how a reference page sequences its sections. Example: baker landing inspiration page j91xyz\u2026 \u2014 the blueprint, not the pixels."
|
|
@@ -88906,7 +89536,7 @@ var pageCommand2 = defineCommand200({
|
|
|
88906
89536
|
});
|
|
88907
89537
|
|
|
88908
89538
|
// src/commands/landing/inspiration/scrape.ts
|
|
88909
|
-
import { defineCommand as
|
|
89539
|
+
import { defineCommand as defineCommand203 } from "citty";
|
|
88910
89540
|
|
|
88911
89541
|
// src/engine/landing-library/proxyFailure.ts
|
|
88912
89542
|
var PROXY_STATUS = 407;
|
|
@@ -91046,7 +91676,7 @@ registerSchema({
|
|
|
91046
91676
|
report: { type: "boolean", description: "Write report.html. `--no-report` to skip", required: false }
|
|
91047
91677
|
}
|
|
91048
91678
|
});
|
|
91049
|
-
var scrapeCommand =
|
|
91679
|
+
var scrapeCommand = defineCommand203({
|
|
91050
91680
|
meta: {
|
|
91051
91681
|
name: "scrape",
|
|
91052
91682
|
description: "Capture a landing page to a directory, now. Example: baker landing inspiration scrape https://linear.app --out .baker/inspiration/linear.app"
|
|
@@ -91155,7 +91785,7 @@ var scrapeCommand = defineCommand201({
|
|
|
91155
91785
|
|
|
91156
91786
|
// src/commands/landing/inspiration/search.ts
|
|
91157
91787
|
import path52 from "path";
|
|
91158
|
-
import { defineCommand as
|
|
91788
|
+
import { defineCommand as defineCommand204 } from "citty";
|
|
91159
91789
|
|
|
91160
91790
|
// src/commands/landing/inspiration/shot.ts
|
|
91161
91791
|
import { mkdir as mkdir15, writeFile as writeFile23 } from "fs/promises";
|
|
@@ -91292,7 +91922,7 @@ async function downloadShots(results) {
|
|
|
91292
91922
|
);
|
|
91293
91923
|
return saved;
|
|
91294
91924
|
}
|
|
91295
|
-
var searchCommand2 =
|
|
91925
|
+
var searchCommand2 = defineCommand204({
|
|
91296
91926
|
meta: {
|
|
91297
91927
|
name: "search",
|
|
91298
91928
|
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"
|
|
@@ -91390,7 +92020,7 @@ var searchCommand2 = defineCommand202({
|
|
|
91390
92020
|
});
|
|
91391
92021
|
|
|
91392
92022
|
// src/commands/landing/inspiration/sequences.ts
|
|
91393
|
-
import { defineCommand as
|
|
92023
|
+
import { defineCommand as defineCommand205 } from "citty";
|
|
91394
92024
|
var COMPACT_TRANSITIONS = 12;
|
|
91395
92025
|
var COMPACT_ENDS = 5;
|
|
91396
92026
|
var MAX_PAGES = 50;
|
|
@@ -91464,7 +92094,7 @@ function sequencesHints(data, { scope, full }) {
|
|
|
91464
92094
|
if (scope === "favorites") hints2.push(...favoritesScopeHints(data.favoritesHealth, data.pagesReturned));
|
|
91465
92095
|
return hints2;
|
|
91466
92096
|
}
|
|
91467
|
-
var sequencesCommand =
|
|
92097
|
+
var sequencesCommand = defineCommand205({
|
|
91468
92098
|
meta: {
|
|
91469
92099
|
name: "sequences",
|
|
91470
92100
|
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."
|
|
@@ -91514,7 +92144,7 @@ var sequencesCommand = defineCommand203({
|
|
|
91514
92144
|
|
|
91515
92145
|
// src/commands/landing/inspiration/view.ts
|
|
91516
92146
|
import path53 from "path";
|
|
91517
|
-
import { defineCommand as
|
|
92147
|
+
import { defineCommand as defineCommand206 } from "citty";
|
|
91518
92148
|
registerSchema({
|
|
91519
92149
|
command: "landing.inspiration.view",
|
|
91520
92150
|
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.",
|
|
@@ -91527,7 +92157,7 @@ registerSchema({
|
|
|
91527
92157
|
}
|
|
91528
92158
|
}
|
|
91529
92159
|
});
|
|
91530
|
-
var viewCommand2 =
|
|
92160
|
+
var viewCommand2 = defineCommand206({
|
|
91531
92161
|
meta: {
|
|
91532
92162
|
name: "view",
|
|
91533
92163
|
description: "Full detail for one reference section. Example: baker landing inspiration view k57abc\u2026 \u2014 read the screenshots it saves before you build."
|
|
@@ -91611,7 +92241,7 @@ var viewCommand2 = defineCommand204({
|
|
|
91611
92241
|
});
|
|
91612
92242
|
|
|
91613
92243
|
// src/commands/landing/inspiration/index.ts
|
|
91614
|
-
var inspirationCommand =
|
|
92244
|
+
var inspirationCommand = defineCommand207({
|
|
91615
92245
|
meta: {
|
|
91616
92246
|
name: "inspiration",
|
|
91617
92247
|
description: `Reference library of real landing-page sections \u2014 look at how good pages actually solve a problem before you design one.
|
|
@@ -91659,7 +92289,7 @@ Full guide: __tooling__/docs/tools/baker/landing.md`
|
|
|
91659
92289
|
import { randomUUID as randomUUID3 } from "crypto";
|
|
91660
92290
|
import { mkdir as mkdir16, readdir as readdir18, readFile as readFile41, stat as stat11, writeFile as writeFile24 } from "fs/promises";
|
|
91661
92291
|
import path54 from "path";
|
|
91662
|
-
import { defineCommand as
|
|
92292
|
+
import { defineCommand as defineCommand208 } from "citty";
|
|
91663
92293
|
registerSchema({
|
|
91664
92294
|
command: "landing.variant",
|
|
91665
92295
|
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.",
|
|
@@ -91887,7 +92517,7 @@ async function writeVariant(opts) {
|
|
|
91887
92517
|
await writeFile24(path54.join(variantDir, "_images", ".gitkeep"), "", "utf8");
|
|
91888
92518
|
return written;
|
|
91889
92519
|
}
|
|
91890
|
-
var variantCommand =
|
|
92520
|
+
var variantCommand = defineCommand208({
|
|
91891
92521
|
meta: {
|
|
91892
92522
|
name: "variant",
|
|
91893
92523
|
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."
|
|
@@ -91967,7 +92597,7 @@ var variantCommand = defineCommand206({
|
|
|
91967
92597
|
});
|
|
91968
92598
|
|
|
91969
92599
|
// src/commands/landing/index.ts
|
|
91970
|
-
var landingCommand =
|
|
92600
|
+
var landingCommand = defineCommand209({
|
|
91971
92601
|
meta: {
|
|
91972
92602
|
name: "landing",
|
|
91973
92603
|
description: `Design-quality tools for landing pages (src/pages/<slug>/).
|
|
@@ -91987,7 +92617,7 @@ Subcommands:
|
|
|
91987
92617
|
});
|
|
91988
92618
|
|
|
91989
92619
|
// src/commands/mcp/index.ts
|
|
91990
|
-
import { defineCommand as
|
|
92620
|
+
import { defineCommand as defineCommand210 } from "citty";
|
|
91991
92621
|
|
|
91992
92622
|
// src/commands/mcp/platforms.ts
|
|
91993
92623
|
function readsKey(label) {
|
|
@@ -92056,7 +92686,7 @@ registerSchema({
|
|
|
92056
92686
|
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.",
|
|
92057
92687
|
args: {}
|
|
92058
92688
|
});
|
|
92059
|
-
var connectedCommand =
|
|
92689
|
+
var connectedCommand = defineCommand210({
|
|
92060
92690
|
meta: {
|
|
92061
92691
|
name: "connected",
|
|
92062
92692
|
description: `Everything this chat can reach \u2014 managed integrations, custom MCP servers, and connected platforms.
|
|
@@ -92115,7 +92745,7 @@ registerSchema({
|
|
|
92115
92745
|
description: "List the custom MCP servers this company's chats see (org + company + your own user scope).",
|
|
92116
92746
|
args: {}
|
|
92117
92747
|
});
|
|
92118
|
-
var listCommand17 =
|
|
92748
|
+
var listCommand17 = defineCommand210({
|
|
92119
92749
|
meta: { name: "list", description: "List custom MCP servers visible to this company's chats." },
|
|
92120
92750
|
run: async () => {
|
|
92121
92751
|
try {
|
|
@@ -92152,7 +92782,7 @@ registerSchema({
|
|
|
92152
92782
|
header: { type: "string", description: 'Auth header "Key: Value" (repeatable)', required: false }
|
|
92153
92783
|
}
|
|
92154
92784
|
});
|
|
92155
|
-
var addCommand2 =
|
|
92785
|
+
var addCommand2 = defineCommand210({
|
|
92156
92786
|
meta: {
|
|
92157
92787
|
name: "add",
|
|
92158
92788
|
description: `Register a custom MCP server. Tools appear as mcp__<name>__* on the NEXT message.
|
|
@@ -92204,7 +92834,7 @@ registerSchema({
|
|
|
92204
92834
|
description: "Remove a company custom MCP server by name.",
|
|
92205
92835
|
args: { name: { type: "string", description: "Server name to remove", required: true } }
|
|
92206
92836
|
});
|
|
92207
|
-
var removeCommand6 =
|
|
92837
|
+
var removeCommand6 = defineCommand210({
|
|
92208
92838
|
meta: {
|
|
92209
92839
|
name: "remove",
|
|
92210
92840
|
description: `Remove a company custom MCP server by name.
|
|
@@ -92226,7 +92856,7 @@ Example:
|
|
|
92226
92856
|
}
|
|
92227
92857
|
}
|
|
92228
92858
|
});
|
|
92229
|
-
var mcpCommand =
|
|
92859
|
+
var mcpCommand = defineCommand210({
|
|
92230
92860
|
meta: {
|
|
92231
92861
|
name: "mcp",
|
|
92232
92862
|
description: `Third-party tools for this company \u2014 see what's connected, register custom HTTPS MCP endpoints.
|
|
@@ -92252,7 +92882,7 @@ Full guide: __tooling__/docs/tools/baker/mcp.md`
|
|
|
92252
92882
|
});
|
|
92253
92883
|
|
|
92254
92884
|
// src/commands/media-sources/index.ts
|
|
92255
|
-
import { defineCommand as
|
|
92885
|
+
import { defineCommand as defineCommand216 } from "citty";
|
|
92256
92886
|
|
|
92257
92887
|
// ../api/src/media-sources.ts
|
|
92258
92888
|
import { z as z64 } from "zod";
|
|
@@ -92318,7 +92948,7 @@ var mediaSourcesScheduleRequestSchema = z64.object({
|
|
|
92318
92948
|
});
|
|
92319
92949
|
|
|
92320
92950
|
// src/commands/media-sources/add.ts
|
|
92321
|
-
import { defineCommand as
|
|
92951
|
+
import { defineCommand as defineCommand211 } from "citty";
|
|
92322
92952
|
|
|
92323
92953
|
// src/commands/media-sources/shared.ts
|
|
92324
92954
|
function driveRefusalFix(input, code) {
|
|
@@ -92384,7 +93014,7 @@ registerSchema({
|
|
|
92384
93014
|
}
|
|
92385
93015
|
}
|
|
92386
93016
|
});
|
|
92387
|
-
var addCommand3 =
|
|
93017
|
+
var addCommand3 = defineCommand211({
|
|
92388
93018
|
meta: {
|
|
92389
93019
|
name: "add",
|
|
92390
93020
|
description: "Connect a social account (Instagram, TikTok, YouTube, LinkedIn page, Facebook page) as a media source. Start here with the profile URL. A Google Drive folder is never added by link: call request_connection with platform google-drive and choose media-folder, and the user picks the folder in the chat.\n\nExamples:\n baker media-sources add https://www.tiktok.com/@acme\n baker media-sources add @acme --platform instagram --every daily"
|
|
@@ -92444,13 +93074,13 @@ var addCommand3 = defineCommand209({
|
|
|
92444
93074
|
});
|
|
92445
93075
|
|
|
92446
93076
|
// src/commands/media-sources/list.ts
|
|
92447
|
-
import { defineCommand as
|
|
93077
|
+
import { defineCommand as defineCommand212 } from "citty";
|
|
92448
93078
|
registerSchema({
|
|
92449
93079
|
command: "media-sources.list",
|
|
92450
93080
|
description: "List the social accounts connected as image/video sources, with each one's key, import status and how many images and videos it has brought in.",
|
|
92451
93081
|
args: {}
|
|
92452
93082
|
});
|
|
92453
|
-
var listCommand18 =
|
|
93083
|
+
var listCommand18 = defineCommand212({
|
|
92454
93084
|
meta: {
|
|
92455
93085
|
name: "list",
|
|
92456
93086
|
description: "List connected media sources (key, platform, import status, stored images/videos).\n\nExample: baker media-sources list"
|
|
@@ -92475,13 +93105,13 @@ var listCommand18 = defineCommand210({
|
|
|
92475
93105
|
});
|
|
92476
93106
|
|
|
92477
93107
|
// src/commands/media-sources/remove.ts
|
|
92478
|
-
import { defineCommand as
|
|
93108
|
+
import { defineCommand as defineCommand213 } from "citty";
|
|
92479
93109
|
registerSchema({
|
|
92480
93110
|
command: "media-sources.remove",
|
|
92481
93111
|
description: "Disconnect a media source. Stops future imports; images and videos it already brought in stay in the library. Applies immediately.",
|
|
92482
93112
|
args: { key: { type: "string", description: "Source key, e.g. tiktok:acme", required: true } }
|
|
92483
93113
|
});
|
|
92484
|
-
var removeCommand7 =
|
|
93114
|
+
var removeCommand7 = defineCommand213({
|
|
92485
93115
|
meta: {
|
|
92486
93116
|
name: "remove",
|
|
92487
93117
|
description: "Disconnect a media source (already-imported media stays).\n\nExample: baker media-sources remove tiktok:acme"
|
|
@@ -92503,7 +93133,7 @@ var removeCommand7 = defineCommand211({
|
|
|
92503
93133
|
});
|
|
92504
93134
|
|
|
92505
93135
|
// src/commands/media-sources/schedule.ts
|
|
92506
|
-
import { defineCommand as
|
|
93136
|
+
import { defineCommand as defineCommand214 } from "citty";
|
|
92507
93137
|
registerSchema({
|
|
92508
93138
|
command: "media-sources.schedule",
|
|
92509
93139
|
description: "Set how often a connected source imports new posts on its own.",
|
|
@@ -92516,7 +93146,7 @@ registerSchema({
|
|
|
92516
93146
|
}
|
|
92517
93147
|
}
|
|
92518
93148
|
});
|
|
92519
|
-
var scheduleCommand =
|
|
93149
|
+
var scheduleCommand = defineCommand214({
|
|
92520
93150
|
meta: {
|
|
92521
93151
|
name: "schedule",
|
|
92522
93152
|
description: "Set a source's auto-sync cadence.\n\nExample: baker media-sources schedule tiktok:acme --every weekly"
|
|
@@ -92548,7 +93178,7 @@ var scheduleCommand = defineCommand212({
|
|
|
92548
93178
|
});
|
|
92549
93179
|
|
|
92550
93180
|
// src/commands/media-sources/sync.ts
|
|
92551
|
-
import { defineCommand as
|
|
93181
|
+
import { defineCommand as defineCommand215 } from "citty";
|
|
92552
93182
|
registerSchema({
|
|
92553
93183
|
command: "media-sources.sync",
|
|
92554
93184
|
description: "Import a connected source's new posts now. Runs in the background; only posts not yet in the library are fetched.",
|
|
@@ -92556,7 +93186,7 @@ registerSchema({
|
|
|
92556
93186
|
key: { type: "string", description: "Source key from `media-sources list`, e.g. tiktok:acme", required: true }
|
|
92557
93187
|
}
|
|
92558
93188
|
});
|
|
92559
|
-
var syncCommand =
|
|
93189
|
+
var syncCommand = defineCommand215({
|
|
92560
93190
|
meta: {
|
|
92561
93191
|
name: "sync",
|
|
92562
93192
|
description: "Import a source's new posts now.\n\nExample: baker media-sources sync tiktok:acme"
|
|
@@ -92582,7 +93212,7 @@ var syncCommand = defineCommand213({
|
|
|
92582
93212
|
});
|
|
92583
93213
|
|
|
92584
93214
|
// src/commands/media-sources/index.ts
|
|
92585
|
-
var mediaSourcesCommand =
|
|
93215
|
+
var mediaSourcesCommand = defineCommand216({
|
|
92586
93216
|
meta: {
|
|
92587
93217
|
name: "media-sources",
|
|
92588
93218
|
description: `Connect social accounts whose images and videos fill the libraries: Instagram, TikTok, YouTube (videos), LinkedIn company pages, Facebook pages. A Google Drive folder is picked by the user in the chat (request_connection, platform google-drive, choose media-folder), never added here; once connected, list, sync, schedule and remove manage it like any source. Subcommands: add, list, sync, schedule, remove.
|
|
@@ -92606,10 +93236,10 @@ Full guide: __tooling__/docs/tools/baker/media-sources.md`
|
|
|
92606
93236
|
});
|
|
92607
93237
|
|
|
92608
93238
|
// src/commands/research/index.ts
|
|
92609
|
-
import { defineCommand as
|
|
93239
|
+
import { defineCommand as defineCommand230 } from "citty";
|
|
92610
93240
|
|
|
92611
93241
|
// src/commands/research/advertisers.ts
|
|
92612
|
-
import { defineCommand as
|
|
93242
|
+
import { defineCommand as defineCommand217 } from "citty";
|
|
92613
93243
|
|
|
92614
93244
|
// src/commands/research/hints.ts
|
|
92615
93245
|
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.';
|
|
@@ -92875,7 +93505,7 @@ var FIELDS3 = {
|
|
|
92875
93505
|
etv: "Estimated traffic value (USD)",
|
|
92876
93506
|
visibility: "SERP visibility score (0-1)"
|
|
92877
93507
|
};
|
|
92878
|
-
var advertisersCommand =
|
|
93508
|
+
var advertisersCommand = defineCommand217({
|
|
92879
93509
|
meta: {
|
|
92880
93510
|
name: "advertisers",
|
|
92881
93511
|
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).
|
|
@@ -92931,7 +93561,7 @@ Examples:
|
|
|
92931
93561
|
});
|
|
92932
93562
|
|
|
92933
93563
|
// src/commands/research/autocomplete.ts
|
|
92934
|
-
import { defineCommand as
|
|
93564
|
+
import { defineCommand as defineCommand218 } from "citty";
|
|
92935
93565
|
registerSchema({
|
|
92936
93566
|
command: "research.autocomplete",
|
|
92937
93567
|
description: "Get Google Autocomplete suggestions for a seed keyword. Useful for keyword expansion and discovering what people actually search for. If --location and --language are omitted, defaults to United States (us) and English (en).",
|
|
@@ -92954,7 +93584,7 @@ registerSchema({
|
|
|
92954
93584
|
var FIELDS4 = {
|
|
92955
93585
|
suggestion: "Autocomplete suggestion from Google"
|
|
92956
93586
|
};
|
|
92957
|
-
var autocompleteCommand =
|
|
93587
|
+
var autocompleteCommand = defineCommand218({
|
|
92958
93588
|
meta: {
|
|
92959
93589
|
name: "autocomplete",
|
|
92960
93590
|
description: `Get Google Autocomplete suggestions for keyword expansion.
|
|
@@ -93009,7 +93639,7 @@ Examples:
|
|
|
93009
93639
|
});
|
|
93010
93640
|
|
|
93011
93641
|
// src/commands/research/countries.ts
|
|
93012
|
-
import { defineCommand as
|
|
93642
|
+
import { defineCommand as defineCommand219 } from "citty";
|
|
93013
93643
|
registerSchema({
|
|
93014
93644
|
command: "research.countries",
|
|
93015
93645
|
description: "List all supported country codes for --location flag in research commands.",
|
|
@@ -93066,7 +93696,7 @@ var FIELDS5 = {
|
|
|
93066
93696
|
code: "Country code to pass as --location",
|
|
93067
93697
|
name: "Country name"
|
|
93068
93698
|
};
|
|
93069
|
-
var countriesCommand =
|
|
93699
|
+
var countriesCommand = defineCommand219({
|
|
93070
93700
|
meta: {
|
|
93071
93701
|
name: "countries",
|
|
93072
93702
|
description: "List all supported country codes for --location flag."
|
|
@@ -93077,7 +93707,7 @@ var countriesCommand = defineCommand217({
|
|
|
93077
93707
|
});
|
|
93078
93708
|
|
|
93079
93709
|
// src/commands/research/fetch.ts
|
|
93080
|
-
import { defineCommand as
|
|
93710
|
+
import { defineCommand as defineCommand220 } from "citty";
|
|
93081
93711
|
var CONTENT_PREVIEW_CHARS = 2e4;
|
|
93082
93712
|
var TIMEOUT_MS = 18e4;
|
|
93083
93713
|
registerSchema({
|
|
@@ -93150,7 +93780,7 @@ function fetchFix(code) {
|
|
|
93150
93780
|
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."
|
|
93151
93781
|
};
|
|
93152
93782
|
}
|
|
93153
|
-
var fetchCommand =
|
|
93783
|
+
var fetchCommand = defineCommand220({
|
|
93154
93784
|
meta: {
|
|
93155
93785
|
name: "fetch",
|
|
93156
93786
|
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.
|
|
@@ -93227,7 +93857,7 @@ Examples:
|
|
|
93227
93857
|
});
|
|
93228
93858
|
|
|
93229
93859
|
// src/commands/research/intent.ts
|
|
93230
|
-
import { defineCommand as
|
|
93860
|
+
import { defineCommand as defineCommand221 } from "citty";
|
|
93231
93861
|
registerSchema({
|
|
93232
93862
|
command: "research.intent",
|
|
93233
93863
|
description: "Classify Google Search intent for keywords. Determines if someone searching is looking to buy, research, or navigate. If --language is omitted, defaults to English (en). The response includes a query_context object showing which language was used.",
|
|
@@ -93250,7 +93880,7 @@ var FIELDS7 = {
|
|
|
93250
93880
|
intent: "Primary Google Search intent: informational, navigational, commercial, transactional",
|
|
93251
93881
|
probability: "Confidence score 0.0-1.0"
|
|
93252
93882
|
};
|
|
93253
|
-
var intentCommand =
|
|
93883
|
+
var intentCommand = defineCommand221({
|
|
93254
93884
|
meta: {
|
|
93255
93885
|
name: "intent",
|
|
93256
93886
|
description: `Classify Google Search intent for keywords. Returns intent type and confidence.
|
|
@@ -93298,7 +93928,7 @@ Examples:
|
|
|
93298
93928
|
});
|
|
93299
93929
|
|
|
93300
93930
|
// src/commands/research/keyword-gap.ts
|
|
93301
|
-
import { defineCommand as
|
|
93931
|
+
import { defineCommand as defineCommand222 } from "citty";
|
|
93302
93932
|
registerSchema({
|
|
93303
93933
|
command: "research.keyword-gap",
|
|
93304
93934
|
description: "Find keywords a competitor ranks for (organic or paid) that you don't. Discovers expansion opportunities. 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.",
|
|
@@ -93327,7 +93957,7 @@ var FIELDS8 = {
|
|
|
93327
93957
|
cpc: "Cost per click USD",
|
|
93328
93958
|
their_position: "Competitor's ranking position"
|
|
93329
93959
|
};
|
|
93330
|
-
var keywordGapCommand =
|
|
93960
|
+
var keywordGapCommand = defineCommand222({
|
|
93331
93961
|
meta: {
|
|
93332
93962
|
name: "keyword-gap",
|
|
93333
93963
|
description: `Find keywords a competitor has that you don't. Supports pagination via --offset.
|
|
@@ -93402,7 +94032,7 @@ Examples:
|
|
|
93402
94032
|
});
|
|
93403
94033
|
|
|
93404
94034
|
// src/commands/research/keyword-metrics.ts
|
|
93405
|
-
import { defineCommand as
|
|
94035
|
+
import { defineCommand as defineCommand223 } from "citty";
|
|
93406
94036
|
|
|
93407
94037
|
// src/commands/research/keyword-metrics-rows.ts
|
|
93408
94038
|
var KEYWORD_METRICS_SOURCE = "keyword_planner_estimate_via_dataforseo";
|
|
@@ -93482,7 +94112,7 @@ registerSchema({
|
|
|
93482
94112
|
"no-cache": { type: "boolean", description: "Skip server cache, hit API directly", required: false }
|
|
93483
94113
|
}
|
|
93484
94114
|
});
|
|
93485
|
-
var keywordMetricsCommand =
|
|
94115
|
+
var keywordMetricsCommand = defineCommand223({
|
|
93486
94116
|
meta: {
|
|
93487
94117
|
name: "keyword-metrics",
|
|
93488
94118
|
description: `Volume, CPC and competition for keywords you name. No domain required.
|
|
@@ -93564,7 +94194,7 @@ Examples:
|
|
|
93564
94194
|
});
|
|
93565
94195
|
|
|
93566
94196
|
// src/commands/research/keywords-for-site.ts
|
|
93567
|
-
import { defineCommand as
|
|
94197
|
+
import { defineCommand as defineCommand224 } from "citty";
|
|
93568
94198
|
registerSchema({
|
|
93569
94199
|
command: "research.keywords-for-site",
|
|
93570
94200
|
description: "Get keywords a competitor targets in Google. Use --type paid to see only paid keywords, --type organic for organic only. 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.",
|
|
@@ -93597,7 +94227,7 @@ var FIELDS9 = {
|
|
|
93597
94227
|
competition: "LOW, MEDIUM, or HIGH",
|
|
93598
94228
|
competition_index: "Competition score 0-100"
|
|
93599
94229
|
};
|
|
93600
|
-
var keywordsForSiteCommand =
|
|
94230
|
+
var keywordsForSiteCommand = defineCommand224({
|
|
93601
94231
|
meta: {
|
|
93602
94232
|
name: "keywords-for-site",
|
|
93603
94233
|
description: `Get keywords a competitor targets in Google. Use --type to filter paid/organic.
|
|
@@ -93659,7 +94289,7 @@ Examples:
|
|
|
93659
94289
|
});
|
|
93660
94290
|
|
|
93661
94291
|
// src/commands/research/languages.ts
|
|
93662
|
-
import { defineCommand as
|
|
94292
|
+
import { defineCommand as defineCommand225 } from "citty";
|
|
93663
94293
|
registerSchema({
|
|
93664
94294
|
command: "research.languages",
|
|
93665
94295
|
description: "List all supported language codes for --language flag in research commands.",
|
|
@@ -93689,7 +94319,7 @@ var FIELDS10 = {
|
|
|
93689
94319
|
code: "Language code to pass as --language",
|
|
93690
94320
|
name: "Language name (also accepted by --language)"
|
|
93691
94321
|
};
|
|
93692
|
-
var languagesCommand2 =
|
|
94322
|
+
var languagesCommand2 = defineCommand225({
|
|
93693
94323
|
meta: {
|
|
93694
94324
|
name: "languages",
|
|
93695
94325
|
description: "List all supported language codes for --language flag."
|
|
@@ -93700,7 +94330,7 @@ var languagesCommand2 = defineCommand223({
|
|
|
93700
94330
|
});
|
|
93701
94331
|
|
|
93702
94332
|
// src/commands/research/lighthouse.ts
|
|
93703
|
-
import { defineCommand as
|
|
94333
|
+
import { defineCommand as defineCommand226 } from "citty";
|
|
93704
94334
|
registerSchema({
|
|
93705
94335
|
command: "research.lighthouse",
|
|
93706
94336
|
description: "Landing page performance audit. Returns metrics that affect Google Ads Quality Score and CPC.",
|
|
@@ -93719,7 +94349,7 @@ var FIELDS11 = {
|
|
|
93719
94349
|
speed_index_ms: "Speed Index in ms (good: < 3400)",
|
|
93720
94350
|
interactive_ms: "Time to Interactive in ms (good: < 3800)"
|
|
93721
94351
|
};
|
|
93722
|
-
var lighthouseCommand =
|
|
94352
|
+
var lighthouseCommand = defineCommand226({
|
|
93723
94353
|
meta: {
|
|
93724
94354
|
name: "lighthouse",
|
|
93725
94355
|
description: `Landing page performance audit. Metrics affecting Google Ads Quality Score.
|
|
@@ -93757,7 +94387,7 @@ Examples:
|
|
|
93757
94387
|
});
|
|
93758
94388
|
|
|
93759
94389
|
// src/commands/research/reddit.ts
|
|
93760
|
-
import { defineCommand as
|
|
94390
|
+
import { defineCommand as defineCommand227 } from "citty";
|
|
93761
94391
|
var TIMEOUT_MS2 = 18e4;
|
|
93762
94392
|
var TEXT_PREVIEW_CHARS = 1500;
|
|
93763
94393
|
var ITEM_FIELDS = {
|
|
@@ -93863,7 +94493,7 @@ function failValidation4(message) {
|
|
|
93863
94493
|
function subredditsFromArgs(rawArgs, parsed) {
|
|
93864
94494
|
return repeatedValues(rawArgs, "subreddit", parsed).flatMap((value2) => value2.split(",")).map((name) => name.trim()).filter(Boolean);
|
|
93865
94495
|
}
|
|
93866
|
-
var searchCommand3 =
|
|
94496
|
+
var searchCommand3 = defineCommand227({
|
|
93867
94497
|
meta: {
|
|
93868
94498
|
name: "search",
|
|
93869
94499
|
description: `Search Reddit for the audience's own words, verbatim, each with a permalink you can cite.
|
|
@@ -93916,7 +94546,7 @@ Examples:
|
|
|
93916
94546
|
}
|
|
93917
94547
|
}
|
|
93918
94548
|
});
|
|
93919
|
-
var threadCommand =
|
|
94549
|
+
var threadCommand = defineCommand227({
|
|
93920
94550
|
meta: {
|
|
93921
94551
|
name: "thread",
|
|
93922
94552
|
description: `Read one Reddit thread verbatim \u2014 the post and its best comments, each with its own permalink.
|
|
@@ -93960,7 +94590,7 @@ Examples:
|
|
|
93960
94590
|
}
|
|
93961
94591
|
}
|
|
93962
94592
|
});
|
|
93963
|
-
var subredditsCommand =
|
|
94593
|
+
var subredditsCommand = defineCommand227({
|
|
93964
94594
|
meta: {
|
|
93965
94595
|
name: "subreddits",
|
|
93966
94596
|
description: `Find the subreddits where an audience talks \u2014 name, members, and whether it can be read.
|
|
@@ -94002,7 +94632,7 @@ Examples:
|
|
|
94002
94632
|
}
|
|
94003
94633
|
}
|
|
94004
94634
|
});
|
|
94005
|
-
var redditCommand =
|
|
94635
|
+
var redditCommand = defineCommand227({
|
|
94006
94636
|
meta: {
|
|
94007
94637
|
name: "reddit",
|
|
94008
94638
|
description: `Read Reddit verbatim \u2014 the one site no page reader will open for us.
|
|
@@ -94022,7 +94652,7 @@ Full guide: __tooling__/docs/tools/baker/research.md`
|
|
|
94022
94652
|
});
|
|
94023
94653
|
|
|
94024
94654
|
// src/commands/research/relevant-pages.ts
|
|
94025
|
-
import { defineCommand as
|
|
94655
|
+
import { defineCommand as defineCommand228 } from "citty";
|
|
94026
94656
|
registerSchema({
|
|
94027
94657
|
command: "research.relevant-pages",
|
|
94028
94658
|
description: "Get the top pages of a competitor domain with organic traffic and ranking data. Shows which pages drive the most traffic. If --location and --language are omitted, defaults to United States (us) and English (en).",
|
|
@@ -94048,7 +94678,7 @@ var FIELDS12 = {
|
|
|
94048
94678
|
keywords: "Total organic keywords the page ranks for",
|
|
94049
94679
|
top_10: "Keywords in positions 1-10"
|
|
94050
94680
|
};
|
|
94051
|
-
var relevantPagesCommand =
|
|
94681
|
+
var relevantPagesCommand = defineCommand228({
|
|
94052
94682
|
meta: {
|
|
94053
94683
|
name: "relevant-pages",
|
|
94054
94684
|
description: `Get the top pages of a competitor domain with traffic data.
|
|
@@ -94095,7 +94725,7 @@ Examples:
|
|
|
94095
94725
|
});
|
|
94096
94726
|
|
|
94097
94727
|
// src/commands/research/web.ts
|
|
94098
|
-
import { defineCommand as
|
|
94728
|
+
import { defineCommand as defineCommand229 } from "citty";
|
|
94099
94729
|
registerSchema({
|
|
94100
94730
|
command: "research.web",
|
|
94101
94731
|
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).",
|
|
@@ -94146,7 +94776,7 @@ async function runDeepResearch(question) {
|
|
|
94146
94776
|
}
|
|
94147
94777
|
throw new Error("Deep research timed out");
|
|
94148
94778
|
}
|
|
94149
|
-
var webCommand =
|
|
94779
|
+
var webCommand = defineCommand229({
|
|
94150
94780
|
meta: {
|
|
94151
94781
|
name: "web",
|
|
94152
94782
|
description: `Search the web with AI to answer any open-ended marketing question. Uses live internet data via Google Search.
|
|
@@ -94208,7 +94838,7 @@ Examples:
|
|
|
94208
94838
|
});
|
|
94209
94839
|
|
|
94210
94840
|
// src/commands/research/index.ts
|
|
94211
|
-
var researchCommand =
|
|
94841
|
+
var researchCommand = defineCommand230({
|
|
94212
94842
|
meta: {
|
|
94213
94843
|
name: "research",
|
|
94214
94844
|
description: `Competitive intelligence and AI-powered research commands.
|
|
@@ -94258,10 +94888,10 @@ Full guide: __tooling__/docs/tools/baker/research.md`
|
|
|
94258
94888
|
});
|
|
94259
94889
|
|
|
94260
94890
|
// src/commands/scheduled-agents/index.ts
|
|
94261
|
-
import { defineCommand as
|
|
94891
|
+
import { defineCommand as defineCommand241 } from "citty";
|
|
94262
94892
|
|
|
94263
94893
|
// src/commands/scheduled-agents/create.ts
|
|
94264
|
-
import { defineCommand as
|
|
94894
|
+
import { defineCommand as defineCommand231 } from "citty";
|
|
94265
94895
|
|
|
94266
94896
|
// src/commands/scheduled-agents/shared.ts
|
|
94267
94897
|
var TEMP_SCHEDULED_AGENT_PREFIX = "temp_agent_";
|
|
@@ -94628,7 +95258,7 @@ registerSchema({
|
|
|
94628
95258
|
}
|
|
94629
95259
|
}
|
|
94630
95260
|
});
|
|
94631
|
-
var createCommand3 =
|
|
95261
|
+
var createCommand3 = defineCommand231({
|
|
94632
95262
|
meta: {
|
|
94633
95263
|
name: "create",
|
|
94634
95264
|
description: 'Stage a scheduled agent. Examples: baker scheduled-agents create --name "Weekly report" --description "..." --prompt "..." --cron "0 9 * * MON" | baker scheduled-agents create --name "Chase a new lead" --description "..." --prompt "Research {{payload.answers.company}} and draft a reply" --trigger form.submitted --form quote | baker scheduled-agents create --name "Big deals" --description "..." --prompt "..." --trigger webhook.received --when "deal.stage = won AND deal.amount > 10000" --times 3'
|
|
@@ -94685,7 +95315,7 @@ var createCommand3 = defineCommand229({
|
|
|
94685
95315
|
});
|
|
94686
95316
|
|
|
94687
95317
|
// src/commands/scheduled-agents/delete.ts
|
|
94688
|
-
import { defineCommand as
|
|
95318
|
+
import { defineCommand as defineCommand232 } from "citty";
|
|
94689
95319
|
registerSchema({
|
|
94690
95320
|
command: "scheduled-agents.delete",
|
|
94691
95321
|
description: "Stage deletion of a published scheduled agent, or cancel one this chat staged (temp_agent_*).",
|
|
@@ -94693,7 +95323,7 @@ registerSchema({
|
|
|
94693
95323
|
id: { type: "string", description: "Published scheduled agent ID or temp_agent_* draft ID", required: true }
|
|
94694
95324
|
}
|
|
94695
95325
|
});
|
|
94696
|
-
var deleteCommand3 =
|
|
95326
|
+
var deleteCommand3 = defineCommand232({
|
|
94697
95327
|
meta: {
|
|
94698
95328
|
name: "delete",
|
|
94699
95329
|
description: "Stage a scheduled agent deletion. Example: baker scheduled-agents delete <id-or-temp_agent_id>"
|
|
@@ -94722,7 +95352,7 @@ var deleteCommand3 = defineCommand230({
|
|
|
94722
95352
|
});
|
|
94723
95353
|
|
|
94724
95354
|
// src/commands/scheduled-agents/get.ts
|
|
94725
|
-
import { defineCommand as
|
|
95355
|
+
import { defineCommand as defineCommand233 } from "citty";
|
|
94726
95356
|
registerSchema({
|
|
94727
95357
|
command: "scheduled-agents.get",
|
|
94728
95358
|
description: "Get a published scheduled agent, or one this chat has staged (temp_agent_*). A published one comes with runsAs: who each run acts as ({ name, personalTools, companyTools, notSignedIn?, toolsOff? }) \u2014 the tools a run loads, which decides whether a job like reading someone's inbox can work. Its recentRuns and any draftOps this chat staged on it come with it.",
|
|
@@ -94731,7 +95361,7 @@ registerSchema({
|
|
|
94731
95361
|
chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
|
|
94732
95362
|
}
|
|
94733
95363
|
});
|
|
94734
|
-
var getCommand4 =
|
|
95364
|
+
var getCommand4 = defineCommand233({
|
|
94735
95365
|
meta: {
|
|
94736
95366
|
name: "get",
|
|
94737
95367
|
description: "Get a scheduled agent. Example: baker scheduled-agents get <id-or-temp_agent_id>"
|
|
@@ -94770,7 +95400,7 @@ var getCommand4 = defineCommand231({
|
|
|
94770
95400
|
});
|
|
94771
95401
|
|
|
94772
95402
|
// src/commands/scheduled-agents/list.ts
|
|
94773
|
-
import { defineCommand as
|
|
95403
|
+
import { defineCommand as defineCommand234 } from "citty";
|
|
94774
95404
|
var FULL_DESCRIPTION2 = "Return every item and staged change as stored, briefs included (tens of KB). Prefer `get <id>` for one item.";
|
|
94775
95405
|
registerSchema({
|
|
94776
95406
|
command: "scheduled-agents.list",
|
|
@@ -94780,7 +95410,7 @@ registerSchema({
|
|
|
94780
95410
|
full: { type: "boolean", description: FULL_DESCRIPTION2, required: false }
|
|
94781
95411
|
}
|
|
94782
95412
|
});
|
|
94783
|
-
var listCommand19 =
|
|
95413
|
+
var listCommand19 = defineCommand234({
|
|
94784
95414
|
meta: {
|
|
94785
95415
|
name: "list",
|
|
94786
95416
|
description: "List scheduled agents: id, name, trigger and status for each, plus this chat's staged changes when BAKER_CHAT_ID is set (or --chat <id> for an earlier chat's). Briefs are left out. Start here: baker scheduled-agents list; then baker scheduled-agents get <id> for one item's brief."
|
|
@@ -94806,7 +95436,7 @@ var listCommand19 = defineCommand232({
|
|
|
94806
95436
|
});
|
|
94807
95437
|
|
|
94808
95438
|
// src/commands/scheduled-agents/run.ts
|
|
94809
|
-
import { defineCommand as
|
|
95439
|
+
import { defineCommand as defineCommand235 } from "citty";
|
|
94810
95440
|
registerSchema({
|
|
94811
95441
|
command: "scheduled-agents.run",
|
|
94812
95442
|
description: "Run a published scheduled agent now, whatever its trigger says. Opens a Session immediately and returns its chatId. Does not need BAKER_CHAT_ID, and refuses a temp_agent_* id \u2014 a staged item has to be published before it can run.",
|
|
@@ -94814,7 +95444,7 @@ registerSchema({
|
|
|
94814
95444
|
id: { type: "string", description: "Published scheduled agent ID", required: true }
|
|
94815
95445
|
}
|
|
94816
95446
|
});
|
|
94817
|
-
var runCommand2 =
|
|
95447
|
+
var runCommand2 = defineCommand235({
|
|
94818
95448
|
meta: {
|
|
94819
95449
|
name: "run",
|
|
94820
95450
|
description: "Run a published scheduled agent now. Example: baker scheduled-agents run <id>"
|
|
@@ -94846,7 +95476,7 @@ var runCommand2 = defineCommand233({
|
|
|
94846
95476
|
});
|
|
94847
95477
|
|
|
94848
95478
|
// src/commands/scheduled-agents/targets.ts
|
|
94849
|
-
import { defineCommand as
|
|
95479
|
+
import { defineCommand as defineCommand236 } from "citty";
|
|
94850
95480
|
var ARGS9 = {
|
|
94851
95481
|
trigger: {
|
|
94852
95482
|
type: "string",
|
|
@@ -94880,7 +95510,7 @@ registerSchema({
|
|
|
94880
95510
|
description: "What a trigger can be pointed at: the open Tasks, the company's scheduled agents, its review sources, followed competitors, pages, Forms and their steps, Knowledge collections, tools. Returns each option's value (pass it to the matching flag on create/update) with its name.",
|
|
94881
95511
|
args: ARGS9
|
|
94882
95512
|
});
|
|
94883
|
-
var targetsCommand =
|
|
95513
|
+
var targetsCommand = defineCommand236({
|
|
94884
95514
|
meta: {
|
|
94885
95515
|
name: "targets",
|
|
94886
95516
|
description: `What a trigger can be pointed at \u2014 so "when a Task is picked up" becomes "when THIS Task is picked up".
|
|
@@ -94923,7 +95553,7 @@ Full guide: __tooling__/docs/tools/baker/scheduled-agents.md`
|
|
|
94923
95553
|
// src/commands/scheduled-agents/templates.ts
|
|
94924
95554
|
import { readFile as readFile42 } from "fs/promises";
|
|
94925
95555
|
import path55 from "path";
|
|
94926
|
-
import { defineCommand as
|
|
95556
|
+
import { defineCommand as defineCommand237 } from "citty";
|
|
94927
95557
|
registerSchema({
|
|
94928
95558
|
command: "scheduled-agents.templates",
|
|
94929
95559
|
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.",
|
|
@@ -94978,7 +95608,7 @@ registerSchema({
|
|
|
94978
95608
|
}
|
|
94979
95609
|
}
|
|
94980
95610
|
});
|
|
94981
|
-
var templatesCommand =
|
|
95611
|
+
var templatesCommand = defineCommand237({
|
|
94982
95612
|
meta: {
|
|
94983
95613
|
name: "templates",
|
|
94984
95614
|
description: `The recipes this company can run \u2014 Baker's own plus theirs, with what each one produces.
|
|
@@ -95074,7 +95704,7 @@ Full guide: __tooling__/docs/tools/baker/scheduled-agents.md`
|
|
|
95074
95704
|
});
|
|
95075
95705
|
|
|
95076
95706
|
// src/commands/scheduled-agents/triggers.ts
|
|
95077
|
-
import { defineCommand as
|
|
95707
|
+
import { defineCommand as defineCommand238 } from "citty";
|
|
95078
95708
|
var ARGS10 = {
|
|
95079
95709
|
trigger: {
|
|
95080
95710
|
type: "string",
|
|
@@ -95160,7 +95790,7 @@ function shapeTriggerCatalog(response, filter) {
|
|
|
95160
95790
|
}
|
|
95161
95791
|
return { ok: true, data: { groups, reacting: catalog.reacting } };
|
|
95162
95792
|
}
|
|
95163
|
-
var triggersCommand2 =
|
|
95793
|
+
var triggersCommand2 = defineCommand238({
|
|
95164
95794
|
meta: {
|
|
95165
95795
|
name: "triggers",
|
|
95166
95796
|
description: `Everything that can start a scheduled agent.
|
|
@@ -95190,7 +95820,7 @@ Full guide: __tooling__/docs/tools/baker/scheduled-agents.md`
|
|
|
95190
95820
|
});
|
|
95191
95821
|
|
|
95192
95822
|
// src/commands/scheduled-agents/unstage.ts
|
|
95193
|
-
import { defineCommand as
|
|
95823
|
+
import { defineCommand as defineCommand239 } from "citty";
|
|
95194
95824
|
registerSchema({
|
|
95195
95825
|
command: "scheduled-agents.unstage",
|
|
95196
95826
|
description: "Take back what this chat staged on one scheduled agent, before Publish \u2014 the same as discarding its row in the change list. With --index, only that one change (its `index` in `baker scheduled-agents list` \u2192 draft.ops). Taking back a create also takes back the edits staged on it. Never touches a published item: to change or remove one, stage update/delete instead.",
|
|
@@ -95216,7 +95846,7 @@ function unstageBody(args8, chatId) {
|
|
|
95216
95846
|
}
|
|
95217
95847
|
return { chatId, ref: args8.ref, index };
|
|
95218
95848
|
}
|
|
95219
|
-
var unstageCommand =
|
|
95849
|
+
var unstageCommand = defineCommand239({
|
|
95220
95850
|
meta: {
|
|
95221
95851
|
name: "unstage",
|
|
95222
95852
|
description: "Take back what this chat staged on a scheduled agent, before Publish. Examples: baker scheduled-agents unstage temp_agent_abc123 | baker scheduled-agents unstage <id> --index 2"
|
|
@@ -95247,7 +95877,7 @@ var unstageCommand = defineCommand237({
|
|
|
95247
95877
|
});
|
|
95248
95878
|
|
|
95249
95879
|
// src/commands/scheduled-agents/update.ts
|
|
95250
|
-
import { defineCommand as
|
|
95880
|
+
import { defineCommand as defineCommand240 } from "citty";
|
|
95251
95881
|
registerSchema({
|
|
95252
95882
|
command: "scheduled-agents.update",
|
|
95253
95883
|
description: "Stage an update to a published scheduled agent, or to one this chat staged (temp_agent_*).",
|
|
@@ -95274,7 +95904,7 @@ registerSchema({
|
|
|
95274
95904
|
enabled: { type: "string", description: "Replacement enabled state", required: false, enum: ["true", "false"] }
|
|
95275
95905
|
}
|
|
95276
95906
|
});
|
|
95277
|
-
var updateCommand4 =
|
|
95907
|
+
var updateCommand4 = defineCommand240({
|
|
95278
95908
|
meta: {
|
|
95279
95909
|
name: "update",
|
|
95280
95910
|
description: "Stage a scheduled agent update. Examples: baker scheduled-agents update <id> --enabled false | baker scheduled-agents update <id> --trigger form.submitted --form quote"
|
|
@@ -95345,7 +95975,7 @@ var updateCommand4 = defineCommand238({
|
|
|
95345
95975
|
});
|
|
95346
95976
|
|
|
95347
95977
|
// src/commands/scheduled-agents/index.ts
|
|
95348
|
-
var scheduledAgentsCommand =
|
|
95978
|
+
var scheduledAgentsCommand = defineCommand241({
|
|
95349
95979
|
meta: {
|
|
95350
95980
|
name: "scheduled-agents",
|
|
95351
95981
|
description: `Manage Scheduled agents. Subcommands: list, get, triggers, targets, create, update, delete, unstage, run, templates.
|
|
@@ -95388,14 +96018,14 @@ Full guide: __tooling__/docs/tools/baker/scheduled-agents.md`
|
|
|
95388
96018
|
});
|
|
95389
96019
|
|
|
95390
96020
|
// src/commands/schema.ts
|
|
95391
|
-
import { defineCommand as
|
|
96021
|
+
import { defineCommand as defineCommand242 } from "citty";
|
|
95392
96022
|
function narrowToFamily(commandName, available) {
|
|
95393
96023
|
const segments = commandName.split(".");
|
|
95394
96024
|
const prefix = segments[0] === "ads" && segments[1] ? `ads.${segments[1]}.` : `${segments[0]}.`;
|
|
95395
96025
|
const siblings = available.filter((name) => name.startsWith(prefix));
|
|
95396
96026
|
return siblings.length > 0 ? siblings : available;
|
|
95397
96027
|
}
|
|
95398
|
-
var schemaCommand2 =
|
|
96028
|
+
var schemaCommand2 = defineCommand242({
|
|
95399
96029
|
meta: {
|
|
95400
96030
|
name: "schema",
|
|
95401
96031
|
description: "Inspect command argument schemas (for AI agent introspection). Lists all commands if no argument given. Example: baker schema images search (or images.search)"
|
|
@@ -95440,10 +96070,10 @@ var schemaCommand2 = defineCommand240({
|
|
|
95440
96070
|
});
|
|
95441
96071
|
|
|
95442
96072
|
// src/commands/studio/index.ts
|
|
95443
|
-
import { defineCommand as
|
|
96073
|
+
import { defineCommand as defineCommand251 } from "citty";
|
|
95444
96074
|
|
|
95445
96075
|
// src/commands/studio/animate.ts
|
|
95446
|
-
import { defineCommand as
|
|
96076
|
+
import { defineCommand as defineCommand243 } from "citty";
|
|
95447
96077
|
|
|
95448
96078
|
// src/commands/studio/spokenPace.ts
|
|
95449
96079
|
var WORDS_PER_SECOND = SPOKEN_WORDS_PER_SECOND;
|
|
@@ -95956,7 +96586,7 @@ async function adByHandHintFor(body) {
|
|
|
95956
96586
|
return null;
|
|
95957
96587
|
}
|
|
95958
96588
|
}
|
|
95959
|
-
var animateCommand =
|
|
96589
|
+
var animateCommand = defineCommand243({
|
|
95960
96590
|
meta: {
|
|
95961
96591
|
name: "animate",
|
|
95962
96592
|
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"
|
|
@@ -96081,7 +96711,7 @@ var animateCommand = defineCommand241({
|
|
|
96081
96711
|
});
|
|
96082
96712
|
|
|
96083
96713
|
// src/commands/studio/generate.ts
|
|
96084
|
-
import { defineCommand as
|
|
96714
|
+
import { defineCommand as defineCommand244 } from "citty";
|
|
96085
96715
|
var MODEL_LIST2 = IMAGE_MODEL_IDS;
|
|
96086
96716
|
var DEFAULT_MAX_WAIT_MS2 = 24e4;
|
|
96087
96717
|
registerSchema({
|
|
@@ -96217,7 +96847,7 @@ function buildGenerateBody(args8, prompt) {
|
|
|
96217
96847
|
}
|
|
96218
96848
|
return body;
|
|
96219
96849
|
}
|
|
96220
|
-
var generateCommand =
|
|
96850
|
+
var generateCommand = defineCommand244({
|
|
96221
96851
|
meta: {
|
|
96222
96852
|
name: "generate",
|
|
96223
96853
|
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 (default \u2014 fast, best at editing a reference and at extreme ratios), google/gemini-3-pro-image (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]]'"
|
|
@@ -96300,7 +96930,7 @@ var generateCommand = defineCommand242({
|
|
|
96300
96930
|
});
|
|
96301
96931
|
|
|
96302
96932
|
// src/commands/studio/get.ts
|
|
96303
|
-
import { defineCommand as
|
|
96933
|
+
import { defineCommand as defineCommand245 } from "citty";
|
|
96304
96934
|
registerSchema({
|
|
96305
96935
|
command: "studio.get",
|
|
96306
96936
|
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.",
|
|
@@ -96309,7 +96939,7 @@ registerSchema({
|
|
|
96309
96939
|
full: { type: "boolean", description: "Include settings, references and attribution", required: false }
|
|
96310
96940
|
}
|
|
96311
96941
|
});
|
|
96312
|
-
var getCommand5 =
|
|
96942
|
+
var getCommand5 = defineCommand245({
|
|
96313
96943
|
meta: {
|
|
96314
96944
|
name: "get",
|
|
96315
96945
|
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"
|
|
@@ -96338,7 +96968,7 @@ var getCommand5 = defineCommand243({
|
|
|
96338
96968
|
});
|
|
96339
96969
|
|
|
96340
96970
|
// src/commands/studio/improve.ts
|
|
96341
|
-
import { defineCommand as
|
|
96971
|
+
import { defineCommand as defineCommand246 } from "citty";
|
|
96342
96972
|
var DESCRIPTION7 = "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.";
|
|
96343
96973
|
registerSchema({
|
|
96344
96974
|
command: "studio.improve",
|
|
@@ -96363,7 +96993,7 @@ registerSchema({
|
|
|
96363
96993
|
}
|
|
96364
96994
|
}
|
|
96365
96995
|
});
|
|
96366
|
-
var improveCommand =
|
|
96996
|
+
var improveCommand = defineCommand246({
|
|
96367
96997
|
meta: {
|
|
96368
96998
|
name: "improve",
|
|
96369
96999
|
description: `${DESCRIPTION7}
|
|
@@ -96407,7 +97037,7 @@ Examples:
|
|
|
96407
97037
|
});
|
|
96408
97038
|
|
|
96409
97039
|
// src/commands/studio/keep.ts
|
|
96410
|
-
import { defineCommand as
|
|
97040
|
+
import { defineCommand as defineCommand247 } from "citty";
|
|
96411
97041
|
registerSchema({
|
|
96412
97042
|
command: "studio.keep",
|
|
96413
97043
|
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.",
|
|
@@ -96417,7 +97047,7 @@ registerSchema({
|
|
|
96417
97047
|
undo: { type: "boolean", description: "Un-star an image, or take a kept clip back out", required: false }
|
|
96418
97048
|
}
|
|
96419
97049
|
});
|
|
96420
|
-
var keepCommand =
|
|
97050
|
+
var keepCommand = defineCommand247({
|
|
96421
97051
|
meta: {
|
|
96422
97052
|
name: "keep",
|
|
96423
97053
|
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"
|
|
@@ -96468,7 +97098,7 @@ var keepCommand = defineCommand245({
|
|
|
96468
97098
|
});
|
|
96469
97099
|
|
|
96470
97100
|
// src/commands/studio/list.ts
|
|
96471
|
-
import { defineCommand as
|
|
97101
|
+
import { defineCommand as defineCommand248 } from "citty";
|
|
96472
97102
|
registerSchema({
|
|
96473
97103
|
command: "studio.list",
|
|
96474
97104
|
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.",
|
|
@@ -96479,7 +97109,7 @@ registerSchema({
|
|
|
96479
97109
|
full: { type: "boolean", description: "Include settings, references and attribution", required: false }
|
|
96480
97110
|
}
|
|
96481
97111
|
});
|
|
96482
|
-
var listCommand20 =
|
|
97112
|
+
var listCommand20 = defineCommand248({
|
|
96483
97113
|
meta: {
|
|
96484
97114
|
name: "list",
|
|
96485
97115
|
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"
|
|
@@ -96513,7 +97143,7 @@ var listCommand20 = defineCommand246({
|
|
|
96513
97143
|
});
|
|
96514
97144
|
|
|
96515
97145
|
// src/commands/studio/models.ts
|
|
96516
|
-
import { defineCommand as
|
|
97146
|
+
import { defineCommand as defineCommand249 } from "citty";
|
|
96517
97147
|
var DESCRIPTION8 = "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.";
|
|
96518
97148
|
registerSchema({
|
|
96519
97149
|
command: "studio.models",
|
|
@@ -96600,7 +97230,7 @@ function buildModelCards(kind, model) {
|
|
|
96600
97230
|
const selected = model ? ids2.filter((id) => id === model) : ids2;
|
|
96601
97231
|
return selected.map((id) => build(id));
|
|
96602
97232
|
}
|
|
96603
|
-
var modelsCommand =
|
|
97233
|
+
var modelsCommand = defineCommand249({
|
|
96604
97234
|
meta: {
|
|
96605
97235
|
name: "models",
|
|
96606
97236
|
description: `${DESCRIPTION8}
|
|
@@ -96647,13 +97277,13 @@ Examples:
|
|
|
96647
97277
|
});
|
|
96648
97278
|
|
|
96649
97279
|
// src/commands/studio/skills.ts
|
|
96650
|
-
import { defineCommand as
|
|
97280
|
+
import { defineCommand as defineCommand250 } from "citty";
|
|
96651
97281
|
registerSchema({
|
|
96652
97282
|
command: "studio.skills",
|
|
96653
97283
|
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.",
|
|
96654
97284
|
args: {}
|
|
96655
97285
|
});
|
|
96656
|
-
var skillsCommand =
|
|
97286
|
+
var skillsCommand = defineCommand250({
|
|
96657
97287
|
meta: {
|
|
96658
97288
|
name: "skills",
|
|
96659
97289
|
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"
|
|
@@ -96677,7 +97307,7 @@ var skillsCommand = defineCommand248({
|
|
|
96677
97307
|
});
|
|
96678
97308
|
|
|
96679
97309
|
// src/commands/studio/index.ts
|
|
96680
|
-
var studioCommand =
|
|
97310
|
+
var studioCommand = defineCommand251({
|
|
96681
97311
|
meta: {
|
|
96682
97312
|
name: "studio",
|
|
96683
97313
|
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.
|
|
@@ -96720,10 +97350,10 @@ Full guide: __tooling__/docs/tools/baker/studio.md`
|
|
|
96720
97350
|
});
|
|
96721
97351
|
|
|
96722
97352
|
// src/commands/tag-manager/index.ts
|
|
96723
|
-
import { defineCommand as
|
|
97353
|
+
import { defineCommand as defineCommand255 } from "citty";
|
|
96724
97354
|
|
|
96725
97355
|
// src/commands/tag-manager/draft.ts
|
|
96726
|
-
import { defineCommand as
|
|
97356
|
+
import { defineCommand as defineCommand252 } from "citty";
|
|
96727
97357
|
|
|
96728
97358
|
// src/commands/tag-manager/shared.ts
|
|
96729
97359
|
import { readFileSync as readFileSync23 } from "fs";
|
|
@@ -96849,13 +97479,13 @@ registerSchema({
|
|
|
96849
97479
|
chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
|
|
96850
97480
|
}
|
|
96851
97481
|
});
|
|
96852
|
-
var draftCommand6 =
|
|
97482
|
+
var draftCommand6 = defineCommand252({
|
|
96853
97483
|
meta: {
|
|
96854
97484
|
name: "draft",
|
|
96855
97485
|
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."
|
|
96856
97486
|
},
|
|
96857
97487
|
subCommands: {
|
|
96858
|
-
list:
|
|
97488
|
+
list: defineCommand252({
|
|
96859
97489
|
meta: {
|
|
96860
97490
|
name: "list",
|
|
96861
97491
|
description: "Review everything staged on this chat (--json for the raw envelope)"
|
|
@@ -96868,7 +97498,7 @@ var draftCommand6 = defineCommand250({
|
|
|
96868
97498
|
await draftList2(args8.json === true, args8.chat);
|
|
96869
97499
|
}
|
|
96870
97500
|
}),
|
|
96871
|
-
show:
|
|
97501
|
+
show: defineCommand252({
|
|
96872
97502
|
meta: {
|
|
96873
97503
|
name: "show",
|
|
96874
97504
|
description: "Print the full staged payload for one change \u2014 the receipt to verify it looks right before publish (never truncated)."
|
|
@@ -96885,7 +97515,7 @@ var draftCommand6 = defineCommand250({
|
|
|
96885
97515
|
);
|
|
96886
97516
|
}
|
|
96887
97517
|
}),
|
|
96888
|
-
amend:
|
|
97518
|
+
amend: defineCommand252({
|
|
96889
97519
|
meta: {
|
|
96890
97520
|
name: "amend",
|
|
96891
97521
|
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."
|
|
@@ -96902,7 +97532,7 @@ var draftCommand6 = defineCommand250({
|
|
|
96902
97532
|
});
|
|
96903
97533
|
}
|
|
96904
97534
|
}),
|
|
96905
|
-
remove:
|
|
97535
|
+
remove: defineCommand252({
|
|
96906
97536
|
meta: { name: "remove", description: "Remove one staged change (cascades to anything depending on it)" },
|
|
96907
97537
|
args: { ref: { type: "positional", description: "Staged ref (gtm_temp_*) or target", required: false } },
|
|
96908
97538
|
run: async ({ args: args8 }) => {
|
|
@@ -96911,7 +97541,7 @@ var draftCommand6 = defineCommand250({
|
|
|
96911
97541
|
});
|
|
96912
97542
|
}
|
|
96913
97543
|
}),
|
|
96914
|
-
clear:
|
|
97544
|
+
clear: defineCommand252({
|
|
96915
97545
|
meta: { name: "clear", description: "Discard all Tag Manager changes staged on this chat" },
|
|
96916
97546
|
run: async () => {
|
|
96917
97547
|
await draftAction3("/api/tag-manager/draft/clear", {});
|
|
@@ -96921,7 +97551,7 @@ var draftCommand6 = defineCommand250({
|
|
|
96921
97551
|
});
|
|
96922
97552
|
|
|
96923
97553
|
// src/commands/tag-manager/read.ts
|
|
96924
|
-
import { defineCommand as
|
|
97554
|
+
import { defineCommand as defineCommand253 } from "citty";
|
|
96925
97555
|
registerSchema({
|
|
96926
97556
|
command: "tagManager.containers",
|
|
96927
97557
|
description: "List the Google Tag Manager containers this company selected. There can be several, and Baker may read and change all of them. Start here to confirm which containers you are managing.",
|
|
@@ -96969,7 +97599,7 @@ function containersHints(containers, unavailableContainers = []) {
|
|
|
96969
97599
|
}
|
|
96970
97600
|
return hints2;
|
|
96971
97601
|
}
|
|
96972
|
-
var containersCommand =
|
|
97602
|
+
var containersCommand = defineCommand253({
|
|
96973
97603
|
meta: {
|
|
96974
97604
|
name: "containers",
|
|
96975
97605
|
description: `List Tag Manager containers selected by this company.
|
|
@@ -96986,7 +97616,7 @@ Start here:
|
|
|
96986
97616
|
}
|
|
96987
97617
|
}
|
|
96988
97618
|
});
|
|
96989
|
-
var readCommand =
|
|
97619
|
+
var readCommand = defineCommand253({
|
|
96990
97620
|
meta: {
|
|
96991
97621
|
name: "read",
|
|
96992
97622
|
description: `Read the current contents of the Tag Manager container \u2014 always do this before staging changes.
|
|
@@ -97028,7 +97658,7 @@ Examples:
|
|
|
97028
97658
|
});
|
|
97029
97659
|
|
|
97030
97660
|
// src/commands/tag-manager/write-commands.ts
|
|
97031
|
-
import { defineCommand as
|
|
97661
|
+
import { defineCommand as defineCommand254 } from "citty";
|
|
97032
97662
|
var CONTAINER_ARG_DESCRIPTION = "Numeric container id (optional only when one container is connected \u2014 run `baker tag-manager containers`)";
|
|
97033
97663
|
var ENTITIES = [
|
|
97034
97664
|
{
|
|
@@ -97084,10 +97714,10 @@ for (const { entity, noun, createHint } of ENTITIES) {
|
|
|
97084
97714
|
});
|
|
97085
97715
|
}
|
|
97086
97716
|
function entityCommand(entity, noun, example) {
|
|
97087
|
-
return
|
|
97717
|
+
return defineCommand254({
|
|
97088
97718
|
meta: { name: entity, description: `Stage ${noun} changes on this chat's Tag Manager draft` },
|
|
97089
97719
|
subCommands: {
|
|
97090
|
-
create:
|
|
97720
|
+
create: defineCommand254({
|
|
97091
97721
|
meta: {
|
|
97092
97722
|
name: "create",
|
|
97093
97723
|
description: `Stage a new ${noun}
|
|
@@ -97109,7 +97739,7 @@ Examples:
|
|
|
97109
97739
|
});
|
|
97110
97740
|
}
|
|
97111
97741
|
}),
|
|
97112
|
-
update:
|
|
97742
|
+
update: defineCommand254({
|
|
97113
97743
|
meta: {
|
|
97114
97744
|
name: "update",
|
|
97115
97745
|
description: `Stage an update to an existing ${noun} (pass its id or path)`
|
|
@@ -97129,7 +97759,7 @@ Examples:
|
|
|
97129
97759
|
});
|
|
97130
97760
|
}
|
|
97131
97761
|
}),
|
|
97132
|
-
delete:
|
|
97762
|
+
delete: defineCommand254({
|
|
97133
97763
|
meta: { name: "delete", description: `Stage the deletion of a ${noun} (pass its id or path)` },
|
|
97134
97764
|
args: {
|
|
97135
97765
|
id: { type: "positional", description: `${noun} id or path`, required: false },
|
|
@@ -97170,7 +97800,7 @@ function builtinTypes(args8) {
|
|
|
97170
97800
|
}
|
|
97171
97801
|
return raw.split(",").map((entry) => entry.trim());
|
|
97172
97802
|
}
|
|
97173
|
-
var builtinCommand =
|
|
97803
|
+
var builtinCommand = defineCommand254({
|
|
97174
97804
|
meta: {
|
|
97175
97805
|
name: "builtin",
|
|
97176
97806
|
description: `Enable or disable built-in variables
|
|
@@ -97180,7 +97810,7 @@ Examples:
|
|
|
97180
97810
|
baker tag-manager builtin disable --types formId`
|
|
97181
97811
|
},
|
|
97182
97812
|
subCommands: {
|
|
97183
|
-
enable:
|
|
97813
|
+
enable: defineCommand254({
|
|
97184
97814
|
meta: { name: "enable", description: "Stage enabling built-in variables" },
|
|
97185
97815
|
args: {
|
|
97186
97816
|
types: { type: "string", description: "Comma-separated types", required: false },
|
|
@@ -97194,7 +97824,7 @@ Examples:
|
|
|
97194
97824
|
});
|
|
97195
97825
|
}
|
|
97196
97826
|
}),
|
|
97197
|
-
disable:
|
|
97827
|
+
disable: defineCommand254({
|
|
97198
97828
|
meta: { name: "disable", description: "Stage disabling built-in variables" },
|
|
97199
97829
|
args: {
|
|
97200
97830
|
types: { type: "string", description: "Comma-separated types", required: false },
|
|
@@ -97212,7 +97842,7 @@ Examples:
|
|
|
97212
97842
|
});
|
|
97213
97843
|
|
|
97214
97844
|
// src/commands/tag-manager/index.ts
|
|
97215
|
-
var tagManagerCommand =
|
|
97845
|
+
var tagManagerCommand = defineCommand255({
|
|
97216
97846
|
meta: {
|
|
97217
97847
|
name: "tag-manager",
|
|
97218
97848
|
description: `Read and change what lives inside the client's Google Tag Manager container \u2014 tags, triggers, variables, folders and built-in variables.
|
|
@@ -97249,7 +97879,7 @@ Full guide: __tooling__/docs/tools/baker/tag-manager.md`
|
|
|
97249
97879
|
});
|
|
97250
97880
|
|
|
97251
97881
|
// src/commands/tags/index.ts
|
|
97252
|
-
import { defineCommand as
|
|
97882
|
+
import { defineCommand as defineCommand256 } from "citty";
|
|
97253
97883
|
|
|
97254
97884
|
// src/commands/tags/shared.ts
|
|
97255
97885
|
function failApi3(err) {
|
|
@@ -97329,7 +97959,7 @@ async function listTags(json) {
|
|
|
97329
97959
|
var listArgs12 = {
|
|
97330
97960
|
json: { type: "boolean", description: "Print the raw JSON envelope instead of the readable list" }
|
|
97331
97961
|
};
|
|
97332
|
-
var listCommand21 =
|
|
97962
|
+
var listCommand21 = defineCommand256({
|
|
97333
97963
|
meta: {
|
|
97334
97964
|
name: "list",
|
|
97335
97965
|
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"
|
|
@@ -97348,7 +97978,7 @@ async function listDraft4(chat) {
|
|
|
97348
97978
|
failApi3(err);
|
|
97349
97979
|
}
|
|
97350
97980
|
}
|
|
97351
|
-
var draftCommand7 =
|
|
97981
|
+
var draftCommand7 = defineCommand256({
|
|
97352
97982
|
meta: {
|
|
97353
97983
|
name: "draft",
|
|
97354
97984
|
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."
|
|
@@ -97358,7 +97988,7 @@ var draftCommand7 = defineCommand254({
|
|
|
97358
97988
|
await listDraft4(args8.chat);
|
|
97359
97989
|
}
|
|
97360
97990
|
});
|
|
97361
|
-
var tagsCommand4 =
|
|
97991
|
+
var tagsCommand4 = defineCommand256({
|
|
97362
97992
|
meta: {
|
|
97363
97993
|
name: "tags",
|
|
97364
97994
|
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.
|
|
@@ -97387,10 +98017,10 @@ Full guide: __tooling__/docs/tools/baker/tags.md`
|
|
|
97387
98017
|
});
|
|
97388
98018
|
|
|
97389
98019
|
// src/commands/testimonials/index.ts
|
|
97390
|
-
import { defineCommand as
|
|
98020
|
+
import { defineCommand as defineCommand266 } from "citty";
|
|
97391
98021
|
|
|
97392
98022
|
// src/commands/testimonials/get.ts
|
|
97393
|
-
import { defineCommand as
|
|
98023
|
+
import { defineCommand as defineCommand257 } from "citty";
|
|
97394
98024
|
registerSchema({
|
|
97395
98025
|
command: "testimonials.get",
|
|
97396
98026
|
description: "Get a single testimonial by ID",
|
|
@@ -97398,7 +98028,7 @@ registerSchema({
|
|
|
97398
98028
|
id: { type: "string", description: "Testimonial ID", required: true }
|
|
97399
98029
|
}
|
|
97400
98030
|
});
|
|
97401
|
-
var getCommand6 =
|
|
98031
|
+
var getCommand6 = defineCommand257({
|
|
97402
98032
|
meta: { name: "get", description: "Get a single testimonial by ID. Example: baker testimonials get j571abc123" },
|
|
97403
98033
|
args: {
|
|
97404
98034
|
id: { type: "positional", description: "Testimonial ID", required: false },
|
|
@@ -97435,7 +98065,7 @@ var getCommand6 = defineCommand255({
|
|
|
97435
98065
|
});
|
|
97436
98066
|
|
|
97437
98067
|
// src/commands/testimonials/list.ts
|
|
97438
|
-
import { defineCommand as
|
|
98068
|
+
import { defineCommand as defineCommand258 } from "citty";
|
|
97439
98069
|
|
|
97440
98070
|
// src/commands/testimonials/emptyCorpusHints.ts
|
|
97441
98071
|
function resolveEmptyReason({
|
|
@@ -97592,7 +98222,7 @@ function buildListParams(args8) {
|
|
|
97592
98222
|
}
|
|
97593
98223
|
return params;
|
|
97594
98224
|
}
|
|
97595
|
-
var listCommand22 =
|
|
98225
|
+
var listCommand22 = defineCommand258({
|
|
97596
98226
|
meta: {
|
|
97597
98227
|
name: "list",
|
|
97598
98228
|
description: "List testimonials with optional filters. Example: baker testimonials list --source google --sentiment positive"
|
|
@@ -97656,7 +98286,7 @@ var listCommand22 = defineCommand256({
|
|
|
97656
98286
|
});
|
|
97657
98287
|
|
|
97658
98288
|
// src/commands/testimonials/search.ts
|
|
97659
|
-
import { defineCommand as
|
|
98289
|
+
import { defineCommand as defineCommand259 } from "citty";
|
|
97660
98290
|
var FILTER_FLAGS2 = ["source", "rating-min", "rating-max", "status", "sentiment", "language", "tags"];
|
|
97661
98291
|
function languageBiasHint(results, requestedLanguage) {
|
|
97662
98292
|
if (requestedLanguage) {
|
|
@@ -97735,7 +98365,7 @@ function buildSearchRequest(query, args8) {
|
|
|
97735
98365
|
}
|
|
97736
98366
|
return body;
|
|
97737
98367
|
}
|
|
97738
|
-
var searchCommand4 =
|
|
98368
|
+
var searchCommand4 = defineCommand259({
|
|
97739
98369
|
meta: {
|
|
97740
98370
|
name: "search",
|
|
97741
98371
|
description: "Semantic search testimonials by text query. Uses hybrid BM25 + vector + reranking. Example: baker testimonials search 'great service' --rating-min 4"
|
|
@@ -97800,10 +98430,10 @@ var searchCommand4 = defineCommand257({
|
|
|
97800
98430
|
});
|
|
97801
98431
|
|
|
97802
98432
|
// src/commands/testimonials/sources/index.ts
|
|
97803
|
-
import { defineCommand as
|
|
98433
|
+
import { defineCommand as defineCommand265 } from "citty";
|
|
97804
98434
|
|
|
97805
98435
|
// src/commands/testimonials/sources/add.ts
|
|
97806
|
-
import { defineCommand as
|
|
98436
|
+
import { defineCommand as defineCommand260 } from "citty";
|
|
97807
98437
|
|
|
97808
98438
|
// src/commands/testimonials/sources/shared.ts
|
|
97809
98439
|
function reportError3(err) {
|
|
@@ -97877,7 +98507,7 @@ function addSourceHints(input, { created, source }) {
|
|
|
97877
98507
|
}
|
|
97878
98508
|
return hints2;
|
|
97879
98509
|
}
|
|
97880
|
-
var addCommand4 =
|
|
98510
|
+
var addCommand4 = defineCommand260({
|
|
97881
98511
|
meta: {
|
|
97882
98512
|
name: "add",
|
|
97883
98513
|
description: `Add a review page as a testimonial source. Start here with the page's link; for Google Maps a business name also works.
|
|
@@ -97913,7 +98543,7 @@ Examples:
|
|
|
97913
98543
|
});
|
|
97914
98544
|
|
|
97915
98545
|
// src/commands/testimonials/sources/list.ts
|
|
97916
|
-
import { defineCommand as
|
|
98546
|
+
import { defineCommand as defineCommand261 } from "citty";
|
|
97917
98547
|
registerSchema({
|
|
97918
98548
|
command: "testimonials.sources.list",
|
|
97919
98549
|
description: "List the review pages feeding the testimonials library: each one's id, site, import status and how many reviews it has brought in.",
|
|
@@ -97933,7 +98563,7 @@ function listSourceHints(sources) {
|
|
|
97933
98563
|
}
|
|
97934
98564
|
return hints2;
|
|
97935
98565
|
}
|
|
97936
|
-
var listCommand23 =
|
|
98566
|
+
var listCommand23 = defineCommand261({
|
|
97937
98567
|
meta: {
|
|
97938
98568
|
name: "list",
|
|
97939
98569
|
description: "List testimonial sources (id, site, import status, reviews imported).\n\nExample: baker testimonials sources list"
|
|
@@ -97951,13 +98581,13 @@ var listCommand23 = defineCommand259({
|
|
|
97951
98581
|
});
|
|
97952
98582
|
|
|
97953
98583
|
// src/commands/testimonials/sources/remove.ts
|
|
97954
|
-
import { defineCommand as
|
|
98584
|
+
import { defineCommand as defineCommand262 } from "citty";
|
|
97955
98585
|
registerSchema({
|
|
97956
98586
|
command: "testimonials.sources.remove",
|
|
97957
98587
|
description: "Remove a review source AND every testimonial it imported (and their pictures). Applies immediately and cannot be undone \u2014 only when the user asked for it.",
|
|
97958
98588
|
args: { id: { type: "string", description: "Source id from `testimonials sources list`", required: true } }
|
|
97959
98589
|
});
|
|
97960
|
-
var removeCommand8 =
|
|
98590
|
+
var removeCommand8 = defineCommand262({
|
|
97961
98591
|
meta: {
|
|
97962
98592
|
name: "remove",
|
|
97963
98593
|
description: "Remove a review source and all its testimonials (cannot be undone).\n\nExample: baker testimonials sources remove <source-id>"
|
|
@@ -97976,7 +98606,7 @@ var removeCommand8 = defineCommand260({
|
|
|
97976
98606
|
});
|
|
97977
98607
|
|
|
97978
98608
|
// src/commands/testimonials/sources/schedule.ts
|
|
97979
|
-
import { defineCommand as
|
|
98609
|
+
import { defineCommand as defineCommand263 } from "citty";
|
|
97980
98610
|
var INTERVALS = testimonialSourceRefreshIntervalSchema.options.join("|");
|
|
97981
98611
|
registerSchema({
|
|
97982
98612
|
command: "testimonials.sources.schedule",
|
|
@@ -97986,7 +98616,7 @@ registerSchema({
|
|
|
97986
98616
|
every: { type: "string", description: `Auto-sync cadence: ${INTERVALS}`, required: true }
|
|
97987
98617
|
}
|
|
97988
98618
|
});
|
|
97989
|
-
var scheduleCommand2 =
|
|
98619
|
+
var scheduleCommand2 = defineCommand263({
|
|
97990
98620
|
meta: {
|
|
97991
98621
|
name: "schedule",
|
|
97992
98622
|
description: "Set a review source's auto-sync cadence.\n\nExample: baker testimonials sources schedule <source-id> --every monthly"
|
|
@@ -98011,13 +98641,13 @@ var scheduleCommand2 = defineCommand261({
|
|
|
98011
98641
|
});
|
|
98012
98642
|
|
|
98013
98643
|
// src/commands/testimonials/sources/sync.ts
|
|
98014
|
-
import { defineCommand as
|
|
98644
|
+
import { defineCommand as defineCommand264 } from "citty";
|
|
98015
98645
|
registerSchema({
|
|
98016
98646
|
command: "testimonials.sources.sync",
|
|
98017
98647
|
description: "Import a review source's new reviews now. Only reviews newer than the last import are read where the site allows it.",
|
|
98018
98648
|
args: { id: { type: "string", description: "Source id from `testimonials sources list`", required: true } }
|
|
98019
98649
|
});
|
|
98020
|
-
var syncCommand2 =
|
|
98650
|
+
var syncCommand2 = defineCommand264({
|
|
98021
98651
|
meta: {
|
|
98022
98652
|
name: "sync",
|
|
98023
98653
|
description: "Import a review source's new reviews now.\n\nExample: baker testimonials sources sync <source-id>"
|
|
@@ -98040,7 +98670,7 @@ var syncCommand2 = defineCommand262({
|
|
|
98040
98670
|
});
|
|
98041
98671
|
|
|
98042
98672
|
// src/commands/testimonials/sources/index.ts
|
|
98043
|
-
var sourcesCommand2 =
|
|
98673
|
+
var sourcesCommand2 = defineCommand265({
|
|
98044
98674
|
meta: {
|
|
98045
98675
|
name: "sources",
|
|
98046
98676
|
description: `The review pages the testimonials come from: Google Maps, Trustpilot, Yelp, Tripadvisor, G2, Capterra, Amazon, App Store, Google Play. Subcommands: add, list, sync, schedule, remove.
|
|
@@ -98065,7 +98695,7 @@ Examples:
|
|
|
98065
98695
|
var tagsCommand5 = makeTagsCommand("testimonials", "testimonial", "/api/testimonials/tags");
|
|
98066
98696
|
|
|
98067
98697
|
// src/commands/testimonials/index.ts
|
|
98068
|
-
var testimonialsCommand =
|
|
98698
|
+
var testimonialsCommand = defineCommand266({
|
|
98069
98699
|
meta: {
|
|
98070
98700
|
name: "testimonials",
|
|
98071
98701
|
description: `Find and browse testimonials in Baker, and manage the review pages they come from. Subcommands: search, get, list, tags, sources.
|
|
@@ -98089,10 +98719,10 @@ Full guide: __tooling__/docs/tools/baker/testimonials.md`
|
|
|
98089
98719
|
});
|
|
98090
98720
|
|
|
98091
98721
|
// src/commands/videos/index.ts
|
|
98092
|
-
import { defineCommand as
|
|
98722
|
+
import { defineCommand as defineCommand275 } from "citty";
|
|
98093
98723
|
|
|
98094
98724
|
// src/commands/videos/delete.ts
|
|
98095
|
-
import { defineCommand as
|
|
98725
|
+
import { defineCommand as defineCommand267 } from "citty";
|
|
98096
98726
|
registerSchema({
|
|
98097
98727
|
command: "videos.delete",
|
|
98098
98728
|
description: "Delete a video by ID",
|
|
@@ -98106,7 +98736,7 @@ registerSchema({
|
|
|
98106
98736
|
}
|
|
98107
98737
|
}
|
|
98108
98738
|
});
|
|
98109
|
-
var deleteCommand4 =
|
|
98739
|
+
var deleteCommand4 = defineCommand267({
|
|
98110
98740
|
meta: {
|
|
98111
98741
|
name: "delete",
|
|
98112
98742
|
description: "Delete a video by ID. Use --dry-run to preview. Example: baker videos delete j571abc123 --dry-run"
|
|
@@ -98147,7 +98777,7 @@ var deleteCommand4 = defineCommand265({
|
|
|
98147
98777
|
});
|
|
98148
98778
|
|
|
98149
98779
|
// src/commands/videos/describe.ts
|
|
98150
|
-
import { defineCommand as
|
|
98780
|
+
import { defineCommand as defineCommand268 } from "citty";
|
|
98151
98781
|
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.";
|
|
98152
98782
|
registerSchema({
|
|
98153
98783
|
command: "videos.describe",
|
|
@@ -98164,7 +98794,7 @@ registerSchema({
|
|
|
98164
98794
|
full: { type: "boolean", description: "Return the whole library row, not just what changed", required: false }
|
|
98165
98795
|
}
|
|
98166
98796
|
});
|
|
98167
|
-
var describeCommand2 =
|
|
98797
|
+
var describeCommand2 = defineCommand268({
|
|
98168
98798
|
meta: {
|
|
98169
98799
|
name: "describe",
|
|
98170
98800
|
description: `Correct what the library says a video is. Only the fields you pass change; the rest keep their current values.
|
|
@@ -98226,7 +98856,7 @@ import { constants } from "fs";
|
|
|
98226
98856
|
import { copyFile as copyFile2, mkdir as mkdir17, mkdtemp as mkdtemp3, rm as rm10 } from "fs/promises";
|
|
98227
98857
|
import { tmpdir as tmpdir4 } from "os";
|
|
98228
98858
|
import path56 from "path";
|
|
98229
|
-
import { defineCommand as
|
|
98859
|
+
import { defineCommand as defineCommand269 } from "citty";
|
|
98230
98860
|
|
|
98231
98861
|
// src/commands/videos/videoPlatforms.ts
|
|
98232
98862
|
var PLATFORM_DOMAINS = {
|
|
@@ -98364,7 +98994,7 @@ function positiveInt(value2) {
|
|
|
98364
98994
|
const parsed = typeof value2 === "string" ? Number.parseInt(value2, 10) : Number.NaN;
|
|
98365
98995
|
return Number.isInteger(parsed) && parsed > 0 ? parsed : void 0;
|
|
98366
98996
|
}
|
|
98367
|
-
var fetchCommand2 =
|
|
98997
|
+
var fetchCommand2 = defineCommand269({
|
|
98368
98998
|
meta: {
|
|
98369
98999
|
name: "fetch",
|
|
98370
99000
|
description: "Download a video page to a local .mp4 without adding it to the library. Same downloader as `ingest` (proxy fallback, duration check).\n\nExample: baker videos fetch https://www.youtube.com/watch?v=abc123 --out ./clips"
|
|
@@ -98450,7 +99080,7 @@ async function placeInto(outDir, source, stem) {
|
|
|
98450
99080
|
}
|
|
98451
99081
|
|
|
98452
99082
|
// src/commands/videos/get.ts
|
|
98453
|
-
import { defineCommand as
|
|
99083
|
+
import { defineCommand as defineCommand270 } from "citty";
|
|
98454
99084
|
registerSchema({
|
|
98455
99085
|
command: "videos.get",
|
|
98456
99086
|
description: "Get a single video by ID",
|
|
@@ -98458,7 +99088,7 @@ registerSchema({
|
|
|
98458
99088
|
id: { type: "string", description: "Video ID", required: true }
|
|
98459
99089
|
}
|
|
98460
99090
|
});
|
|
98461
|
-
var getCommand7 =
|
|
99091
|
+
var getCommand7 = defineCommand270({
|
|
98462
99092
|
meta: { name: "get", description: "Get a single video by ID. Example: baker videos get j571abc123" },
|
|
98463
99093
|
args: {
|
|
98464
99094
|
id: { type: "positional", description: "Video ID", required: false },
|
|
@@ -98495,7 +99125,7 @@ var getCommand7 = defineCommand268({
|
|
|
98495
99125
|
});
|
|
98496
99126
|
|
|
98497
99127
|
// src/commands/videos/group.ts
|
|
98498
|
-
import { defineCommand as
|
|
99128
|
+
import { defineCommand as defineCommand271 } from "citty";
|
|
98499
99129
|
registerSchema({
|
|
98500
99130
|
command: "videos.group",
|
|
98501
99131
|
description: "List every clip and image that arrived in the same set as this video (carousel slides, one page)",
|
|
@@ -98504,7 +99134,7 @@ registerSchema({
|
|
|
98504
99134
|
"group-key": { type: "string", description: "The set key directly, when you already have it", required: false }
|
|
98505
99135
|
}
|
|
98506
99136
|
});
|
|
98507
|
-
var groupCommand2 =
|
|
99137
|
+
var groupCommand2 = defineCommand271({
|
|
98508
99138
|
meta: {
|
|
98509
99139
|
name: "group",
|
|
98510
99140
|
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>"
|
|
@@ -98527,7 +99157,7 @@ var groupCommand2 = defineCommand269({
|
|
|
98527
99157
|
import { mkdtemp as mkdtemp4, rm as rm11, stat as stat12 } from "fs/promises";
|
|
98528
99158
|
import { tmpdir as tmpdir5 } from "os";
|
|
98529
99159
|
import path57 from "path";
|
|
98530
|
-
import { defineCommand as
|
|
99160
|
+
import { defineCommand as defineCommand272 } from "citty";
|
|
98531
99161
|
|
|
98532
99162
|
// src/lib/streamUpload.ts
|
|
98533
99163
|
import { createHash as createHash3 } from "crypto";
|
|
@@ -98580,7 +99210,7 @@ registerSchema({
|
|
|
98580
99210
|
"dry-run": { type: "boolean", description: "Preview the operation without executing", required: false }
|
|
98581
99211
|
}
|
|
98582
99212
|
});
|
|
98583
|
-
var ingestCommand2 =
|
|
99213
|
+
var ingestCommand2 = defineCommand272({
|
|
98584
99214
|
meta: {
|
|
98585
99215
|
name: "ingest",
|
|
98586
99216
|
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"
|
|
@@ -98842,7 +99472,7 @@ async function uploadToAssetStore(filePath, sizeBytes) {
|
|
|
98842
99472
|
}
|
|
98843
99473
|
|
|
98844
99474
|
// src/commands/videos/search.ts
|
|
98845
|
-
import { defineCommand as
|
|
99475
|
+
import { defineCommand as defineCommand273 } from "citty";
|
|
98846
99476
|
registerSchema({
|
|
98847
99477
|
command: "videos.search",
|
|
98848
99478
|
description: "Search videos by text query. Only returns ready videos.",
|
|
@@ -98868,7 +99498,7 @@ function searchHints(results) {
|
|
|
98868
99498
|
}
|
|
98869
99499
|
return hints2.length > 0 ? hints2 : void 0;
|
|
98870
99500
|
}
|
|
98871
|
-
var searchCommand5 =
|
|
99501
|
+
var searchCommand5 = defineCommand273({
|
|
98872
99502
|
meta: {
|
|
98873
99503
|
name: "search",
|
|
98874
99504
|
description: "Semantic search videos by text query. Uses hybrid BM25 + vector + reranking. Example: baker videos search 'product demo' --tags tutorial"
|
|
@@ -98920,7 +99550,7 @@ var tagsCommand6 = makeTagsCommand("videos", "video", "/api/videos/tags");
|
|
|
98920
99550
|
// src/commands/videos/upload.ts
|
|
98921
99551
|
import { stat as stat13 } from "fs/promises";
|
|
98922
99552
|
import { basename as basename4 } from "path";
|
|
98923
|
-
import { defineCommand as
|
|
99553
|
+
import { defineCommand as defineCommand274 } from "citty";
|
|
98924
99554
|
registerSchema({
|
|
98925
99555
|
command: "videos.upload",
|
|
98926
99556
|
description: "Upload a video to Baker \u2014 a local file (via Mux direct upload) or a remote http(s) URL.",
|
|
@@ -98947,7 +99577,7 @@ registerSchema({
|
|
|
98947
99577
|
function isRemoteUrl3(value2) {
|
|
98948
99578
|
return /^https?:\/\//i.test(value2);
|
|
98949
99579
|
}
|
|
98950
|
-
var uploadCommand2 =
|
|
99580
|
+
var uploadCommand2 = defineCommand274({
|
|
98951
99581
|
meta: {
|
|
98952
99582
|
name: "upload",
|
|
98953
99583
|
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"
|
|
@@ -99016,7 +99646,7 @@ var uploadCommand2 = defineCommand272({
|
|
|
99016
99646
|
});
|
|
99017
99647
|
|
|
99018
99648
|
// src/commands/videos/index.ts
|
|
99019
|
-
var videosCommand =
|
|
99649
|
+
var videosCommand = defineCommand275({
|
|
99020
99650
|
meta: {
|
|
99021
99651
|
name: "videos",
|
|
99022
99652
|
description: `Find and manage videos in Baker. Subcommands: search, get, upload, ingest, fetch, describe, delete, tags.
|
|
@@ -99047,10 +99677,10 @@ Full guide: __tooling__/docs/tools/baker/videos.md`
|
|
|
99047
99677
|
});
|
|
99048
99678
|
|
|
99049
99679
|
// src/commands/winning-ads/index.ts
|
|
99050
|
-
import { defineCommand as
|
|
99680
|
+
import { defineCommand as defineCommand286 } from "citty";
|
|
99051
99681
|
|
|
99052
99682
|
// src/commands/winning-ads/advertisers.ts
|
|
99053
|
-
import { defineCommand as
|
|
99683
|
+
import { defineCommand as defineCommand276 } from "citty";
|
|
99054
99684
|
|
|
99055
99685
|
// src/commands/winning-ads/shared.ts
|
|
99056
99686
|
function splitList4(value2) {
|
|
@@ -99103,7 +99733,7 @@ function advertiserNormalizer(record, full) {
|
|
|
99103
99733
|
last_synced_at: record.last_synced_at ?? null
|
|
99104
99734
|
};
|
|
99105
99735
|
}
|
|
99106
|
-
var advertisersCommand2 =
|
|
99736
|
+
var advertisersCommand2 = defineCommand276({
|
|
99107
99737
|
meta: {
|
|
99108
99738
|
name: "advertisers",
|
|
99109
99739
|
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'
|
|
@@ -99161,7 +99791,7 @@ var advertisersCommand2 = defineCommand274({
|
|
|
99161
99791
|
});
|
|
99162
99792
|
|
|
99163
99793
|
// src/commands/winning-ads/content.ts
|
|
99164
|
-
import { defineCommand as
|
|
99794
|
+
import { defineCommand as defineCommand277 } from "citty";
|
|
99165
99795
|
registerSchema({
|
|
99166
99796
|
command: "winning-ads.content",
|
|
99167
99797
|
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. Static and carousel ads return the text drawn into the image with the job each piece does (headline, benefit, cta\u2026), the card it sits on, and their format_pattern. Add --full for how it is built (composition, colours, CTA, markers), how it persuades (awareness, mechanism, pains, desires, proof, objections), what it offers (offer type, price, guarantee, urgency), plus speech, pacing and soundtrack for video.",
|
|
@@ -99174,7 +99804,7 @@ registerSchema({
|
|
|
99174
99804
|
}
|
|
99175
99805
|
}
|
|
99176
99806
|
});
|
|
99177
|
-
var contentCommand =
|
|
99807
|
+
var contentCommand = defineCommand277({
|
|
99178
99808
|
meta: {
|
|
99179
99809
|
name: "content",
|
|
99180
99810
|
description: "Read the transcript + on-screen text + copy of one winning ad; --full adds its build, persuasion and offer. Example: baker winning-ads content adg_123 --platform meta --full --output md"
|
|
@@ -99223,7 +99853,7 @@ var contentCommand = defineCommand275({
|
|
|
99223
99853
|
});
|
|
99224
99854
|
|
|
99225
99855
|
// src/commands/winning-ads/feed.ts
|
|
99226
|
-
import { defineCommand as
|
|
99856
|
+
import { defineCommand as defineCommand278 } from "citty";
|
|
99227
99857
|
function buildFeedParams(input) {
|
|
99228
99858
|
const params = {};
|
|
99229
99859
|
const advertiser = splitList4(input.advertiser);
|
|
@@ -99275,7 +99905,7 @@ registerSchema({
|
|
|
99275
99905
|
format: { type: "string", description: "Comma-separated formats to include (e.g. static,video)", required: false }
|
|
99276
99906
|
}
|
|
99277
99907
|
});
|
|
99278
|
-
var feedCommand2 =
|
|
99908
|
+
var feedCommand2 = defineCommand278({
|
|
99279
99909
|
meta: {
|
|
99280
99910
|
name: "feed",
|
|
99281
99911
|
description: "Winners across every brand you follow (browse, then trim per advertiser). Example: baker winning-ads feed --per-advertiser 5 --output md"
|
|
@@ -99360,7 +99990,7 @@ var feedCommand2 = defineCommand276({
|
|
|
99360
99990
|
});
|
|
99361
99991
|
|
|
99362
99992
|
// src/commands/winning-ads/follow.ts
|
|
99363
|
-
import { defineCommand as
|
|
99993
|
+
import { defineCommand as defineCommand279 } from "citty";
|
|
99364
99994
|
var PLATFORMS = adLibraryPlatformSchema.options;
|
|
99365
99995
|
registerSchema({
|
|
99366
99996
|
command: "winning-ads.follow",
|
|
@@ -99375,7 +100005,7 @@ registerSchema({
|
|
|
99375
100005
|
label: { type: "string", description: "Optional display label (defaults to the resolved name)", required: false }
|
|
99376
100006
|
}
|
|
99377
100007
|
});
|
|
99378
|
-
var followCommand =
|
|
100008
|
+
var followCommand = defineCommand279({
|
|
99379
100009
|
meta: {
|
|
99380
100010
|
name: "follow",
|
|
99381
100011
|
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'
|
|
@@ -99422,7 +100052,7 @@ var followCommand = defineCommand277({
|
|
|
99422
100052
|
});
|
|
99423
100053
|
|
|
99424
100054
|
// src/commands/winning-ads/follow-competitors.ts
|
|
99425
|
-
import { defineCommand as
|
|
100055
|
+
import { defineCommand as defineCommand280 } from "citty";
|
|
99426
100056
|
var PLATFORMS2 = adLibraryPlatformSchema.options;
|
|
99427
100057
|
var BATCH_TIMEOUT_MS = 3e5;
|
|
99428
100058
|
function buildFollowBatchBody(input) {
|
|
@@ -99455,7 +100085,7 @@ registerSchema({
|
|
|
99455
100085
|
}
|
|
99456
100086
|
}
|
|
99457
100087
|
});
|
|
99458
|
-
var followCompetitorsCommand =
|
|
100088
|
+
var followCompetitorsCommand = defineCommand280({
|
|
99459
100089
|
meta: {
|
|
99460
100090
|
name: "follow-competitors",
|
|
99461
100091
|
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"'
|
|
@@ -99530,7 +100160,7 @@ var followCompetitorsCommand = defineCommand278({
|
|
|
99530
100160
|
});
|
|
99531
100161
|
|
|
99532
100162
|
// src/commands/winning-ads/following.ts
|
|
99533
|
-
import { defineCommand as
|
|
100163
|
+
import { defineCommand as defineCommand281 } from "citty";
|
|
99534
100164
|
registerSchema({
|
|
99535
100165
|
command: "winning-ads.following",
|
|
99536
100166
|
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.",
|
|
@@ -99584,7 +100214,7 @@ function followingNormalizer(record, full) {
|
|
|
99584
100214
|
platforms: Array.isArray(record.platforms) ? record.platforms : []
|
|
99585
100215
|
};
|
|
99586
100216
|
}
|
|
99587
|
-
var followingCommand =
|
|
100217
|
+
var followingCommand = defineCommand281({
|
|
99588
100218
|
meta: {
|
|
99589
100219
|
name: "following",
|
|
99590
100220
|
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"
|
|
@@ -99620,7 +100250,7 @@ var followingCommand = defineCommand279({
|
|
|
99620
100250
|
});
|
|
99621
100251
|
|
|
99622
100252
|
// src/commands/winning-ads/search.ts
|
|
99623
|
-
import { defineCommand as
|
|
100253
|
+
import { defineCommand as defineCommand282 } from "citty";
|
|
99624
100254
|
registerSchema({
|
|
99625
100255
|
command: "winning-ads.search",
|
|
99626
100256
|
description: "Search the ad-dna corpus of scored winning ads, the company's followed brands first. Returns a lean shortlist (advertiser, summary, scores, days_active/active/winner_category as proof, media_url, and visual/container/mechanism when known) to pick a reference to reproduce. Each search is a paid reranker + judge call: one strong search, at most one adjusted retry. A value outside a closed list (--platform, --format, --winner-category, --awareness, --format-pattern, --sort) is refused with error.fix.validValues.",
|
|
@@ -99898,7 +100528,7 @@ function writeSearchResult(data, opts) {
|
|
|
99898
100528
|
writeOutput({ ok: true, data: rawResults, ...withHints2 }, opts.output, opts.fields, opts.full, winningAdNormalizer);
|
|
99899
100529
|
}
|
|
99900
100530
|
var SEARCH_TIMEOUT_MS = 12e4;
|
|
99901
|
-
var searchCommand6 =
|
|
100531
|
+
var searchCommand6 = defineCommand282({
|
|
99902
100532
|
meta: {
|
|
99903
100533
|
name: "search",
|
|
99904
100534
|
description: "Search winning reference ads, the company's followed brands first. Start here: baker winning-ads search 'B2B SaaS before/after AI automation' --platform meta --format static --exclude-advertiser adv_123 --output md. A set of references for N concepts in one call: add --diverse --limit N. The best proven ad in one container from any category: --format-pattern comparison_table (no query needed; add --sort longest_running to order by staying power). Each search is a paid reranker + judge call: one strong search, at most one adjusted retry."
|
|
@@ -100024,7 +100654,7 @@ var searchCommand6 = defineCommand280({
|
|
|
100024
100654
|
});
|
|
100025
100655
|
|
|
100026
100656
|
// src/commands/winning-ads/seeds.ts
|
|
100027
|
-
import { defineCommand as
|
|
100657
|
+
import { defineCommand as defineCommand283 } from "citty";
|
|
100028
100658
|
function leanRow(r) {
|
|
100029
100659
|
return {
|
|
100030
100660
|
key: r.key,
|
|
@@ -100052,7 +100682,7 @@ function makeSeedCommand(opts) {
|
|
|
100052
100682
|
limit: { type: "number", description: "Max keys 1-100 (default 20)", required: false, default: 20 }
|
|
100053
100683
|
}
|
|
100054
100684
|
});
|
|
100055
|
-
return
|
|
100685
|
+
return defineCommand283({
|
|
100056
100686
|
meta: { name: opts.name, description: opts.description },
|
|
100057
100687
|
args: {
|
|
100058
100688
|
platform: { type: "string", description: "Single platform to segment on", required: false },
|
|
@@ -100101,7 +100731,7 @@ var formatsCommand = makeSeedCommand({
|
|
|
100101
100731
|
});
|
|
100102
100732
|
|
|
100103
100733
|
// src/commands/winning-ads/unfollow.ts
|
|
100104
|
-
import { defineCommand as
|
|
100734
|
+
import { defineCommand as defineCommand284 } from "citty";
|
|
100105
100735
|
registerSchema({
|
|
100106
100736
|
command: "winning-ads.unfollow",
|
|
100107
100737
|
description: "Stop following a brand \u2014 removes it from your ad-dna library by advertiser id.",
|
|
@@ -100109,7 +100739,7 @@ registerSchema({
|
|
|
100109
100739
|
advertiser: { type: "string", description: "Advertiser id to unfollow", required: true }
|
|
100110
100740
|
}
|
|
100111
100741
|
});
|
|
100112
|
-
var unfollowCommand =
|
|
100742
|
+
var unfollowCommand = defineCommand284({
|
|
100113
100743
|
meta: {
|
|
100114
100744
|
name: "unfollow",
|
|
100115
100745
|
description: "Stop following a brand by advertiser id. Example: baker winning-ads unfollow adv_123"
|
|
@@ -100130,7 +100760,7 @@ var unfollowCommand = defineCommand282({
|
|
|
100130
100760
|
});
|
|
100131
100761
|
|
|
100132
100762
|
// src/commands/winning-ads/winners.ts
|
|
100133
|
-
import { defineCommand as
|
|
100763
|
+
import { defineCommand as defineCommand285 } from "citty";
|
|
100134
100764
|
registerSchema({
|
|
100135
100765
|
command: "winning-ads.winners",
|
|
100136
100766
|
description: "Top winning ads for one advertiser id (from `advertisers` or `following`). Returns lean winner cards; add --full for DNA + longevity.",
|
|
@@ -100140,7 +100770,7 @@ registerSchema({
|
|
|
100140
100770
|
platform: { type: "string", description: "Filter to a single platform: meta|linkedin|tiktok", required: false }
|
|
100141
100771
|
}
|
|
100142
100772
|
});
|
|
100143
|
-
var winnersCommand =
|
|
100773
|
+
var winnersCommand = defineCommand285({
|
|
100144
100774
|
meta: {
|
|
100145
100775
|
name: "winners",
|
|
100146
100776
|
description: "Top winning ads for a specific advertiser id. Example: baker winning-ads winners adv_123 --top 15 --output md"
|
|
@@ -100190,7 +100820,7 @@ var winnersCommand = defineCommand283({
|
|
|
100190
100820
|
});
|
|
100191
100821
|
|
|
100192
100822
|
// src/commands/winning-ads/index.ts
|
|
100193
|
-
var winningAdsCommand =
|
|
100823
|
+
var winningAdsCommand = defineCommand286({
|
|
100194
100824
|
meta: {
|
|
100195
100825
|
name: "winning-ads",
|
|
100196
100826
|
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.
|
|
@@ -100258,7 +100888,7 @@ function getCliVersion() {
|
|
|
100258
100888
|
}
|
|
100259
100889
|
|
|
100260
100890
|
// src/cli.ts
|
|
100261
|
-
var main =
|
|
100891
|
+
var main = defineCommand287({
|
|
100262
100892
|
meta: {
|
|
100263
100893
|
name: "baker",
|
|
100264
100894
|
version: getCliVersion(),
|