@koda-sl/baker-cli 0.200.0 → 0.201.0-dev.6e39c93b9
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 -0
- package/dist/{chunk-5MPIOGRO.js → chunk-N3PUPOWW.js} +4 -4
- package/dist/chunk-N3PUPOWW.js.map +1 -0
- package/dist/cli.js +567 -472
- package/dist/cli.js.map +1 -1
- package/dist/engine/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-5MPIOGRO.js.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
toModelSafeImage,
|
|
51
51
|
ulid,
|
|
52
52
|
validateCanvasDeep
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-N3PUPOWW.js";
|
|
54
54
|
import {
|
|
55
55
|
csvOrJson,
|
|
56
56
|
daysAgoIso,
|
|
@@ -99,7 +99,7 @@ import {
|
|
|
99
99
|
} from "./chunk-6NZG2TCM.js";
|
|
100
100
|
|
|
101
101
|
// src/cli.ts
|
|
102
|
-
import { defineCommand as
|
|
102
|
+
import { defineCommand as defineCommand214, runMain } from "citty";
|
|
103
103
|
|
|
104
104
|
// src/commands/actions/index.ts
|
|
105
105
|
import { defineCommand as defineCommand18 } from "citty";
|
|
@@ -18388,7 +18388,7 @@ Performance (the workhorse):
|
|
|
18388
18388
|
baker ads meta insights --object act_123 --level ad --intent ranking \u2014 flag creatives to refresh
|
|
18389
18389
|
baker ads meta insights --object act_123 --level adset --breakdowns publisher_platform,age \u2014 placement \xD7 age
|
|
18390
18390
|
baker ads meta insights --object act_123 --level ad --since 2026-01-01 --until 2026-03-31 \u2014 auto-async
|
|
18391
|
-
baker ads meta insights --list-
|
|
18391
|
+
baker ads meta insights --list-intents
|
|
18392
18392
|
|
|
18393
18393
|
Audit & review:
|
|
18394
18394
|
baker ads meta activities --account-id act_123 --days 14
|
|
@@ -19922,127 +19922,13 @@ Full guides: __tooling__/docs/tools/baker/ads-<platform>.md (google|meta|linkedi
|
|
|
19922
19922
|
}
|
|
19923
19923
|
});
|
|
19924
19924
|
|
|
19925
|
-
// src/commands/agents/index.ts
|
|
19926
|
-
import { defineCommand as defineCommand89 } from "citty";
|
|
19927
|
-
|
|
19928
|
-
// src/commands/agents/list.ts
|
|
19929
|
-
import { defineCommand as defineCommand87 } from "citty";
|
|
19930
|
-
|
|
19931
|
-
// src/commands/agents/shared.ts
|
|
19932
|
-
function failValidation2(message) {
|
|
19933
|
-
writeJson({ ok: false, error: { code: "VALIDATION_ERROR", message } });
|
|
19934
|
-
process.exit(1);
|
|
19935
|
-
}
|
|
19936
|
-
function failApi2(err) {
|
|
19937
|
-
if (err instanceof ApiError) {
|
|
19938
|
-
writeJson({ ok: false, error: { code: err.code, message: err.message } });
|
|
19939
|
-
process.exit(1);
|
|
19940
|
-
}
|
|
19941
|
-
const message = err instanceof Error ? err.message : "Unexpected error";
|
|
19942
|
-
writeJson({ ok: false, error: { code: "INTERNAL_ERROR", message } });
|
|
19943
|
-
process.exit(1);
|
|
19944
|
-
}
|
|
19945
|
-
|
|
19946
|
-
// src/commands/agents/list.ts
|
|
19947
|
-
registerSchema({
|
|
19948
|
-
command: "agents.list",
|
|
19949
|
-
description: "The Baker agents that exist, with what each one does. Start here before recommending one, so you name a real teammate rather than inventing one.",
|
|
19950
|
-
args: {}
|
|
19951
|
-
});
|
|
19952
|
-
var listCommand10 = defineCommand87({
|
|
19953
|
-
meta: {
|
|
19954
|
-
name: "list",
|
|
19955
|
-
description: "List the Baker agents and what each does. Example: baker agents list"
|
|
19956
|
-
},
|
|
19957
|
-
run: async () => {
|
|
19958
|
-
try {
|
|
19959
|
-
const response = await apiPost(
|
|
19960
|
-
"/api/official-agents/list",
|
|
19961
|
-
{}
|
|
19962
|
-
);
|
|
19963
|
-
writeJson(response);
|
|
19964
|
-
} catch (err) {
|
|
19965
|
-
failApi2(err);
|
|
19966
|
-
}
|
|
19967
|
-
}
|
|
19968
|
-
});
|
|
19969
|
-
|
|
19970
|
-
// src/commands/agents/recommend.ts
|
|
19971
|
-
import { defineCommand as defineCommand88 } from "citty";
|
|
19972
|
-
registerSchema({
|
|
19973
|
-
command: "agents.recommend",
|
|
19974
|
-
description: "Suggest the company switch on another Baker agent, because the work you just found belongs to it. Does not block or wait \u2014 it records the suggestion on that agent's card in Tasks and your run carries on. Calling it again refreshes the same suggestion instead of stacking another, and a suggestion the company dismissed stays dismissed. Start here: baker agents list.",
|
|
19975
|
-
args: {
|
|
19976
|
-
agent: { type: "string", description: "Agent id to recommend, from `baker agents list`", required: true },
|
|
19977
|
-
from: { type: "string", description: "Your own agent id \u2014 who is making the suggestion", required: true },
|
|
19978
|
-
reason: {
|
|
19979
|
-
type: "string",
|
|
19980
|
-
description: "Why, in the company's own terms, naming what you found. Shown verbatim next to the switch, so write it for a marketer, not for us.",
|
|
19981
|
-
required: true
|
|
19982
|
-
}
|
|
19983
|
-
}
|
|
19984
|
-
});
|
|
19985
|
-
var recommendCommand = defineCommand88({
|
|
19986
|
-
meta: {
|
|
19987
|
-
name: "recommend",
|
|
19988
|
-
description: 'Suggest switching on another Baker agent. Example: baker agents recommend --agent baker-cro --from baker-analytics-reporter --reason "Your quote page gets the most traffic and converts the worst; Baker CRO is the one that fixes that."'
|
|
19989
|
-
},
|
|
19990
|
-
args: {
|
|
19991
|
-
agent: { type: "string", description: "Agent id to recommend", required: false },
|
|
19992
|
-
from: { type: "string", description: "Your own agent id", required: false },
|
|
19993
|
-
reason: { type: "string", description: "Why, in the company's terms", required: false }
|
|
19994
|
-
},
|
|
19995
|
-
run: async ({ args }) => {
|
|
19996
|
-
try {
|
|
19997
|
-
const agent = args.agent;
|
|
19998
|
-
const from = args.from;
|
|
19999
|
-
const reason = args.reason;
|
|
20000
|
-
if (!agent || !from || !reason) {
|
|
20001
|
-
failValidation2("--agent, --from and --reason are all required.");
|
|
20002
|
-
}
|
|
20003
|
-
if (agent === from) {
|
|
20004
|
-
failValidation2("An agent cannot recommend itself.");
|
|
20005
|
-
}
|
|
20006
|
-
const env = getEnv();
|
|
20007
|
-
const response = await apiPost("/api/official-agents/recommend", {
|
|
20008
|
-
agentId: agent,
|
|
20009
|
-
fromAgentId: from,
|
|
20010
|
-
reason,
|
|
20011
|
-
...env.BAKER_CHAT_ID ? { chatId: env.BAKER_CHAT_ID } : {}
|
|
20012
|
-
});
|
|
20013
|
-
writeJson(response);
|
|
20014
|
-
} catch (err) {
|
|
20015
|
-
failApi2(err);
|
|
20016
|
-
}
|
|
20017
|
-
}
|
|
20018
|
-
});
|
|
20019
|
-
|
|
20020
|
-
// src/commands/agents/index.ts
|
|
20021
|
-
var agentsCommand = defineCommand89({
|
|
20022
|
-
meta: {
|
|
20023
|
-
name: "agents",
|
|
20024
|
-
description: `The other Baker agents, and how to ask for one. Subcommands: list, recommend.
|
|
20025
|
-
|
|
20026
|
-
Use this when the work in front of you belongs to a different agent than the one you are. Recommending does not block your run \u2014 it leaves the suggestion on that agent's card in Tasks, next to the switch that turns it on.
|
|
20027
|
-
|
|
20028
|
-
Examples:
|
|
20029
|
-
baker agents list
|
|
20030
|
-
baker agents recommend --agent baker-cro --from baker-analytics-reporter --reason "Your quote page gets the most traffic and converts the worst."
|
|
20031
|
-
Full guide: __tooling__/docs/tools/baker/agents.md`
|
|
20032
|
-
},
|
|
20033
|
-
subCommands: {
|
|
20034
|
-
list: listCommand10,
|
|
20035
|
-
recommend: recommendCommand
|
|
20036
|
-
}
|
|
20037
|
-
});
|
|
20038
|
-
|
|
20039
19925
|
// src/commands/brand/index.ts
|
|
20040
|
-
import { defineCommand as
|
|
19926
|
+
import { defineCommand as defineCommand88 } from "citty";
|
|
20041
19927
|
|
|
20042
19928
|
// src/commands/brand/fonts.ts
|
|
20043
19929
|
import { mkdir, readFile, writeFile } from "fs/promises";
|
|
20044
19930
|
import path from "path";
|
|
20045
|
-
import { defineCommand as
|
|
19931
|
+
import { defineCommand as defineCommand87 } from "citty";
|
|
20046
19932
|
|
|
20047
19933
|
// src/engine/brand/fonts.ts
|
|
20048
19934
|
var GOOGLE_CSS2 = "https://fonts.googleapis.com/css2";
|
|
@@ -20214,7 +20100,7 @@ async function readGlobalCss() {
|
|
|
20214
20100
|
return "";
|
|
20215
20101
|
}
|
|
20216
20102
|
}
|
|
20217
|
-
var fontsCheckCommand =
|
|
20103
|
+
var fontsCheckCommand = defineCommand87({
|
|
20218
20104
|
meta: {
|
|
20219
20105
|
name: "check",
|
|
20220
20106
|
description: "Verify the brand's fonts really exist. For every family/weight src/styles/global.css requests from Google Fonts, ask Google what it actually serves and report anything missing \u2014 a weight nobody serves renders as a synthesized fallback and looks off-brand everywhere."
|
|
@@ -20258,7 +20144,7 @@ var fontsCheckCommand = defineCommand90({
|
|
|
20258
20144
|
});
|
|
20259
20145
|
}
|
|
20260
20146
|
});
|
|
20261
|
-
var fontsFetchCommand =
|
|
20147
|
+
var fontsFetchCommand = defineCommand87({
|
|
20262
20148
|
meta: {
|
|
20263
20149
|
name: "fetch",
|
|
20264
20150
|
description: "Download a Google font into src/brand/fonts/ and print the @font-face block to paste above @theme in src/styles/global.css. Use when a brand font should be self-hosted rather than requested from Google on every page load."
|
|
@@ -20340,7 +20226,7 @@ var fontsFetchCommand = defineCommand90({
|
|
|
20340
20226
|
});
|
|
20341
20227
|
}
|
|
20342
20228
|
});
|
|
20343
|
-
var fontsCommand =
|
|
20229
|
+
var fontsCommand = defineCommand87({
|
|
20344
20230
|
meta: {
|
|
20345
20231
|
name: "fonts",
|
|
20346
20232
|
description: `Verify and self-host the brand's typefaces.
|
|
@@ -20358,7 +20244,7 @@ Subcommands:
|
|
|
20358
20244
|
});
|
|
20359
20245
|
|
|
20360
20246
|
// src/commands/brand/index.ts
|
|
20361
|
-
var brandCommand =
|
|
20247
|
+
var brandCommand = defineCommand88({
|
|
20362
20248
|
meta: {
|
|
20363
20249
|
name: "brand",
|
|
20364
20250
|
description: `Brand asset verification for src/brand/.
|
|
@@ -20374,11 +20260,11 @@ Subcommands:
|
|
|
20374
20260
|
});
|
|
20375
20261
|
|
|
20376
20262
|
// src/commands/canvas/index.ts
|
|
20377
|
-
import { defineCommand as
|
|
20263
|
+
import { defineCommand as defineCommand99 } from "citty";
|
|
20378
20264
|
|
|
20379
20265
|
// src/commands/canvas/catalog.ts
|
|
20380
|
-
import { defineCommand as
|
|
20381
|
-
var catalogCommand =
|
|
20266
|
+
import { defineCommand as defineCommand89 } from "citty";
|
|
20267
|
+
var catalogCommand = defineCommand89({
|
|
20382
20268
|
meta: {
|
|
20383
20269
|
name: "catalog",
|
|
20384
20270
|
description: "Print the agent-facing node catalog (JSON Schema). Includes every registered node grouped by category."
|
|
@@ -20393,7 +20279,7 @@ var catalogCommand = defineCommand92({
|
|
|
20393
20279
|
// src/commands/canvas/critique.ts
|
|
20394
20280
|
import { readFile as readFile2 } from "fs/promises";
|
|
20395
20281
|
import path2 from "path";
|
|
20396
|
-
import { defineCommand as
|
|
20282
|
+
import { defineCommand as defineCommand90 } from "citty";
|
|
20397
20283
|
|
|
20398
20284
|
// src/engine/scaffold/lib/critique.ts
|
|
20399
20285
|
var VIBE_CUE = /\b(light|lighting|golden|moody|warm|cool|tone|grade|contrast|shadow|glow|rim|backlit|neon|soft)\b/i;
|
|
@@ -20513,7 +20399,7 @@ function critiqueCanvas(canvas) {
|
|
|
20513
20399
|
}
|
|
20514
20400
|
|
|
20515
20401
|
// src/commands/canvas/critique.ts
|
|
20516
|
-
var critiqueCommand =
|
|
20402
|
+
var critiqueCommand = defineCommand90({
|
|
20517
20403
|
meta: {
|
|
20518
20404
|
name: "critique",
|
|
20519
20405
|
description: "Pre-spend creative critic (ADVISORY \u2014 never blocks). Scores a scaffolded creative BEFORE the billed render, so weak spots get fixed for free. A VIDEO creative is scored on hook strength, sound-off first-frame legibility, retention risk, and mechanism clarity; a STATIC ad on baked-text legibility risk, identity grounding, brand-type fidelity, and mechanism clarity. Ground a video hook against `baker winning-ads hooks` for a proven pattern."
|
|
@@ -20555,9 +20441,9 @@ import { execFile } from "child_process";
|
|
|
20555
20441
|
import { readdir, readFile as readFile3, stat } from "fs/promises";
|
|
20556
20442
|
import path3 from "path";
|
|
20557
20443
|
import { promisify } from "util";
|
|
20558
|
-
import { defineCommand as
|
|
20444
|
+
import { defineCommand as defineCommand91 } from "citty";
|
|
20559
20445
|
var execFileAsync = promisify(execFile);
|
|
20560
|
-
var inspectCommand =
|
|
20446
|
+
var inspectCommand = defineCommand91({
|
|
20561
20447
|
meta: {
|
|
20562
20448
|
name: "inspect",
|
|
20563
20449
|
description: "Dump a one-page summary of a canvas run: per-node duration + cache status, list of output files in the run dir, and optionally three thumbnail frames per video output. Pass either a run_id (resolved against --outputs-dir) or an absolute run directory."
|
|
@@ -20665,12 +20551,12 @@ async function probeDuration(filePath) {
|
|
|
20665
20551
|
|
|
20666
20552
|
// src/commands/canvas/rerun.ts
|
|
20667
20553
|
import path15 from "path";
|
|
20668
|
-
import { defineCommand as
|
|
20554
|
+
import { defineCommand as defineCommand93 } from "citty";
|
|
20669
20555
|
|
|
20670
20556
|
// src/commands/canvas/run.ts
|
|
20671
20557
|
import { readFile as readFile10 } from "fs/promises";
|
|
20672
20558
|
import path14 from "path";
|
|
20673
|
-
import { defineCommand as
|
|
20559
|
+
import { defineCommand as defineCommand92 } from "citty";
|
|
20674
20560
|
|
|
20675
20561
|
// src/commands/canvas/normalize-paths.ts
|
|
20676
20562
|
import { existsSync as existsSync3, realpathSync } from "fs";
|
|
@@ -24921,7 +24807,7 @@ async function restoreRunSnapshot(manifest, targetDir, opts = {}) {
|
|
|
24921
24807
|
}
|
|
24922
24808
|
|
|
24923
24809
|
// src/commands/canvas/run.ts
|
|
24924
|
-
var runCommand =
|
|
24810
|
+
var runCommand = defineCommand92({
|
|
24925
24811
|
meta: { name: "run", description: "Validate and execute a canvas JSON file." },
|
|
24926
24812
|
args: {
|
|
24927
24813
|
file: { type: "positional", required: true, description: "Path to canvas JSON" },
|
|
@@ -25301,7 +25187,7 @@ async function postInitialRunRecord(client, payload) {
|
|
|
25301
25187
|
|
|
25302
25188
|
// src/commands/canvas/rerun.ts
|
|
25303
25189
|
var SLUG_PATTERN = /^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/;
|
|
25304
|
-
var rerunCommand =
|
|
25190
|
+
var rerunCommand = defineCommand93({
|
|
25305
25191
|
meta: {
|
|
25306
25192
|
name: "rerun",
|
|
25307
25193
|
description: "Re-run a creative's latest recorded canvas. Restores its definition files from run history first, so it works in a fresh workspace that never had the source chat's files \u2014 an interrupted run resumes (in-flight jobs re-attach), a completed one re-renders from the cache."
|
|
@@ -25398,7 +25284,7 @@ async function fetchManifest(url) {
|
|
|
25398
25284
|
// src/commands/canvas/scaffold-static-ad.ts
|
|
25399
25285
|
import { access, mkdir as mkdir6, readFile as readFile12, writeFile as writeFile8 } from "fs/promises";
|
|
25400
25286
|
import path19 from "path";
|
|
25401
|
-
import { defineCommand as
|
|
25287
|
+
import { defineCommand as defineCommand95 } from "citty";
|
|
25402
25288
|
|
|
25403
25289
|
// src/engine/scaffold/staticAd.ts
|
|
25404
25290
|
import { z as z24 } from "zod";
|
|
@@ -25748,7 +25634,7 @@ function isValidScaffoldSlug(slug) {
|
|
|
25748
25634
|
// src/commands/canvas/sync-definition.ts
|
|
25749
25635
|
import { readdir as readdir5, readFile as readFile11, stat as stat3 } from "fs/promises";
|
|
25750
25636
|
import path18 from "path";
|
|
25751
|
-
import { defineCommand as
|
|
25637
|
+
import { defineCommand as defineCommand94 } from "citty";
|
|
25752
25638
|
|
|
25753
25639
|
// src/commands/canvas/definition-graph.ts
|
|
25754
25640
|
var MAX_NODES = 300;
|
|
@@ -25861,7 +25747,7 @@ async function resolveCanvasPath(inputPath) {
|
|
|
25861
25747
|
const chosen = (slug ? canvases.find((name) => name === `${slug}.canvas.json`) : void 0) ?? canvases[0];
|
|
25862
25748
|
return chosen ? path18.join(dir, chosen) : null;
|
|
25863
25749
|
}
|
|
25864
|
-
var syncDefinitionCommand =
|
|
25750
|
+
var syncDefinitionCommand = defineCommand94({
|
|
25865
25751
|
meta: {
|
|
25866
25752
|
name: "sync-definition",
|
|
25867
25753
|
description: "Push a creative's current node-graph + input thumbnails to the dashboard without rendering. Runs automatically when you edit a creative's canvas.json or prompt.json."
|
|
@@ -26091,7 +25977,7 @@ async function runVisionPasses(canvas) {
|
|
|
26091
25977
|
return fail3("read_outputs", e instanceof Error ? e.message : String(e));
|
|
26092
25978
|
}
|
|
26093
25979
|
}
|
|
26094
|
-
var scaffoldStaticAdCommand =
|
|
25980
|
+
var scaffoldStaticAdCommand = defineCommand95({
|
|
26095
25981
|
meta: {
|
|
26096
25982
|
name: "scaffold-static-ad",
|
|
26097
25983
|
description: "Turn a source/inspiration image into a runnable static-ad canvas. Runs billed passes \u2014 image_describe (the blueprint, baked to prompt.json as the editable 'prompt'), an AI selection of the image's MAIN identity elements, and a structured global-layout pass (the column/row grid with per-region bounds and text sizes) \u2014 then scaffolds a canvas that wires one [TODO] ingest slot per element (logo/product/subject/badge + brand font) into image_generate. By default it also fans the hero out to the platform's placement ratios (via image_aspect_adapt \u2014 the hero ratio is free, the rest are billed AI recompositions); pass --placements none for a single base ad, or a preset to pick the set. Edit prompt.json and drop the real assets, then `baker canvas run` it."
|
|
@@ -26280,7 +26166,7 @@ var scaffoldStaticAdCommand = defineCommand98({
|
|
|
26280
26166
|
import { access as access2, cp, mkdir as mkdir7, readFile as readFile15, rm as rm6, writeFile as writeFile9 } from "fs/promises";
|
|
26281
26167
|
import { tmpdir as tmpdir2 } from "os";
|
|
26282
26168
|
import path22 from "path";
|
|
26283
|
-
import { defineCommand as
|
|
26169
|
+
import { defineCommand as defineCommand96 } from "citty";
|
|
26284
26170
|
|
|
26285
26171
|
// src/engine/scaffold/lib/model-router.ts
|
|
26286
26172
|
var SEEDANCE = "bytedance/seedance-2.0";
|
|
@@ -26741,7 +26627,7 @@ async function runAnalysisPasses(deconstructCanvas, selectModel) {
|
|
|
26741
26627
|
return fail4("deconstruct", e instanceof Error ? e.message : String(e));
|
|
26742
26628
|
}
|
|
26743
26629
|
}
|
|
26744
|
-
var scaffoldVideoCommand =
|
|
26630
|
+
var scaffoldVideoCommand = defineCommand96({
|
|
26745
26631
|
meta: {
|
|
26746
26632
|
name: "scaffold-video",
|
|
26747
26633
|
description: "Turn a reference video into a runnable reproduction canvas in one command. Runs billed passes \u2014 video_deconstruct (the full scene-by-scene blueprint + transcript, baked to a split, editable blueprint: a global prompt.json plus one small scenes/sNN.json per scene) and an AI selection of the video's RECURRING identity elements (person/animal/product/logo) \u2014 then scaffolds a pipeline where every scene boundary is a static-ad-grade frame (the blueprint as target_blueprint, a reference legend, the real frame as anchor) and each recurring element gets ONE shared [TODO] ingest slot wired into every frame it appears in. The clips feed Seedance an ultra-detailed motion brief (action, camera, dialogue, transcript). Edit a scene's scenes/sNN.json (or prompt.json for global cast/palette/brand), drop the real source images, then `baker canvas run`."
|
|
@@ -27051,7 +26937,7 @@ var scaffoldVideoCommand = defineCommand99({
|
|
|
27051
26937
|
// src/commands/canvas/set-prompt.ts
|
|
27052
26938
|
import { readFile as readFile16, writeFile as writeFile10 } from "fs/promises";
|
|
27053
26939
|
import path23 from "path";
|
|
27054
|
-
import { defineCommand as
|
|
26940
|
+
import { defineCommand as defineCommand97 } from "citty";
|
|
27055
26941
|
function setNodePrompt(canvas, nodeId, text2) {
|
|
27056
26942
|
const nodes = canvas?.nodes;
|
|
27057
26943
|
if (!Array.isArray(nodes)) throw new Error("canvas has no nodes array");
|
|
@@ -27066,7 +26952,7 @@ function setNodePrompt(canvas, nodeId, text2) {
|
|
|
27066
26952
|
newNodes[idx] = newNode;
|
|
27067
26953
|
return { ...canvas, nodes: newNodes };
|
|
27068
26954
|
}
|
|
27069
|
-
var setPromptCommand =
|
|
26955
|
+
var setPromptCommand = defineCommand97({
|
|
27070
26956
|
meta: {
|
|
27071
26957
|
name: "set-prompt",
|
|
27072
26958
|
description: "Safely set a node's params.prompt (a frame description, motion prompt, etc.) without hand-editing the JSON. Prefer --text-file for multi-line/accented copy \u2014 it preserves UTF-8 exactly, unlike shell-quoted jq."
|
|
@@ -27126,8 +27012,8 @@ var setPromptCommand = defineCommand100({
|
|
|
27126
27012
|
// src/commands/canvas/validate.ts
|
|
27127
27013
|
import { readFile as readFile17 } from "fs/promises";
|
|
27128
27014
|
import path24 from "path";
|
|
27129
|
-
import { defineCommand as
|
|
27130
|
-
var validateCommand =
|
|
27015
|
+
import { defineCommand as defineCommand98 } from "citty";
|
|
27016
|
+
var validateCommand = defineCommand98({
|
|
27131
27017
|
meta: {
|
|
27132
27018
|
name: "validate",
|
|
27133
27019
|
description: "Validate a canvas JSON file (no execution). Includes a per-node cost preview and runs each node's deep validators (composition meta checks for hyperframe_render/_snapshot)."
|
|
@@ -27200,7 +27086,7 @@ var validateCommand = defineCommand101({
|
|
|
27200
27086
|
});
|
|
27201
27087
|
|
|
27202
27088
|
// src/commands/canvas/index.ts
|
|
27203
|
-
var canvasCommand =
|
|
27089
|
+
var canvasCommand = defineCommand99({
|
|
27204
27090
|
meta: {
|
|
27205
27091
|
name: "canvas",
|
|
27206
27092
|
description: `Run Baker creative canvas JSON files locally. Local nodes execute in-process; remote nodes POST to the Convex backend gateway.
|
|
@@ -27234,7 +27120,7 @@ Full guide: __tooling__/docs/tools/baker/canvas.md`
|
|
|
27234
27120
|
});
|
|
27235
27121
|
|
|
27236
27122
|
// src/commands/capabilities/index.ts
|
|
27237
|
-
import { defineCommand as
|
|
27123
|
+
import { defineCommand as defineCommand100 } from "citty";
|
|
27238
27124
|
registerSchema({
|
|
27239
27125
|
command: "capabilities",
|
|
27240
27126
|
description: "Start here, before promising the user anything on an ad platform, in Analytics, or in Tag Manager. Answers three questions in one call: what is connected and with what access, what a write on each surface actually does when it lands, and what CANNOT be done here and why. Run it with no arguments for every surface; name one surface to also get the exact fields every change on it accepts.",
|
|
@@ -27277,7 +27163,7 @@ function capabilityHints(surfaces) {
|
|
|
27277
27163
|
}
|
|
27278
27164
|
return hints;
|
|
27279
27165
|
}
|
|
27280
|
-
var runCapabilities =
|
|
27166
|
+
var runCapabilities = defineCommand100({
|
|
27281
27167
|
meta: {
|
|
27282
27168
|
name: "capabilities",
|
|
27283
27169
|
description: `What Baker can and cannot do for this company, before any work starts.
|
|
@@ -27333,7 +27219,7 @@ Full guide: __tooling__/docs/tools/baker/capabilities.md`
|
|
|
27333
27219
|
var capabilitiesCommand = runCapabilities;
|
|
27334
27220
|
|
|
27335
27221
|
// src/commands/chats/index.ts
|
|
27336
|
-
import { defineCommand as
|
|
27222
|
+
import { defineCommand as defineCommand101 } from "citty";
|
|
27337
27223
|
var STATUS_GROUPS = ["active", "archived", "all"];
|
|
27338
27224
|
var REPO_SURFACES = ["knowledge", "company", "brand", "landings", "flows", "creatives"];
|
|
27339
27225
|
function parseBoundedInt(raw, name, min, max) {
|
|
@@ -27355,7 +27241,7 @@ registerSchema({
|
|
|
27355
27241
|
full: { type: "boolean", description: "Include each Session's full change list", required: false, default: false }
|
|
27356
27242
|
}
|
|
27357
27243
|
});
|
|
27358
|
-
var
|
|
27244
|
+
var listCommand10 = defineCommand101({
|
|
27359
27245
|
meta: { name: "list", description: "List other Sessions on this account, newest first." },
|
|
27360
27246
|
args: {
|
|
27361
27247
|
status: { type: "string", description: "Filter: active|archived|all (default: all)", required: false },
|
|
@@ -27410,7 +27296,7 @@ registerSchema({
|
|
|
27410
27296
|
}
|
|
27411
27297
|
}
|
|
27412
27298
|
});
|
|
27413
|
-
var viewCommand =
|
|
27299
|
+
var viewCommand = defineCommand101({
|
|
27414
27300
|
meta: {
|
|
27415
27301
|
name: "view",
|
|
27416
27302
|
description: "Inspect one Session's full effects \u2014 git content + actions/tags/ads, kickoff, commits."
|
|
@@ -27454,7 +27340,7 @@ registerSchema({
|
|
|
27454
27340
|
}
|
|
27455
27341
|
}
|
|
27456
27342
|
});
|
|
27457
|
-
var transcriptCommand =
|
|
27343
|
+
var transcriptCommand = defineCommand101({
|
|
27458
27344
|
meta: { name: "transcript", description: "Read another Session's conversation." },
|
|
27459
27345
|
args: {
|
|
27460
27346
|
id: { type: "positional", description: "The Session id", required: true },
|
|
@@ -27506,7 +27392,7 @@ registerSchema({
|
|
|
27506
27392
|
}
|
|
27507
27393
|
}
|
|
27508
27394
|
});
|
|
27509
|
-
var diffCommand =
|
|
27395
|
+
var diffCommand = defineCommand101({
|
|
27510
27396
|
meta: { name: "diff", description: "See a published Session's real file-level changes." },
|
|
27511
27397
|
args: {
|
|
27512
27398
|
id: { type: "positional", description: "The Session id", required: true },
|
|
@@ -27550,14 +27436,14 @@ var diffCommand = defineCommand104({
|
|
|
27550
27436
|
}
|
|
27551
27437
|
}
|
|
27552
27438
|
});
|
|
27553
|
-
var chatsCommand =
|
|
27439
|
+
var chatsCommand = defineCommand101({
|
|
27554
27440
|
meta: {
|
|
27555
27441
|
name: "chats",
|
|
27556
27442
|
description: `Inspect other Sessions on this account (read-only): list them, view what they produced, read their conversation, and see their real file changes \u2014 so you can reuse past work for a new goal.
|
|
27557
27443
|
Full guide: __tooling__/docs/tools/baker/chats.md`
|
|
27558
27444
|
},
|
|
27559
27445
|
subCommands: {
|
|
27560
|
-
list:
|
|
27446
|
+
list: listCommand10,
|
|
27561
27447
|
view: viewCommand,
|
|
27562
27448
|
transcript: transcriptCommand,
|
|
27563
27449
|
diff: diffCommand
|
|
@@ -27565,10 +27451,10 @@ Full guide: __tooling__/docs/tools/baker/chats.md`
|
|
|
27565
27451
|
});
|
|
27566
27452
|
|
|
27567
27453
|
// src/commands/creatives/index.ts
|
|
27568
|
-
import { defineCommand as
|
|
27454
|
+
import { defineCommand as defineCommand103 } from "citty";
|
|
27569
27455
|
|
|
27570
27456
|
// src/commands/creatives/publish.ts
|
|
27571
|
-
import { defineCommand as
|
|
27457
|
+
import { defineCommand as defineCommand102 } from "citty";
|
|
27572
27458
|
|
|
27573
27459
|
// src/commands/images/api.ts
|
|
27574
27460
|
import { readFile as readFile18 } from "fs/promises";
|
|
@@ -27715,7 +27601,7 @@ async function publishCreative(args, deps = defaultImageApiDeps) {
|
|
|
27715
27601
|
chatId: chatIdFromEnv()
|
|
27716
27602
|
});
|
|
27717
27603
|
}
|
|
27718
|
-
var publishCommand =
|
|
27604
|
+
var publishCommand = defineCommand102({
|
|
27719
27605
|
meta: {
|
|
27720
27606
|
name: "publish",
|
|
27721
27607
|
description: "Publish a final static creative image to Baker Creatives and print the creative reference JSON."
|
|
@@ -27773,7 +27659,7 @@ var publishCommand = defineCommand105({
|
|
|
27773
27659
|
});
|
|
27774
27660
|
|
|
27775
27661
|
// src/commands/creatives/index.ts
|
|
27776
|
-
var creativesCommand3 =
|
|
27662
|
+
var creativesCommand3 = defineCommand103({
|
|
27777
27663
|
meta: {
|
|
27778
27664
|
name: "creatives",
|
|
27779
27665
|
description: `Publish static ad creatives as first-class Baker outputs.
|
|
@@ -27790,7 +27676,7 @@ Full guide: __tooling__/docs/tools/baker/creatives.md`
|
|
|
27790
27676
|
});
|
|
27791
27677
|
|
|
27792
27678
|
// src/commands/flows/index.ts
|
|
27793
|
-
import { defineCommand as
|
|
27679
|
+
import { defineCommand as defineCommand104 } from "citty";
|
|
27794
27680
|
|
|
27795
27681
|
// src/commands/flows/shared.ts
|
|
27796
27682
|
import { existsSync as existsSync5, readdirSync as readdirSync2, readFileSync as readFileSync9 } from "fs";
|
|
@@ -27945,7 +27831,7 @@ function displayName(slug) {
|
|
|
27945
27831
|
const name = tree.displayName;
|
|
27946
27832
|
return typeof name === "string" && name.trim() ? name.trim() : slug;
|
|
27947
27833
|
}
|
|
27948
|
-
var
|
|
27834
|
+
var listCommand11 = defineCommand104({
|
|
27949
27835
|
meta: {
|
|
27950
27836
|
name: "list",
|
|
27951
27837
|
description: "List Forms in this workspace with the count of confidential fields still needing setup. Example: baker flows list"
|
|
@@ -27959,7 +27845,7 @@ var listCommand12 = defineCommand107({
|
|
|
27959
27845
|
writeJson({ ok: true, data: { flows } });
|
|
27960
27846
|
}
|
|
27961
27847
|
});
|
|
27962
|
-
var showCommand3 =
|
|
27848
|
+
var showCommand3 = defineCommand104({
|
|
27963
27849
|
meta: {
|
|
27964
27850
|
name: "show",
|
|
27965
27851
|
description: "Show a Form's confidential fields and their configuration status (never secret values). Example: baker flows show contact"
|
|
@@ -27980,7 +27866,7 @@ var showCommand3 = defineCommand107({
|
|
|
27980
27866
|
writeJson({ ok: true, data: response });
|
|
27981
27867
|
}
|
|
27982
27868
|
});
|
|
27983
|
-
var flowsCommand =
|
|
27869
|
+
var flowsCommand = defineCommand104({
|
|
27984
27870
|
meta: {
|
|
27985
27871
|
name: "flows",
|
|
27986
27872
|
description: `Read this workspace's Forms (flows) and the configuration status of their confidential fields \u2014 connection secrets, OAuth connections, and third-party field definitions (HubSpot, Calendly, HighLevel, SavvyCal).
|
|
@@ -27994,7 +27880,7 @@ Examples:
|
|
|
27994
27880
|
Full guide: __tooling__/docs/tools/baker/flows.md`
|
|
27995
27881
|
},
|
|
27996
27882
|
subCommands: {
|
|
27997
|
-
list:
|
|
27883
|
+
list: listCommand11,
|
|
27998
27884
|
show: showCommand3
|
|
27999
27885
|
},
|
|
28000
27886
|
// Bare `baker flows` lists the Forms. This must be `default`, not `run`: citty falls
|
|
@@ -28004,10 +27890,10 @@ Full guide: __tooling__/docs/tools/baker/flows.md`
|
|
|
28004
27890
|
});
|
|
28005
27891
|
|
|
28006
27892
|
// src/commands/ga4/index.ts
|
|
28007
|
-
import { defineCommand as
|
|
27893
|
+
import { defineCommand as defineCommand111 } from "citty";
|
|
28008
27894
|
|
|
28009
27895
|
// src/commands/ga4/audit.ts
|
|
28010
|
-
import { defineCommand as
|
|
27896
|
+
import { defineCommand as defineCommand105 } from "citty";
|
|
28011
27897
|
|
|
28012
27898
|
// src/commands/ga4/resolve.ts
|
|
28013
27899
|
async function fetchProperties(useCache = true) {
|
|
@@ -28073,7 +27959,7 @@ registerSchema({
|
|
|
28073
27959
|
"no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false }
|
|
28074
27960
|
}
|
|
28075
27961
|
});
|
|
28076
|
-
var auditCommand2 =
|
|
27962
|
+
var auditCommand2 = defineCommand105({
|
|
28077
27963
|
meta: {
|
|
28078
27964
|
name: "audit",
|
|
28079
27965
|
description: `Run all GA4 admin health checks. Returns property config with playbook warnings.
|
|
@@ -28128,11 +28014,11 @@ Examples:
|
|
|
28128
28014
|
});
|
|
28129
28015
|
|
|
28130
28016
|
// src/commands/ga4/config.ts
|
|
28131
|
-
import { defineCommand as
|
|
28017
|
+
import { defineCommand as defineCommand106 } from "citty";
|
|
28132
28018
|
|
|
28133
28019
|
// src/commands/ga4/shared.ts
|
|
28134
28020
|
import { readFileSync as readFileSync10 } from "fs";
|
|
28135
|
-
function
|
|
28021
|
+
function failValidation2(message) {
|
|
28136
28022
|
writeJsonEnvelope({ ok: false, error: { code: "VALIDATION_ERROR", message } });
|
|
28137
28023
|
process.exit(1);
|
|
28138
28024
|
}
|
|
@@ -28140,7 +28026,7 @@ function requireTarget4(args, entity) {
|
|
|
28140
28026
|
const positional = Array.isArray(args._) ? args._[0] : void 0;
|
|
28141
28027
|
const target = args.id ?? args.target ?? positional;
|
|
28142
28028
|
if (typeof target !== "string" || target.length === 0) {
|
|
28143
|
-
|
|
28029
|
+
failValidation2(`pass the ${entity} id as the positional argument`);
|
|
28144
28030
|
}
|
|
28145
28031
|
return target;
|
|
28146
28032
|
}
|
|
@@ -28149,17 +28035,17 @@ function readJsonSource(args, flag) {
|
|
|
28149
28035
|
const file = args.file;
|
|
28150
28036
|
const raw = typeof file === "string" && file.length > 0 ? readFileSync10(file, "utf8") : typeof inline === "string" && inline.length > 0 ? inline : void 0;
|
|
28151
28037
|
if (raw === void 0) {
|
|
28152
|
-
|
|
28038
|
+
failValidation2(`pass --${flag} with inline JSON or --file with a path to a JSON file`);
|
|
28153
28039
|
}
|
|
28154
28040
|
try {
|
|
28155
28041
|
return JSON.parse(raw);
|
|
28156
28042
|
} catch {
|
|
28157
|
-
return
|
|
28043
|
+
return failValidation2(`--${flag} is not valid JSON`);
|
|
28158
28044
|
}
|
|
28159
28045
|
}
|
|
28160
28046
|
function asObject(value, flag, index) {
|
|
28161
28047
|
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
28162
|
-
|
|
28048
|
+
failValidation2(
|
|
28163
28049
|
index === void 0 ? `--${flag} must be a JSON object` : `--${flag}[${index}] must be a JSON object`
|
|
28164
28050
|
);
|
|
28165
28051
|
}
|
|
@@ -28174,7 +28060,7 @@ function loadJsonPayloads(args) {
|
|
|
28174
28060
|
return [asObject(parsed, "json")];
|
|
28175
28061
|
}
|
|
28176
28062
|
if (parsed.length === 0) {
|
|
28177
|
-
|
|
28063
|
+
failValidation2("--json is an empty list \u2014 pass at least one definition");
|
|
28178
28064
|
}
|
|
28179
28065
|
return parsed.map((entry, index) => asObject(entry, "json", index));
|
|
28180
28066
|
}
|
|
@@ -28320,7 +28206,7 @@ function configHints(config) {
|
|
|
28320
28206
|
}
|
|
28321
28207
|
return hints;
|
|
28322
28208
|
}
|
|
28323
|
-
var configCommand =
|
|
28209
|
+
var configCommand = defineCommand106({
|
|
28324
28210
|
meta: {
|
|
28325
28211
|
name: "config",
|
|
28326
28212
|
description: `Read how the property is configured to measure \u2014 key events, custom definitions, custom events, retention
|
|
@@ -28348,7 +28234,7 @@ Examples:
|
|
|
28348
28234
|
});
|
|
28349
28235
|
|
|
28350
28236
|
// src/commands/ga4/draft.ts
|
|
28351
|
-
import { defineCommand as
|
|
28237
|
+
import { defineCommand as defineCommand107 } from "citty";
|
|
28352
28238
|
registerSchema({
|
|
28353
28239
|
command: "ga4.draft",
|
|
28354
28240
|
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.",
|
|
@@ -28357,13 +28243,13 @@ registerSchema({
|
|
|
28357
28243
|
chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
|
|
28358
28244
|
}
|
|
28359
28245
|
});
|
|
28360
|
-
var draftCommand3 =
|
|
28246
|
+
var draftCommand3 = defineCommand107({
|
|
28361
28247
|
meta: {
|
|
28362
28248
|
name: "draft",
|
|
28363
28249
|
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."
|
|
28364
28250
|
},
|
|
28365
28251
|
subCommands: {
|
|
28366
|
-
list:
|
|
28252
|
+
list: defineCommand107({
|
|
28367
28253
|
meta: { name: "list", description: "Review everything staged on this chat (--json for the raw envelope)" },
|
|
28368
28254
|
args: {
|
|
28369
28255
|
json: { type: "boolean", description: "Print the raw JSON envelope", required: false },
|
|
@@ -28373,7 +28259,7 @@ var draftCommand3 = defineCommand110({
|
|
|
28373
28259
|
await draftList(args.json === true, args.chat);
|
|
28374
28260
|
}
|
|
28375
28261
|
}),
|
|
28376
|
-
show:
|
|
28262
|
+
show: defineCommand107({
|
|
28377
28263
|
meta: {
|
|
28378
28264
|
name: "show",
|
|
28379
28265
|
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)."
|
|
@@ -28390,7 +28276,7 @@ var draftCommand3 = defineCommand110({
|
|
|
28390
28276
|
);
|
|
28391
28277
|
}
|
|
28392
28278
|
}),
|
|
28393
|
-
amend:
|
|
28279
|
+
amend: defineCommand107({
|
|
28394
28280
|
meta: {
|
|
28395
28281
|
name: "amend",
|
|
28396
28282
|
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."
|
|
@@ -28407,7 +28293,7 @@ var draftCommand3 = defineCommand110({
|
|
|
28407
28293
|
});
|
|
28408
28294
|
}
|
|
28409
28295
|
}),
|
|
28410
|
-
remove:
|
|
28296
|
+
remove: defineCommand107({
|
|
28411
28297
|
meta: { name: "remove", description: "Remove one staged change" },
|
|
28412
28298
|
args: { ref: { type: "positional", description: "Staged ref or target id", required: false } },
|
|
28413
28299
|
run: async ({ args }) => {
|
|
@@ -28416,7 +28302,7 @@ var draftCommand3 = defineCommand110({
|
|
|
28416
28302
|
});
|
|
28417
28303
|
}
|
|
28418
28304
|
}),
|
|
28419
|
-
clear:
|
|
28305
|
+
clear: defineCommand107({
|
|
28420
28306
|
meta: { name: "clear", description: "Discard all Google Analytics changes staged on this chat" },
|
|
28421
28307
|
run: async () => {
|
|
28422
28308
|
await draftAction2("/api/ga4/draft/clear", {});
|
|
@@ -28426,7 +28312,7 @@ var draftCommand3 = defineCommand110({
|
|
|
28426
28312
|
});
|
|
28427
28313
|
|
|
28428
28314
|
// src/commands/ga4/properties.ts
|
|
28429
|
-
import { defineCommand as
|
|
28315
|
+
import { defineCommand as defineCommand108 } from "citty";
|
|
28430
28316
|
registerSchema({
|
|
28431
28317
|
command: "ga4.properties",
|
|
28432
28318
|
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.",
|
|
@@ -28442,7 +28328,7 @@ function propertyHints(properties) {
|
|
|
28442
28328
|
resources: properties.map((property) => ({ id: property.externalId, label: property.name }))
|
|
28443
28329
|
});
|
|
28444
28330
|
}
|
|
28445
|
-
var propertiesCommand =
|
|
28331
|
+
var propertiesCommand = defineCommand108({
|
|
28446
28332
|
meta: {
|
|
28447
28333
|
name: "properties",
|
|
28448
28334
|
description: `List accessible GA4 properties.
|
|
@@ -28492,7 +28378,7 @@ Examples:
|
|
|
28492
28378
|
// src/commands/ga4/query.ts
|
|
28493
28379
|
import { appendFileSync as appendFileSync2, existsSync as existsSync6, readFileSync as readFileSync11, writeFileSync as writeFileSync3 } from "fs";
|
|
28494
28380
|
import { resolve as resolve2 } from "path";
|
|
28495
|
-
import { defineCommand as
|
|
28381
|
+
import { defineCommand as defineCommand109 } from "citty";
|
|
28496
28382
|
|
|
28497
28383
|
// src/commands/ga4/presets.ts
|
|
28498
28384
|
var GA4_PRESETS = [
|
|
@@ -28627,7 +28513,7 @@ function handleError2(err) {
|
|
|
28627
28513
|
});
|
|
28628
28514
|
process.exit(1);
|
|
28629
28515
|
}
|
|
28630
|
-
var queryCommand2 =
|
|
28516
|
+
var queryCommand2 = defineCommand109({
|
|
28631
28517
|
meta: {
|
|
28632
28518
|
name: "query",
|
|
28633
28519
|
description: `Run GA4 Data API reports. Preset-first with free-form escape hatch.
|
|
@@ -28698,7 +28584,7 @@ Free-form (escape hatch):
|
|
|
28698
28584
|
});
|
|
28699
28585
|
|
|
28700
28586
|
// src/commands/ga4/write-commands.ts
|
|
28701
|
-
import { defineCommand as
|
|
28587
|
+
import { defineCommand as defineCommand110 } from "citty";
|
|
28702
28588
|
var PROPERTY_ARG_DESCRIPTION = "GA4 property id (optional only when one property is connected \u2014 run `baker ga4 properties`)";
|
|
28703
28589
|
var propertyArg = { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false };
|
|
28704
28590
|
function createJsonDescription(noun) {
|
|
@@ -28716,7 +28602,7 @@ registerSchema({
|
|
|
28716
28602
|
"property-id": { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false }
|
|
28717
28603
|
}
|
|
28718
28604
|
});
|
|
28719
|
-
var keyEventCommand =
|
|
28605
|
+
var keyEventCommand = defineCommand110({
|
|
28720
28606
|
meta: {
|
|
28721
28607
|
name: "key-event",
|
|
28722
28608
|
description: `Stage key-event (conversion) changes
|
|
@@ -28729,7 +28615,7 @@ Examples:
|
|
|
28729
28615
|
baker ga4 key-event delete 4185`
|
|
28730
28616
|
},
|
|
28731
28617
|
subCommands: {
|
|
28732
|
-
create:
|
|
28618
|
+
create: defineCommand110({
|
|
28733
28619
|
meta: {
|
|
28734
28620
|
name: "create",
|
|
28735
28621
|
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."
|
|
@@ -28750,7 +28636,7 @@ Examples:
|
|
|
28750
28636
|
);
|
|
28751
28637
|
}
|
|
28752
28638
|
}),
|
|
28753
|
-
update:
|
|
28639
|
+
update: defineCommand110({
|
|
28754
28640
|
meta: {
|
|
28755
28641
|
name: "update",
|
|
28756
28642
|
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."
|
|
@@ -28770,7 +28656,7 @@ Examples:
|
|
|
28770
28656
|
});
|
|
28771
28657
|
}
|
|
28772
28658
|
}),
|
|
28773
|
-
delete:
|
|
28659
|
+
delete: defineCommand110({
|
|
28774
28660
|
meta: {
|
|
28775
28661
|
name: "delete",
|
|
28776
28662
|
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."
|
|
@@ -28818,7 +28704,7 @@ for (const { kind, noun, createHint } of DEFINITIONS) {
|
|
|
28818
28704
|
}
|
|
28819
28705
|
function definitionCommand(definition) {
|
|
28820
28706
|
const { command, kind, noun, example } = definition;
|
|
28821
|
-
return
|
|
28707
|
+
return defineCommand110({
|
|
28822
28708
|
meta: {
|
|
28823
28709
|
name: command,
|
|
28824
28710
|
description: `Stage ${noun} changes
|
|
@@ -28830,7 +28716,7 @@ Examples:
|
|
|
28830
28716
|
baker ga4 ${command} archive 12`
|
|
28831
28717
|
},
|
|
28832
28718
|
subCommands: {
|
|
28833
|
-
create:
|
|
28719
|
+
create: defineCommand110({
|
|
28834
28720
|
meta: { name: "create", description: `Stage a new ${noun} (or a JSON array of them, staged together)` },
|
|
28835
28721
|
args: {
|
|
28836
28722
|
json: { type: "string", description: createJsonDescription(noun), required: false },
|
|
@@ -28848,7 +28734,7 @@ Examples:
|
|
|
28848
28734
|
);
|
|
28849
28735
|
}
|
|
28850
28736
|
}),
|
|
28851
|
-
update:
|
|
28737
|
+
update: defineCommand110({
|
|
28852
28738
|
meta: {
|
|
28853
28739
|
name: "update",
|
|
28854
28740
|
description: `Stage a change to an existing ${noun} (pass its id). The parameter name and scope cannot change \u2014 archive and recreate for that.`
|
|
@@ -28868,7 +28754,7 @@ Examples:
|
|
|
28868
28754
|
});
|
|
28869
28755
|
}
|
|
28870
28756
|
}),
|
|
28871
|
-
archive:
|
|
28757
|
+
archive: defineCommand110({
|
|
28872
28758
|
meta: {
|
|
28873
28759
|
name: "archive",
|
|
28874
28760
|
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.`
|
|
@@ -28913,7 +28799,7 @@ var dataStreamArg = {
|
|
|
28913
28799
|
function withStream(args) {
|
|
28914
28800
|
return typeof args["data-stream"] === "string" ? { dataStream: args["data-stream"] } : {};
|
|
28915
28801
|
}
|
|
28916
|
-
var customEventCommand =
|
|
28802
|
+
var customEventCommand = defineCommand110({
|
|
28917
28803
|
meta: {
|
|
28918
28804
|
name: "custom-event",
|
|
28919
28805
|
description: `Stage custom events \u2014 new events built from events the site already sends
|
|
@@ -28924,7 +28810,7 @@ Examples:
|
|
|
28924
28810
|
baker ga4 custom-event delete 7`
|
|
28925
28811
|
},
|
|
28926
28812
|
subCommands: {
|
|
28927
|
-
create:
|
|
28813
|
+
create: defineCommand110({
|
|
28928
28814
|
meta: {
|
|
28929
28815
|
name: "create",
|
|
28930
28816
|
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."
|
|
@@ -28947,7 +28833,7 @@ Examples:
|
|
|
28947
28833
|
);
|
|
28948
28834
|
}
|
|
28949
28835
|
}),
|
|
28950
|
-
update:
|
|
28836
|
+
update: defineCommand110({
|
|
28951
28837
|
meta: { name: "update", description: "Stage a change to an existing custom event (pass its id)" },
|
|
28952
28838
|
args: {
|
|
28953
28839
|
id: { type: "positional", description: "Custom event rule id", required: false },
|
|
@@ -28966,7 +28852,7 @@ Examples:
|
|
|
28966
28852
|
});
|
|
28967
28853
|
}
|
|
28968
28854
|
}),
|
|
28969
|
-
delete:
|
|
28855
|
+
delete: defineCommand110({
|
|
28970
28856
|
meta: {
|
|
28971
28857
|
name: "delete",
|
|
28972
28858
|
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."
|
|
@@ -29012,16 +28898,16 @@ function retentionValue(input, flag) {
|
|
|
29012
28898
|
const normalized = input.trim();
|
|
29013
28899
|
const mapped = RETENTION_BY_MONTHS[normalized] ?? (Object.values(RETENTION_BY_MONTHS).includes(normalized.toUpperCase()) ? normalized.toUpperCase() : void 0);
|
|
29014
28900
|
if (!mapped) {
|
|
29015
|
-
|
|
28901
|
+
failValidation2(`--${flag} must be one of 2, 14, 26, 38 or 50 (months)`);
|
|
29016
28902
|
}
|
|
29017
28903
|
return mapped;
|
|
29018
28904
|
}
|
|
29019
28905
|
function booleanArg(input, flag) {
|
|
29020
28906
|
if (input === "true") return true;
|
|
29021
28907
|
if (input === "false") return false;
|
|
29022
|
-
return
|
|
28908
|
+
return failValidation2(`--${flag} must be true or false`);
|
|
29023
28909
|
}
|
|
29024
|
-
var dataRetentionCommand =
|
|
28910
|
+
var dataRetentionCommand = defineCommand110({
|
|
29025
28911
|
meta: {
|
|
29026
28912
|
name: "data-retention",
|
|
29027
28913
|
description: `Stage a change to how long Google Analytics keeps data
|
|
@@ -29031,7 +28917,7 @@ Examples:
|
|
|
29031
28917
|
baker ga4 data-retention set --event-data 14 --user-data 14 --reset-on-activity true`
|
|
29032
28918
|
},
|
|
29033
28919
|
subCommands: {
|
|
29034
|
-
set:
|
|
28920
|
+
set: defineCommand110({
|
|
29035
28921
|
meta: { name: "set", description: "Stage the retention window (months)" },
|
|
29036
28922
|
args: {
|
|
29037
28923
|
"event-data": { type: "string", description: "2, 14, 26, 38 or 50", required: false },
|
|
@@ -29051,7 +28937,7 @@ Examples:
|
|
|
29051
28937
|
payload.resetUserDataOnNewActivity = booleanArg(args["reset-on-activity"], "reset-on-activity");
|
|
29052
28938
|
}
|
|
29053
28939
|
if (Object.keys(payload).length === 0) {
|
|
29054
|
-
|
|
28940
|
+
failValidation2("pass at least one of --event-data, --user-data or --reset-on-activity");
|
|
29055
28941
|
}
|
|
29056
28942
|
await stageOp3({ kind: "ga4.dataRetention.update", payload, ...withProperty(args) });
|
|
29057
28943
|
}
|
|
@@ -29060,7 +28946,7 @@ Examples:
|
|
|
29060
28946
|
});
|
|
29061
28947
|
|
|
29062
28948
|
// src/commands/ga4/index.ts
|
|
29063
|
-
var ga4Command =
|
|
28949
|
+
var ga4Command = defineCommand111({
|
|
29064
28950
|
meta: {
|
|
29065
28951
|
name: "ga4",
|
|
29066
28952
|
description: `Google Analytics 4. Report on a property, audit its config, and change what it measures.
|
|
@@ -29101,12 +28987,12 @@ Full guide: __tooling__/docs/tools/baker/ga4.md`
|
|
|
29101
28987
|
});
|
|
29102
28988
|
|
|
29103
28989
|
// src/commands/gsc/index.ts
|
|
29104
|
-
import { defineCommand as
|
|
28990
|
+
import { defineCommand as defineCommand115 } from "citty";
|
|
29105
28991
|
|
|
29106
28992
|
// src/commands/gsc/query.ts
|
|
29107
28993
|
import { appendFileSync as appendFileSync3, existsSync as existsSync7, readFileSync as readFileSync12, writeFileSync as writeFileSync4 } from "fs";
|
|
29108
28994
|
import { resolve as resolve3 } from "path";
|
|
29109
|
-
import { defineCommand as
|
|
28995
|
+
import { defineCommand as defineCommand112 } from "citty";
|
|
29110
28996
|
|
|
29111
28997
|
// src/commands/gsc/presets.ts
|
|
29112
28998
|
var GSC_PRESETS = [
|
|
@@ -29300,7 +29186,7 @@ function handleError3(err) {
|
|
|
29300
29186
|
});
|
|
29301
29187
|
process.exit(1);
|
|
29302
29188
|
}
|
|
29303
|
-
var queryCommand3 =
|
|
29189
|
+
var queryCommand3 = defineCommand112({
|
|
29304
29190
|
meta: {
|
|
29305
29191
|
name: "query",
|
|
29306
29192
|
description: `Run GSC Search Analytics queries. Preset-first with free-form escape hatch.
|
|
@@ -29378,7 +29264,7 @@ Free-form (escape hatch):
|
|
|
29378
29264
|
});
|
|
29379
29265
|
|
|
29380
29266
|
// src/commands/gsc/sitemaps.ts
|
|
29381
|
-
import { defineCommand as
|
|
29267
|
+
import { defineCommand as defineCommand113 } from "citty";
|
|
29382
29268
|
registerSchema({
|
|
29383
29269
|
command: "gsc.sitemaps",
|
|
29384
29270
|
description: "List sitemaps for a Search Console site. Check sitemap health and errors.",
|
|
@@ -29387,7 +29273,7 @@ registerSchema({
|
|
|
29387
29273
|
"no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false }
|
|
29388
29274
|
}
|
|
29389
29275
|
});
|
|
29390
|
-
var sitemapsCommand =
|
|
29276
|
+
var sitemapsCommand = defineCommand113({
|
|
29391
29277
|
meta: {
|
|
29392
29278
|
name: "sitemaps",
|
|
29393
29279
|
description: `List sitemaps for a site. Check health and errors.
|
|
@@ -29440,7 +29326,7 @@ Examples:
|
|
|
29440
29326
|
});
|
|
29441
29327
|
|
|
29442
29328
|
// src/commands/gsc/sites.ts
|
|
29443
|
-
import { defineCommand as
|
|
29329
|
+
import { defineCommand as defineCommand114 } from "citty";
|
|
29444
29330
|
registerSchema({
|
|
29445
29331
|
command: "gsc.sites",
|
|
29446
29332
|
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.",
|
|
@@ -29456,7 +29342,7 @@ function siteHints(sites) {
|
|
|
29456
29342
|
resources: sites.map((site) => ({ id: site.siteUrl, label: site.permissionLevel }))
|
|
29457
29343
|
});
|
|
29458
29344
|
}
|
|
29459
|
-
var sitesCommand =
|
|
29345
|
+
var sitesCommand = defineCommand114({
|
|
29460
29346
|
meta: {
|
|
29461
29347
|
name: "sites",
|
|
29462
29348
|
description: `List verified Search Console sites.
|
|
@@ -29504,7 +29390,7 @@ Examples:
|
|
|
29504
29390
|
});
|
|
29505
29391
|
|
|
29506
29392
|
// src/commands/gsc/index.ts
|
|
29507
|
-
var gscCommand =
|
|
29393
|
+
var gscCommand = defineCommand115({
|
|
29508
29394
|
meta: {
|
|
29509
29395
|
name: "gsc",
|
|
29510
29396
|
description: `Google Search Console commands. PPC-SEO arbitrage, brand halo analysis, negative keyword discovery.
|
|
@@ -29528,7 +29414,7 @@ Full guide: __tooling__/docs/tools/baker/gsc.md`
|
|
|
29528
29414
|
});
|
|
29529
29415
|
|
|
29530
29416
|
// src/commands/history/index.ts
|
|
29531
|
-
import { defineCommand as
|
|
29417
|
+
import { defineCommand as defineCommand116 } from "citty";
|
|
29532
29418
|
registerSchema({
|
|
29533
29419
|
command: "history.list",
|
|
29534
29420
|
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.",
|
|
@@ -29583,7 +29469,7 @@ function parseBoundedInt2(raw, name, min, max) {
|
|
|
29583
29469
|
}
|
|
29584
29470
|
return value;
|
|
29585
29471
|
}
|
|
29586
|
-
var
|
|
29472
|
+
var listCommand12 = defineCommand116({
|
|
29587
29473
|
meta: {
|
|
29588
29474
|
name: "list",
|
|
29589
29475
|
description: "List recent account changes (unified audit log), newest first."
|
|
@@ -29629,17 +29515,17 @@ var listCommand13 = defineCommand119({
|
|
|
29629
29515
|
}
|
|
29630
29516
|
}
|
|
29631
29517
|
});
|
|
29632
|
-
var historyCommand =
|
|
29518
|
+
var historyCommand = defineCommand116({
|
|
29633
29519
|
meta: {
|
|
29634
29520
|
name: "history",
|
|
29635
29521
|
description: `Unified account history (audit log): what changed, who did it, and when.
|
|
29636
29522
|
Full guide: __tooling__/docs/tools/baker/history.md`
|
|
29637
29523
|
},
|
|
29638
|
-
subCommands: { list:
|
|
29524
|
+
subCommands: { list: listCommand12 }
|
|
29639
29525
|
});
|
|
29640
29526
|
|
|
29641
29527
|
// src/commands/hubspot/index.ts
|
|
29642
|
-
import { defineCommand as
|
|
29528
|
+
import { defineCommand as defineCommand117 } from "citty";
|
|
29643
29529
|
var EMBED_TYPES = ["legacy", "v4", "unknown"];
|
|
29644
29530
|
function failNotConnected(err) {
|
|
29645
29531
|
if (err instanceof ApiError && err.code === "FORBIDDEN" && err.message.includes(HUBSPOT_MISSING_GRANT_MARKER)) {
|
|
@@ -29776,7 +29662,7 @@ registerSchema({
|
|
|
29776
29662
|
}
|
|
29777
29663
|
}
|
|
29778
29664
|
});
|
|
29779
|
-
var formsListCommand =
|
|
29665
|
+
var formsListCommand = defineCommand117({
|
|
29780
29666
|
meta: {
|
|
29781
29667
|
name: "list",
|
|
29782
29668
|
description: "List HubSpot forms with embed type and post-submit action. Example: baker hubspot forms list --redirecting-only"
|
|
@@ -29821,7 +29707,7 @@ var formsListCommand = defineCommand120({
|
|
|
29821
29707
|
}
|
|
29822
29708
|
}
|
|
29823
29709
|
});
|
|
29824
|
-
var formsViewCommand =
|
|
29710
|
+
var formsViewCommand = defineCommand117({
|
|
29825
29711
|
meta: {
|
|
29826
29712
|
name: "view",
|
|
29827
29713
|
description: "Show one HubSpot form's fields and configuration. Example: baker hubspot forms view 1a2b3c"
|
|
@@ -29873,7 +29759,7 @@ var formsViewCommand = defineCommand120({
|
|
|
29873
29759
|
}
|
|
29874
29760
|
}
|
|
29875
29761
|
});
|
|
29876
|
-
var meetingsListCommand =
|
|
29762
|
+
var meetingsListCommand = defineCommand117({
|
|
29877
29763
|
meta: {
|
|
29878
29764
|
name: "list",
|
|
29879
29765
|
description: "List HubSpot meeting links (calendars). Example: baker hubspot meetings list"
|
|
@@ -29915,7 +29801,7 @@ var meetingsListCommand = defineCommand120({
|
|
|
29915
29801
|
}
|
|
29916
29802
|
}
|
|
29917
29803
|
});
|
|
29918
|
-
var meetingsViewCommand =
|
|
29804
|
+
var meetingsViewCommand = defineCommand117({
|
|
29919
29805
|
meta: {
|
|
29920
29806
|
name: "view",
|
|
29921
29807
|
description: "Show one HubSpot meeting link's booking fields. Example: baker hubspot meetings view discovery-call"
|
|
@@ -29959,7 +29845,7 @@ var meetingsViewCommand = defineCommand120({
|
|
|
29959
29845
|
}
|
|
29960
29846
|
}
|
|
29961
29847
|
});
|
|
29962
|
-
var formsSubmissionsCommand =
|
|
29848
|
+
var formsSubmissionsCommand = defineCommand117({
|
|
29963
29849
|
meta: {
|
|
29964
29850
|
name: "submissions",
|
|
29965
29851
|
description: "How many leads a form received, and when. Example: baker hubspot forms submissions <formId> --days 30"
|
|
@@ -30008,7 +29894,7 @@ var formsSubmissionsCommand = defineCommand120({
|
|
|
30008
29894
|
}
|
|
30009
29895
|
}
|
|
30010
29896
|
});
|
|
30011
|
-
var workflowsListCommand =
|
|
29897
|
+
var workflowsListCommand = defineCommand117({
|
|
30012
29898
|
meta: {
|
|
30013
29899
|
name: "list",
|
|
30014
29900
|
description: "List HubSpot workflows. Example: baker hubspot workflows list --enabled-only"
|
|
@@ -30044,7 +29930,7 @@ var workflowsListCommand = defineCommand120({
|
|
|
30044
29930
|
}
|
|
30045
29931
|
}
|
|
30046
29932
|
});
|
|
30047
|
-
var pipelinesListCommand =
|
|
29933
|
+
var pipelinesListCommand = defineCommand117({
|
|
30048
29934
|
meta: {
|
|
30049
29935
|
name: "list",
|
|
30050
29936
|
description: "List HubSpot deal pipelines and their stages. Example: baker hubspot pipelines list"
|
|
@@ -30061,7 +29947,7 @@ var pipelinesListCommand = defineCommand120({
|
|
|
30061
29947
|
}
|
|
30062
29948
|
}
|
|
30063
29949
|
});
|
|
30064
|
-
var contactsSummaryCommand =
|
|
29950
|
+
var contactsSummaryCommand = defineCommand117({
|
|
30065
29951
|
meta: {
|
|
30066
29952
|
name: "summary",
|
|
30067
29953
|
description: "Whether recent leads are being worked, as counts. Example: baker hubspot contacts summary --days 30"
|
|
@@ -30131,7 +30017,7 @@ function contactLookupHints(data) {
|
|
|
30131
30017
|
}
|
|
30132
30018
|
return hints;
|
|
30133
30019
|
}
|
|
30134
|
-
var contactsLookupCommand =
|
|
30020
|
+
var contactsLookupCommand = defineCommand117({
|
|
30135
30021
|
meta: {
|
|
30136
30022
|
name: "lookup",
|
|
30137
30023
|
description: "Find one contact by email and see whether it was worked. Example: baker hubspot contacts lookup a@b.com"
|
|
@@ -30155,27 +30041,27 @@ var contactsLookupCommand = defineCommand120({
|
|
|
30155
30041
|
}
|
|
30156
30042
|
}
|
|
30157
30043
|
});
|
|
30158
|
-
var contactsCommand =
|
|
30044
|
+
var contactsCommand = defineCommand117({
|
|
30159
30045
|
meta: { name: "contacts", description: "Contacts on the connected HubSpot account." },
|
|
30160
30046
|
subCommands: { summary: contactsSummaryCommand, lookup: contactsLookupCommand }
|
|
30161
30047
|
});
|
|
30162
|
-
var formsCommand =
|
|
30048
|
+
var formsCommand = defineCommand117({
|
|
30163
30049
|
meta: { name: "forms", description: "HubSpot forms on the connected account." },
|
|
30164
30050
|
subCommands: { list: formsListCommand, view: formsViewCommand, submissions: formsSubmissionsCommand }
|
|
30165
30051
|
});
|
|
30166
|
-
var workflowsCommand =
|
|
30052
|
+
var workflowsCommand = defineCommand117({
|
|
30167
30053
|
meta: { name: "workflows", description: "HubSpot workflows on the connected account." },
|
|
30168
30054
|
subCommands: { list: workflowsListCommand }
|
|
30169
30055
|
});
|
|
30170
|
-
var pipelinesCommand =
|
|
30056
|
+
var pipelinesCommand = defineCommand117({
|
|
30171
30057
|
meta: { name: "pipelines", description: "HubSpot deal pipelines on the connected account." },
|
|
30172
30058
|
subCommands: { list: pipelinesListCommand }
|
|
30173
30059
|
});
|
|
30174
|
-
var meetingsCommand =
|
|
30060
|
+
var meetingsCommand = defineCommand117({
|
|
30175
30061
|
meta: { name: "meetings", description: "HubSpot meeting links (calendars) on the connected account." },
|
|
30176
30062
|
subCommands: { list: meetingsListCommand, view: meetingsViewCommand }
|
|
30177
30063
|
});
|
|
30178
|
-
var hubspotCommand =
|
|
30064
|
+
var hubspotCommand = defineCommand117({
|
|
30179
30065
|
meta: {
|
|
30180
30066
|
name: "hubspot",
|
|
30181
30067
|
description: `Read the connected HubSpot account \u2014 forms, the leads they received, workflows, deal pipelines and
|
|
@@ -30212,10 +30098,10 @@ Full guide: __tooling__/docs/tools/baker/hubspot.md`
|
|
|
30212
30098
|
});
|
|
30213
30099
|
|
|
30214
30100
|
// src/commands/images/index.ts
|
|
30215
|
-
import { defineCommand as
|
|
30101
|
+
import { defineCommand as defineCommand143 } from "citty";
|
|
30216
30102
|
|
|
30217
30103
|
// src/commands/images/crop.ts
|
|
30218
|
-
import { defineCommand as
|
|
30104
|
+
import { defineCommand as defineCommand118 } from "citty";
|
|
30219
30105
|
|
|
30220
30106
|
// src/lib/image/crop-sprite.ts
|
|
30221
30107
|
import sharp from "sharp";
|
|
@@ -30337,7 +30223,7 @@ function emitError2(err) {
|
|
|
30337
30223
|
}
|
|
30338
30224
|
process.exit(1);
|
|
30339
30225
|
}
|
|
30340
|
-
var cropCommand =
|
|
30226
|
+
var cropCommand = defineCommand118({
|
|
30341
30227
|
meta: {
|
|
30342
30228
|
name: "crop",
|
|
30343
30229
|
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"
|
|
@@ -30373,7 +30259,7 @@ var cropCommand = defineCommand121({
|
|
|
30373
30259
|
});
|
|
30374
30260
|
|
|
30375
30261
|
// src/commands/images/delete.ts
|
|
30376
|
-
import { defineCommand as
|
|
30262
|
+
import { defineCommand as defineCommand119 } from "citty";
|
|
30377
30263
|
registerSchema({
|
|
30378
30264
|
command: "images.delete",
|
|
30379
30265
|
description: "Delete an image by ID",
|
|
@@ -30387,7 +30273,7 @@ registerSchema({
|
|
|
30387
30273
|
}
|
|
30388
30274
|
}
|
|
30389
30275
|
});
|
|
30390
|
-
var deleteCommand =
|
|
30276
|
+
var deleteCommand = defineCommand119({
|
|
30391
30277
|
meta: {
|
|
30392
30278
|
name: "delete",
|
|
30393
30279
|
description: "Delete an image by ID. Use --dry-run to preview. Example: baker images delete j571abc123 --dry-run"
|
|
@@ -30428,7 +30314,7 @@ var deleteCommand = defineCommand122({
|
|
|
30428
30314
|
});
|
|
30429
30315
|
|
|
30430
30316
|
// src/commands/images/dimensions.ts
|
|
30431
|
-
import { defineCommand as
|
|
30317
|
+
import { defineCommand as defineCommand120 } from "citty";
|
|
30432
30318
|
|
|
30433
30319
|
// src/lib/image/dimensions.ts
|
|
30434
30320
|
import { imageSize } from "image-size";
|
|
@@ -30451,7 +30337,7 @@ registerSchema({
|
|
|
30451
30337
|
target: { type: "string", description: "Local file path or remote http(s) URL", required: true }
|
|
30452
30338
|
}
|
|
30453
30339
|
});
|
|
30454
|
-
var dimensionsCommand =
|
|
30340
|
+
var dimensionsCommand = defineCommand120({
|
|
30455
30341
|
meta: {
|
|
30456
30342
|
name: "dimensions",
|
|
30457
30343
|
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"
|
|
@@ -30495,7 +30381,7 @@ var dimensionsCommand = defineCommand123({
|
|
|
30495
30381
|
});
|
|
30496
30382
|
|
|
30497
30383
|
// src/commands/images/download.ts
|
|
30498
|
-
import { defineCommand as
|
|
30384
|
+
import { defineCommand as defineCommand121 } from "citty";
|
|
30499
30385
|
|
|
30500
30386
|
// src/commands/images/downloadPaths.ts
|
|
30501
30387
|
import { basename as basename2, extname as extname3, join as join5 } from "path";
|
|
@@ -30720,7 +30606,7 @@ function emitError3(err) {
|
|
|
30720
30606
|
writeJson({ ok: false, error: { code: "INTERNAL_ERROR", message: "Unexpected error" } });
|
|
30721
30607
|
process.exit(1);
|
|
30722
30608
|
}
|
|
30723
|
-
var downloadCommand =
|
|
30609
|
+
var downloadCommand = defineCommand121({
|
|
30724
30610
|
meta: {
|
|
30725
30611
|
name: "download",
|
|
30726
30612
|
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"
|
|
@@ -30753,7 +30639,7 @@ var downloadCommand = defineCommand124({
|
|
|
30753
30639
|
});
|
|
30754
30640
|
|
|
30755
30641
|
// src/commands/images/extract.ts
|
|
30756
|
-
import { defineCommand as
|
|
30642
|
+
import { defineCommand as defineCommand122 } from "citty";
|
|
30757
30643
|
|
|
30758
30644
|
// src/commands/images/autoIngest.ts
|
|
30759
30645
|
var AUTO_INGEST_MAX = {
|
|
@@ -30800,7 +30686,7 @@ registerSchema({
|
|
|
30800
30686
|
}
|
|
30801
30687
|
}
|
|
30802
30688
|
});
|
|
30803
|
-
var extractCommand =
|
|
30689
|
+
var extractCommand = defineCommand122({
|
|
30804
30690
|
meta: {
|
|
30805
30691
|
name: "extract",
|
|
30806
30692
|
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"
|
|
@@ -30855,7 +30741,7 @@ var extractCommand = defineCommand125({
|
|
|
30855
30741
|
});
|
|
30856
30742
|
|
|
30857
30743
|
// src/commands/images/find.ts
|
|
30858
|
-
import { defineCommand as
|
|
30744
|
+
import { defineCommand as defineCommand123 } from "citty";
|
|
30859
30745
|
|
|
30860
30746
|
// src/commands/images/providerHits.ts
|
|
30861
30747
|
function asRecord3(value) {
|
|
@@ -30993,7 +30879,7 @@ registerSchema({
|
|
|
30993
30879
|
full: { type: "boolean", description: "Include full metadata", required: false, default: false }
|
|
30994
30880
|
}
|
|
30995
30881
|
});
|
|
30996
|
-
var findCommand =
|
|
30882
|
+
var findCommand = defineCommand123({
|
|
30997
30883
|
meta: {
|
|
30998
30884
|
name: "find",
|
|
30999
30885
|
description: "Library-first fanout image search. Opt in to providers with --sources. `--fallback` short-circuits to externals only when library is thin. With --auto-ingest, ingested external hits return Baker-owned URLs.\n\nExample: baker images find 'office' --sources library,magnific --limit 20"
|
|
@@ -31066,7 +30952,7 @@ var findCommand = defineCommand126({
|
|
|
31066
30952
|
});
|
|
31067
30953
|
|
|
31068
30954
|
// src/commands/images/get.ts
|
|
31069
|
-
import { defineCommand as
|
|
30955
|
+
import { defineCommand as defineCommand124 } from "citty";
|
|
31070
30956
|
registerSchema({
|
|
31071
30957
|
command: "images.get",
|
|
31072
30958
|
description: "Get a single image by ID",
|
|
@@ -31074,7 +30960,7 @@ registerSchema({
|
|
|
31074
30960
|
id: { type: "string", description: "Image ID", required: true }
|
|
31075
30961
|
}
|
|
31076
30962
|
});
|
|
31077
|
-
var getCommand2 =
|
|
30963
|
+
var getCommand2 = defineCommand124({
|
|
31078
30964
|
meta: { name: "get", description: "Get a single image by ID. Example: baker images get j571abc123" },
|
|
31079
30965
|
args: {
|
|
31080
30966
|
id: { type: "positional", description: "Image ID", required: false },
|
|
@@ -31110,7 +30996,7 @@ var getCommand2 = defineCommand127({
|
|
|
31110
30996
|
});
|
|
31111
30997
|
|
|
31112
30998
|
// src/commands/images/gif.ts
|
|
31113
|
-
import { defineCommand as
|
|
30999
|
+
import { defineCommand as defineCommand125 } from "citty";
|
|
31114
31000
|
registerSchema({
|
|
31115
31001
|
command: "images.gif",
|
|
31116
31002
|
description: "Search Giphy for GIFs / reaction memes (paid social creative).",
|
|
@@ -31142,7 +31028,7 @@ registerSchema({
|
|
|
31142
31028
|
}
|
|
31143
31029
|
}
|
|
31144
31030
|
});
|
|
31145
|
-
var gifCommand =
|
|
31031
|
+
var gifCommand = defineCommand125({
|
|
31146
31032
|
meta: {
|
|
31147
31033
|
name: "gif",
|
|
31148
31034
|
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"
|
|
@@ -31189,7 +31075,7 @@ var gifCommand = defineCommand128({
|
|
|
31189
31075
|
});
|
|
31190
31076
|
|
|
31191
31077
|
// src/commands/images/google.ts
|
|
31192
|
-
import { defineCommand as
|
|
31078
|
+
import { defineCommand as defineCommand126 } from "citty";
|
|
31193
31079
|
var GOOGLE_ERROR_FIX = {
|
|
31194
31080
|
action: "use_different_resource",
|
|
31195
31081
|
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."
|
|
@@ -31229,7 +31115,7 @@ registerSchema({
|
|
|
31229
31115
|
}
|
|
31230
31116
|
}
|
|
31231
31117
|
});
|
|
31232
|
-
var googleCommand2 =
|
|
31118
|
+
var googleCommand2 = defineCommand126({
|
|
31233
31119
|
meta: {
|
|
31234
31120
|
name: "google",
|
|
31235
31121
|
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"
|
|
@@ -31302,7 +31188,7 @@ var googleCommand2 = defineCommand129({
|
|
|
31302
31188
|
});
|
|
31303
31189
|
|
|
31304
31190
|
// src/commands/images/group.ts
|
|
31305
|
-
import { defineCommand as
|
|
31191
|
+
import { defineCommand as defineCommand127 } from "citty";
|
|
31306
31192
|
|
|
31307
31193
|
// src/commands/mediaGroup.ts
|
|
31308
31194
|
async function runMediaGroupLookup(input) {
|
|
@@ -31355,7 +31241,7 @@ registerSchema({
|
|
|
31355
31241
|
"group-key": { type: "string", description: "The set key directly, when you already have it", required: false }
|
|
31356
31242
|
}
|
|
31357
31243
|
});
|
|
31358
|
-
var groupCommand =
|
|
31244
|
+
var groupCommand = defineCommand127({
|
|
31359
31245
|
meta: {
|
|
31360
31246
|
name: "group",
|
|
31361
31247
|
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>"
|
|
@@ -31375,7 +31261,7 @@ var groupCommand = defineCommand130({
|
|
|
31375
31261
|
});
|
|
31376
31262
|
|
|
31377
31263
|
// src/commands/images/icon.ts
|
|
31378
|
-
import { defineCommand as
|
|
31264
|
+
import { defineCommand as defineCommand128 } from "citty";
|
|
31379
31265
|
|
|
31380
31266
|
// src/commands/images/brandVerification.ts
|
|
31381
31267
|
function brandToken(domain) {
|
|
@@ -31472,7 +31358,7 @@ registerSchema({
|
|
|
31472
31358
|
full: { type: "boolean", description: "Include full metadata", required: false, default: false }
|
|
31473
31359
|
}
|
|
31474
31360
|
});
|
|
31475
|
-
var iconCommand =
|
|
31361
|
+
var iconCommand = defineCommand128({
|
|
31476
31362
|
meta: {
|
|
31477
31363
|
name: "icon",
|
|
31478
31364
|
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'"
|
|
@@ -31542,7 +31428,7 @@ var iconCommand = defineCommand131({
|
|
|
31542
31428
|
});
|
|
31543
31429
|
|
|
31544
31430
|
// src/commands/images/ingest.ts
|
|
31545
|
-
import { defineCommand as
|
|
31431
|
+
import { defineCommand as defineCommand129 } from "citty";
|
|
31546
31432
|
registerSchema({
|
|
31547
31433
|
command: "images.ingest",
|
|
31548
31434
|
description: "Ingest a remote image URL into the library (full describe + embed).",
|
|
@@ -31556,7 +31442,7 @@ registerSchema({
|
|
|
31556
31442
|
fields: { type: "string", description: "Comma-separated field names to include", required: false }
|
|
31557
31443
|
}
|
|
31558
31444
|
});
|
|
31559
|
-
var ingestCommand =
|
|
31445
|
+
var ingestCommand = defineCommand129({
|
|
31560
31446
|
meta: {
|
|
31561
31447
|
name: "ingest",
|
|
31562
31448
|
description: "Download a remote URL and store it in the library. Hash-deduped on bytes + externalId.\n\nExample: baker images ingest https://img.freepik.com/free-photo/xyz.jpg --source magnific --external-id 12345"
|
|
@@ -31606,7 +31492,7 @@ var ingestCommand = defineCommand132({
|
|
|
31606
31492
|
});
|
|
31607
31493
|
|
|
31608
31494
|
// src/commands/images/layerize.ts
|
|
31609
|
-
import { defineCommand as
|
|
31495
|
+
import { defineCommand as defineCommand130 } from "citty";
|
|
31610
31496
|
registerSchema({
|
|
31611
31497
|
command: "images.layerize",
|
|
31612
31498
|
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.",
|
|
@@ -31670,7 +31556,7 @@ async function pollUntilSettled(imageId, maxWait) {
|
|
|
31670
31556
|
}
|
|
31671
31557
|
return null;
|
|
31672
31558
|
}
|
|
31673
|
-
var layerizeCommand =
|
|
31559
|
+
var layerizeCommand = defineCommand130({
|
|
31674
31560
|
meta: {
|
|
31675
31561
|
name: "layerize",
|
|
31676
31562
|
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'"
|
|
@@ -31739,7 +31625,7 @@ registerSchema({
|
|
|
31739
31625
|
full: { type: "boolean", description: "Include geometry and typography for every layer", required: false }
|
|
31740
31626
|
}
|
|
31741
31627
|
});
|
|
31742
|
-
var layersCommand =
|
|
31628
|
+
var layersCommand = defineCommand130({
|
|
31743
31629
|
meta: {
|
|
31744
31630
|
name: "layers",
|
|
31745
31631
|
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"
|
|
@@ -31779,7 +31665,7 @@ var layersCommand = defineCommand133({
|
|
|
31779
31665
|
});
|
|
31780
31666
|
|
|
31781
31667
|
// src/commands/images/library.ts
|
|
31782
|
-
import { defineCommand as
|
|
31668
|
+
import { defineCommand as defineCommand131 } from "citty";
|
|
31783
31669
|
registerSchema({
|
|
31784
31670
|
command: "images.library",
|
|
31785
31671
|
description: "Search the company image library. Returns only ready images.",
|
|
@@ -31805,7 +31691,7 @@ registerSchema({
|
|
|
31805
31691
|
}
|
|
31806
31692
|
}
|
|
31807
31693
|
});
|
|
31808
|
-
var libraryCommand =
|
|
31694
|
+
var libraryCommand = defineCommand131({
|
|
31809
31695
|
meta: {
|
|
31810
31696
|
name: "library",
|
|
31811
31697
|
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"
|
|
@@ -31868,7 +31754,7 @@ var libraryCommand = defineCommand134({
|
|
|
31868
31754
|
});
|
|
31869
31755
|
|
|
31870
31756
|
// src/commands/images/logo.ts
|
|
31871
|
-
import { defineCommand as
|
|
31757
|
+
import { defineCommand as defineCommand132 } from "citty";
|
|
31872
31758
|
registerSchema({
|
|
31873
31759
|
command: "images.logo",
|
|
31874
31760
|
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.",
|
|
@@ -31896,7 +31782,7 @@ registerSchema({
|
|
|
31896
31782
|
full: { type: "boolean", description: "Include full metadata", required: false, default: false }
|
|
31897
31783
|
}
|
|
31898
31784
|
});
|
|
31899
|
-
var logoCommand =
|
|
31785
|
+
var logoCommand = defineCommand132({
|
|
31900
31786
|
meta: {
|
|
31901
31787
|
name: "logo",
|
|
31902
31788
|
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"
|
|
@@ -31969,7 +31855,7 @@ var logoCommand = defineCommand135({
|
|
|
31969
31855
|
});
|
|
31970
31856
|
|
|
31971
31857
|
// src/commands/images/normalize.ts
|
|
31972
|
-
import { defineCommand as
|
|
31858
|
+
import { defineCommand as defineCommand133 } from "citty";
|
|
31973
31859
|
|
|
31974
31860
|
// src/lib/image/color-changer.ts
|
|
31975
31861
|
import quantize from "quantize";
|
|
@@ -32701,7 +32587,7 @@ function coerceRawArgs(args) {
|
|
|
32701
32587
|
"dry-run": bool(args["dry-run"])
|
|
32702
32588
|
};
|
|
32703
32589
|
}
|
|
32704
|
-
var normalizeCommand =
|
|
32590
|
+
var normalizeCommand = defineCommand133({
|
|
32705
32591
|
meta: {
|
|
32706
32592
|
name: "normalize",
|
|
32707
32593
|
description: `Normalize logos / images: declarative recolor + bg removal + trim + resize. Operates on local files; writes in-place by default.
|
|
@@ -32756,7 +32642,7 @@ Examples:
|
|
|
32756
32642
|
});
|
|
32757
32643
|
|
|
32758
32644
|
// src/commands/images/pinterest.ts
|
|
32759
|
-
import { defineCommand as
|
|
32645
|
+
import { defineCommand as defineCommand134 } from "citty";
|
|
32760
32646
|
registerSchema({
|
|
32761
32647
|
command: "images.pinterest",
|
|
32762
32648
|
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.",
|
|
@@ -32776,7 +32662,7 @@ registerSchema({
|
|
|
32776
32662
|
}
|
|
32777
32663
|
}
|
|
32778
32664
|
});
|
|
32779
|
-
var pinterestCommand =
|
|
32665
|
+
var pinterestCommand = defineCommand134({
|
|
32780
32666
|
meta: {
|
|
32781
32667
|
name: "pinterest",
|
|
32782
32668
|
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'"
|
|
@@ -32833,7 +32719,7 @@ var pinterestCommand = defineCommand137({
|
|
|
32833
32719
|
});
|
|
32834
32720
|
|
|
32835
32721
|
// src/commands/images/screenshot.ts
|
|
32836
|
-
import { defineCommand as
|
|
32722
|
+
import { defineCommand as defineCommand135 } from "citty";
|
|
32837
32723
|
registerSchema({
|
|
32838
32724
|
command: "images.screenshot",
|
|
32839
32725
|
description: "Capture a website screenshot via ScreenshotOne. Auto-ingests on success.",
|
|
@@ -32852,7 +32738,7 @@ registerSchema({
|
|
|
32852
32738
|
full: { type: "boolean", description: "Include full metadata", required: false, default: false }
|
|
32853
32739
|
}
|
|
32854
32740
|
});
|
|
32855
|
-
var screenshotCommand =
|
|
32741
|
+
var screenshotCommand = defineCommand135({
|
|
32856
32742
|
meta: {
|
|
32857
32743
|
name: "screenshot",
|
|
32858
32744
|
description: "Screenshot a URL via ScreenshotOne. $0.009/capture. Auto-ingests to library.\n\nExample: baker images screenshot https://stripe.com --full-page"
|
|
@@ -32916,7 +32802,7 @@ var screenshotCommand = defineCommand138({
|
|
|
32916
32802
|
});
|
|
32917
32803
|
|
|
32918
32804
|
// src/commands/images/search.ts
|
|
32919
|
-
import { defineCommand as
|
|
32805
|
+
import { defineCommand as defineCommand136 } from "citty";
|
|
32920
32806
|
registerSchema({
|
|
32921
32807
|
command: "images.search",
|
|
32922
32808
|
description: "Search images by text query. Only returns ready images.",
|
|
@@ -32932,7 +32818,7 @@ registerSchema({
|
|
|
32932
32818
|
tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
|
|
32933
32819
|
}
|
|
32934
32820
|
});
|
|
32935
|
-
var searchCommand =
|
|
32821
|
+
var searchCommand = defineCommand136({
|
|
32936
32822
|
meta: {
|
|
32937
32823
|
name: "search",
|
|
32938
32824
|
description: "Semantic search images by text query. Uses hybrid BM25 + vector + reranking. Example: baker images search 'hero banner' --aspect-ratio 16:9 --tags logo"
|
|
@@ -32992,7 +32878,7 @@ var searchCommand = defineCommand139({
|
|
|
32992
32878
|
});
|
|
32993
32879
|
|
|
32994
32880
|
// src/commands/images/sticker.ts
|
|
32995
|
-
import { defineCommand as
|
|
32881
|
+
import { defineCommand as defineCommand137 } from "citty";
|
|
32996
32882
|
registerSchema({
|
|
32997
32883
|
command: "images.sticker",
|
|
32998
32884
|
description: "Search Giphy stickers \u2014 transparent-background overlays for ad creative.",
|
|
@@ -33024,7 +32910,7 @@ registerSchema({
|
|
|
33024
32910
|
}
|
|
33025
32911
|
}
|
|
33026
32912
|
});
|
|
33027
|
-
var stickerCommand =
|
|
32913
|
+
var stickerCommand = defineCommand137({
|
|
33028
32914
|
meta: {
|
|
33029
32915
|
name: "sticker",
|
|
33030
32916
|
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"
|
|
@@ -33071,7 +32957,7 @@ var stickerCommand = defineCommand140({
|
|
|
33071
32957
|
});
|
|
33072
32958
|
|
|
33073
32959
|
// src/commands/images/stock.ts
|
|
33074
|
-
import { defineCommand as
|
|
32960
|
+
import { defineCommand as defineCommand138 } from "citty";
|
|
33075
32961
|
var STOCK_ERROR_FIX = {
|
|
33076
32962
|
action: "use_different_resource",
|
|
33077
32963
|
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."
|
|
@@ -33148,7 +33034,7 @@ function buildStockRequest(query, args) {
|
|
|
33148
33034
|
if (args.context) body.descriptionContext = args.context;
|
|
33149
33035
|
return body;
|
|
33150
33036
|
}
|
|
33151
|
-
var stockCommand =
|
|
33037
|
+
var stockCommand = defineCommand138({
|
|
33152
33038
|
meta: {
|
|
33153
33039
|
name: "stock",
|
|
33154
33040
|
description: "Stock search via Magnific \u2014 Freepik's developer API (~250M assets: photos, vectors, illustrations, icons, PSDs). $0.002/req. With --auto-ingest, ingested hits return Baker-owned URLs.\n\nExamples:\n baker images stock 'minimalist office'\n baker images stock 'flat office workers' --type vector\n baker images stock 'hero photo of a kitchen' --type photo --orientation landscape --ai exclude\n baker images stock 'brand pattern' --color '#0a0a0a' --license freemium --auto-ingest 2"
|
|
@@ -33221,7 +33107,7 @@ var stockCommand = defineCommand141({
|
|
|
33221
33107
|
});
|
|
33222
33108
|
|
|
33223
33109
|
// src/lib/tags-command.ts
|
|
33224
|
-
import { defineCommand as
|
|
33110
|
+
import { defineCommand as defineCommand139 } from "citty";
|
|
33225
33111
|
function makeTagsCommand(command, label, endpoint) {
|
|
33226
33112
|
registerSchema({
|
|
33227
33113
|
command: `${command}.tags`,
|
|
@@ -33230,7 +33116,7 @@ function makeTagsCommand(command, label, endpoint) {
|
|
|
33230
33116
|
output: { type: "string", description: "Output format: md|json", required: false, default: "md" }
|
|
33231
33117
|
}
|
|
33232
33118
|
});
|
|
33233
|
-
return
|
|
33119
|
+
return defineCommand139({
|
|
33234
33120
|
meta: {
|
|
33235
33121
|
name: "tags",
|
|
33236
33122
|
description: `List the available ${label} tag names (defaults + company custom tags). Use before filtering with --tags. Example: baker ${command} tags`
|
|
@@ -33266,7 +33152,7 @@ function makeTagsCommand(command, label, endpoint) {
|
|
|
33266
33152
|
var tagsCommand2 = makeTagsCommand("images", "image", "/api/images/tags");
|
|
33267
33153
|
|
|
33268
33154
|
// src/commands/images/upload.ts
|
|
33269
|
-
import { defineCommand as
|
|
33155
|
+
import { defineCommand as defineCommand140 } from "citty";
|
|
33270
33156
|
registerSchema({
|
|
33271
33157
|
command: "images.upload",
|
|
33272
33158
|
description: "Upload an image to the library \u2014 local file path or remote http(s) URL.",
|
|
@@ -33304,7 +33190,7 @@ registerSchema({
|
|
|
33304
33190
|
function isRemoteUrl2(value) {
|
|
33305
33191
|
return /^https?:\/\//i.test(value);
|
|
33306
33192
|
}
|
|
33307
|
-
var uploadCommand =
|
|
33193
|
+
var uploadCommand = defineCommand140({
|
|
33308
33194
|
meta: {
|
|
33309
33195
|
name: "upload",
|
|
33310
33196
|
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'"
|
|
@@ -33397,7 +33283,7 @@ async function uploadLocal(target, args) {
|
|
|
33397
33283
|
}
|
|
33398
33284
|
|
|
33399
33285
|
// src/commands/images/upscale.ts
|
|
33400
|
-
import { defineCommand as
|
|
33286
|
+
import { defineCommand as defineCommand141 } from "citty";
|
|
33401
33287
|
registerSchema({
|
|
33402
33288
|
command: "images.upscale",
|
|
33403
33289
|
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).",
|
|
@@ -33412,7 +33298,7 @@ registerSchema({
|
|
|
33412
33298
|
}
|
|
33413
33299
|
});
|
|
33414
33300
|
var POLL_INTERVAL_MS4 = 1500;
|
|
33415
|
-
var upscaleCommand =
|
|
33301
|
+
var upscaleCommand = defineCommand141({
|
|
33416
33302
|
meta: {
|
|
33417
33303
|
name: "upscale",
|
|
33418
33304
|
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"
|
|
@@ -33467,7 +33353,7 @@ var upscaleCommand = defineCommand144({
|
|
|
33467
33353
|
});
|
|
33468
33354
|
|
|
33469
33355
|
// src/commands/images/use.ts
|
|
33470
|
-
import { defineCommand as
|
|
33356
|
+
import { defineCommand as defineCommand142 } from "citty";
|
|
33471
33357
|
registerSchema({
|
|
33472
33358
|
command: "images.use",
|
|
33473
33359
|
description: "Ingest a URL and wait for the library record to be ready.",
|
|
@@ -33496,7 +33382,7 @@ function emitReady(ingestResult, doc, args) {
|
|
|
33496
33382
|
args.full === true
|
|
33497
33383
|
);
|
|
33498
33384
|
}
|
|
33499
|
-
var useCommand =
|
|
33385
|
+
var useCommand = defineCommand142({
|
|
33500
33386
|
meta: {
|
|
33501
33387
|
name: "use",
|
|
33502
33388
|
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"
|
|
@@ -33545,7 +33431,7 @@ var useCommand = defineCommand145({
|
|
|
33545
33431
|
});
|
|
33546
33432
|
|
|
33547
33433
|
// src/commands/images/index.ts
|
|
33548
|
-
var imagesCommand =
|
|
33434
|
+
var imagesCommand = defineCommand143({
|
|
33549
33435
|
meta: {
|
|
33550
33436
|
name: "images",
|
|
33551
33437
|
description: `Find, source, and normalize images. Subcommands route by provider so cost + license are explicit.
|
|
@@ -33623,12 +33509,12 @@ Full guide: __tooling__/docs/tools/baker/images.md`
|
|
|
33623
33509
|
});
|
|
33624
33510
|
|
|
33625
33511
|
// src/commands/landing/index.ts
|
|
33626
|
-
import { defineCommand as
|
|
33512
|
+
import { defineCommand as defineCommand154 } from "citty";
|
|
33627
33513
|
|
|
33628
33514
|
// src/commands/landing/critique.ts
|
|
33629
33515
|
import { readdir as readdir8, stat as stat6 } from "fs/promises";
|
|
33630
33516
|
import path29 from "path";
|
|
33631
|
-
import { defineCommand as
|
|
33517
|
+
import { defineCommand as defineCommand144 } from "citty";
|
|
33632
33518
|
|
|
33633
33519
|
// src/engine/landing/lib/brand-tokens.ts
|
|
33634
33520
|
import { readFile as readFile20 } from "fs/promises";
|
|
@@ -35023,7 +34909,7 @@ function fail5(code, message, fix) {
|
|
|
35023
34909
|
);
|
|
35024
34910
|
process.exit(2);
|
|
35025
34911
|
}
|
|
35026
|
-
var critiqueCommand2 =
|
|
34912
|
+
var critiqueCommand2 = defineCommand144({
|
|
35027
34913
|
meta: {
|
|
35028
34914
|
name: "critique",
|
|
35029
34915
|
description: "Start here: `baker landing critique <slug>` after building or editing a landing. Deterministic design-quality critic (ADVISORY \u2014 findings never fail it). Flags the known AI design tells (gradient text, overused fonts, side-tab borders, cream palettes, buzzword copy, broken images) tiered block/warn/advisory, respecting the client's BRAND.md as the allowlist. Also records the critique that publishing requires \u2014 run it before finishing a landing."
|
|
@@ -35132,10 +35018,10 @@ async function isDir(p) {
|
|
|
35132
35018
|
}
|
|
35133
35019
|
|
|
35134
35020
|
// src/commands/landing/inspiration/index.ts
|
|
35135
|
-
import { defineCommand as
|
|
35021
|
+
import { defineCommand as defineCommand153 } from "citty";
|
|
35136
35022
|
|
|
35137
35023
|
// src/commands/landing/inspiration/add.ts
|
|
35138
|
-
import { defineCommand as
|
|
35024
|
+
import { defineCommand as defineCommand145 } from "citty";
|
|
35139
35025
|
|
|
35140
35026
|
// src/commands/landing/inspiration/shared.ts
|
|
35141
35027
|
var INSPIRATION_HINTS = {
|
|
@@ -35217,7 +35103,7 @@ registerSchema({
|
|
|
35217
35103
|
note: { type: "string", description: "Why this page is worth keeping", required: false }
|
|
35218
35104
|
}
|
|
35219
35105
|
});
|
|
35220
|
-
var addCommand =
|
|
35106
|
+
var addCommand = defineCommand145({
|
|
35221
35107
|
meta: {
|
|
35222
35108
|
name: "add",
|
|
35223
35109
|
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'"
|
|
@@ -35259,7 +35145,7 @@ var addCommand = defineCommand148({
|
|
|
35259
35145
|
// src/commands/landing/inspiration/code.ts
|
|
35260
35146
|
import { mkdir as mkdir10, writeFile as writeFile14 } from "fs/promises";
|
|
35261
35147
|
import path30 from "path";
|
|
35262
|
-
import { defineCommand as
|
|
35148
|
+
import { defineCommand as defineCommand146 } from "citty";
|
|
35263
35149
|
registerSchema({
|
|
35264
35150
|
command: "landing.inspiration.code",
|
|
35265
35151
|
description: "Write a reference section's standalone HTML+CSS to .baker/inspiration/<id>/ so you can read how it is built. Reference only \u2014 the structure is the lesson, the words are not yours to reuse. Consulting a section records it, and `baker landing critique` blocks a publish that ships its copy verbatim.",
|
|
@@ -35268,7 +35154,7 @@ registerSchema({
|
|
|
35268
35154
|
full: { type: "boolean", description: "Print the markup inline as well as writing it", required: false }
|
|
35269
35155
|
}
|
|
35270
35156
|
});
|
|
35271
|
-
var codeCommand =
|
|
35157
|
+
var codeCommand = defineCommand146({
|
|
35272
35158
|
meta: {
|
|
35273
35159
|
name: "code",
|
|
35274
35160
|
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."
|
|
@@ -35325,7 +35211,7 @@ var codeCommand = defineCommand149({
|
|
|
35325
35211
|
});
|
|
35326
35212
|
|
|
35327
35213
|
// src/commands/landing/inspiration/favorites.ts
|
|
35328
|
-
import { defineCommand as
|
|
35214
|
+
import { defineCommand as defineCommand147 } from "citty";
|
|
35329
35215
|
registerSchema({
|
|
35330
35216
|
command: "landing.inspiration.favorites",
|
|
35331
35217
|
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.",
|
|
@@ -35339,7 +35225,7 @@ registerSchema({
|
|
|
35339
35225
|
}
|
|
35340
35226
|
}
|
|
35341
35227
|
});
|
|
35342
|
-
var favoritesCommand =
|
|
35228
|
+
var favoritesCommand = defineCommand147({
|
|
35343
35229
|
meta: {
|
|
35344
35230
|
name: "favorites",
|
|
35345
35231
|
description: "List this company's saved reference sections. Example: baker landing inspiration favorites --type hero,pricing"
|
|
@@ -35419,7 +35305,7 @@ registerSchema({
|
|
|
35419
35305
|
note: { type: "string", description: "Why this is worth keeping", required: false }
|
|
35420
35306
|
}
|
|
35421
35307
|
});
|
|
35422
|
-
var favoriteCommand =
|
|
35308
|
+
var favoriteCommand = defineCommand147({
|
|
35423
35309
|
meta: {
|
|
35424
35310
|
name: "favorite",
|
|
35425
35311
|
description: "Save a reference section to this company. Example: baker landing inspiration favorite k57abc\u2026"
|
|
@@ -35457,7 +35343,7 @@ registerSchema({
|
|
|
35457
35343
|
page: { type: "boolean", description: "Treat the id as a page rather than a section", required: false }
|
|
35458
35344
|
}
|
|
35459
35345
|
});
|
|
35460
|
-
var unfavoriteCommand =
|
|
35346
|
+
var unfavoriteCommand = defineCommand147({
|
|
35461
35347
|
meta: {
|
|
35462
35348
|
name: "unfavorite",
|
|
35463
35349
|
description: "Remove a reference section from this company's saved set. Example: baker landing inspiration unfavorite k57abc\u2026"
|
|
@@ -35479,7 +35365,7 @@ var unfavoriteCommand = defineCommand150({
|
|
|
35479
35365
|
});
|
|
35480
35366
|
|
|
35481
35367
|
// src/commands/landing/inspiration/page.ts
|
|
35482
|
-
import { defineCommand as
|
|
35368
|
+
import { defineCommand as defineCommand148 } from "citty";
|
|
35483
35369
|
registerSchema({
|
|
35484
35370
|
command: "landing.inspiration.page",
|
|
35485
35371
|
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.",
|
|
@@ -35496,7 +35382,7 @@ registerSchema({
|
|
|
35496
35382
|
}
|
|
35497
35383
|
}
|
|
35498
35384
|
});
|
|
35499
|
-
var pageCommand =
|
|
35385
|
+
var pageCommand = defineCommand148({
|
|
35500
35386
|
meta: {
|
|
35501
35387
|
name: "page",
|
|
35502
35388
|
description: "Show how a reference page sequences its sections. Example: baker landing inspiration page j91xyz\u2026 \u2014 the blueprint, not the pixels."
|
|
@@ -35561,7 +35447,7 @@ var pageCommand = defineCommand151({
|
|
|
35561
35447
|
// src/commands/landing/inspiration/scrape.ts
|
|
35562
35448
|
import { readFile as readFile23 } from "fs/promises";
|
|
35563
35449
|
import path33 from "path";
|
|
35564
|
-
import { defineCommand as
|
|
35450
|
+
import { defineCommand as defineCommand149 } from "citty";
|
|
35565
35451
|
|
|
35566
35452
|
// src/engine/landing/lib/capturedReferences.ts
|
|
35567
35453
|
var MAX_STRINGS_PER_SECTION = 40;
|
|
@@ -37702,7 +37588,7 @@ registerSchema({
|
|
|
37702
37588
|
report: { type: "boolean", description: "Write report.html. `--no-report` to skip", required: false }
|
|
37703
37589
|
}
|
|
37704
37590
|
});
|
|
37705
|
-
var scrapeCommand =
|
|
37591
|
+
var scrapeCommand = defineCommand149({
|
|
37706
37592
|
meta: {
|
|
37707
37593
|
name: "scrape",
|
|
37708
37594
|
description: "Capture a landing page to a directory, now. Example: baker landing inspiration scrape https://linear.app --out .baker/inspiration/linear.app"
|
|
@@ -37805,7 +37691,7 @@ var scrapeCommand = defineCommand152({
|
|
|
37805
37691
|
// src/commands/landing/inspiration/search.ts
|
|
37806
37692
|
import { mkdir as mkdir12, writeFile as writeFile17 } from "fs/promises";
|
|
37807
37693
|
import path34 from "path";
|
|
37808
|
-
import { defineCommand as
|
|
37694
|
+
import { defineCommand as defineCommand150 } from "citty";
|
|
37809
37695
|
registerSchema({
|
|
37810
37696
|
command: "landing.inspiration.search",
|
|
37811
37697
|
description: "Search the shared library of real landing-page sections for reference before you design. Start here: baker landing inspiration search 'pricing with a monthly/annual toggle'. Returns the idea behind each section plus a downloaded screenshot you can Read. Defaults to this company's saved sections; pass --scope all for the whole library.",
|
|
@@ -37909,7 +37795,7 @@ async function downloadShots(results) {
|
|
|
37909
37795
|
);
|
|
37910
37796
|
return saved;
|
|
37911
37797
|
}
|
|
37912
|
-
var searchCommand2 =
|
|
37798
|
+
var searchCommand2 = defineCommand150({
|
|
37913
37799
|
meta: {
|
|
37914
37800
|
name: "search",
|
|
37915
37801
|
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"
|
|
@@ -38007,7 +37893,7 @@ var searchCommand2 = defineCommand153({
|
|
|
38007
37893
|
});
|
|
38008
37894
|
|
|
38009
37895
|
// src/commands/landing/inspiration/sequences.ts
|
|
38010
|
-
import { defineCommand as
|
|
37896
|
+
import { defineCommand as defineCommand151 } from "citty";
|
|
38011
37897
|
var COMPACT_TRANSITIONS = 12;
|
|
38012
37898
|
var COMPACT_ENDS = 5;
|
|
38013
37899
|
var MAX_PAGES = 50;
|
|
@@ -38081,7 +37967,7 @@ function sequencesHints(data, { scope, full }) {
|
|
|
38081
37967
|
if (scope === "favorites") hints.push(...favoritesScopeHints(data.favoritesHealth, data.pagesReturned));
|
|
38082
37968
|
return hints;
|
|
38083
37969
|
}
|
|
38084
|
-
var sequencesCommand =
|
|
37970
|
+
var sequencesCommand = defineCommand151({
|
|
38085
37971
|
meta: {
|
|
38086
37972
|
name: "sequences",
|
|
38087
37973
|
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."
|
|
@@ -38132,7 +38018,7 @@ var sequencesCommand = defineCommand154({
|
|
|
38132
38018
|
// src/commands/landing/inspiration/view.ts
|
|
38133
38019
|
import { mkdir as mkdir13, writeFile as writeFile18 } from "fs/promises";
|
|
38134
38020
|
import path35 from "path";
|
|
38135
|
-
import { defineCommand as
|
|
38021
|
+
import { defineCommand as defineCommand152 } from "citty";
|
|
38136
38022
|
registerSchema({
|
|
38137
38023
|
command: "landing.inspiration.view",
|
|
38138
38024
|
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.",
|
|
@@ -38157,7 +38043,7 @@ async function download(url, file) {
|
|
|
38157
38043
|
return null;
|
|
38158
38044
|
}
|
|
38159
38045
|
}
|
|
38160
|
-
var viewCommand2 =
|
|
38046
|
+
var viewCommand2 = defineCommand152({
|
|
38161
38047
|
meta: {
|
|
38162
38048
|
name: "view",
|
|
38163
38049
|
description: "Full detail for one reference section. Example: baker landing inspiration view k57abc\u2026 \u2014 read the screenshots it saves before you build."
|
|
@@ -38240,7 +38126,7 @@ var viewCommand2 = defineCommand155({
|
|
|
38240
38126
|
});
|
|
38241
38127
|
|
|
38242
38128
|
// src/commands/landing/inspiration/index.ts
|
|
38243
|
-
var inspirationCommand =
|
|
38129
|
+
var inspirationCommand = defineCommand153({
|
|
38244
38130
|
meta: {
|
|
38245
38131
|
name: "inspiration",
|
|
38246
38132
|
description: `Reference library of real landing-page sections \u2014 look at how good pages actually solve a problem before you design one.
|
|
@@ -38285,7 +38171,7 @@ Full guide: __tooling__/docs/tools/baker/landing.md`
|
|
|
38285
38171
|
});
|
|
38286
38172
|
|
|
38287
38173
|
// src/commands/landing/index.ts
|
|
38288
|
-
var landingCommand =
|
|
38174
|
+
var landingCommand = defineCommand154({
|
|
38289
38175
|
meta: {
|
|
38290
38176
|
name: "landing",
|
|
38291
38177
|
description: `Design-quality tools for landing pages (src/pages/<slug>/).
|
|
@@ -38302,8 +38188,58 @@ Subcommands:
|
|
|
38302
38188
|
}
|
|
38303
38189
|
});
|
|
38304
38190
|
|
|
38191
|
+
// src/commands/marketplace/index.ts
|
|
38192
|
+
import { defineCommand as defineCommand155 } from "citty";
|
|
38193
|
+
|
|
38194
|
+
// src/commands/marketplace/shared.ts
|
|
38195
|
+
function failApi2(err) {
|
|
38196
|
+
if (err instanceof ApiError) {
|
|
38197
|
+
writeJson({ ok: false, error: { code: err.code, message: err.message } });
|
|
38198
|
+
process.exit(1);
|
|
38199
|
+
}
|
|
38200
|
+
const message = err instanceof Error ? err.message : "Unexpected error";
|
|
38201
|
+
writeJson({ ok: false, error: { code: "INTERNAL_ERROR", message } });
|
|
38202
|
+
process.exit(1);
|
|
38203
|
+
}
|
|
38204
|
+
|
|
38205
|
+
// src/commands/marketplace/index.ts
|
|
38206
|
+
registerSchema({
|
|
38207
|
+
command: "marketplace.list",
|
|
38208
|
+
description: "The recipes Baker ships: recurring jobs a company can switch on, 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.",
|
|
38209
|
+
args: {
|
|
38210
|
+
list: {
|
|
38211
|
+
type: "boolean",
|
|
38212
|
+
description: "List every recipe in the marketplace. Example: baker marketplace --list",
|
|
38213
|
+
required: false
|
|
38214
|
+
}
|
|
38215
|
+
}
|
|
38216
|
+
});
|
|
38217
|
+
var marketplaceCommand = defineCommand155({
|
|
38218
|
+
meta: {
|
|
38219
|
+
name: "marketplace",
|
|
38220
|
+
description: `The recipes Baker ships \u2014 recurring jobs a company can switch on, with what each one produces.
|
|
38221
|
+
|
|
38222
|
+
Start here when you are deciding what a company should have running: every recipe you propose has to be one of these.
|
|
38223
|
+
|
|
38224
|
+
Examples:
|
|
38225
|
+
baker marketplace --list
|
|
38226
|
+
Full guide: __tooling__/docs/tools/baker/marketplace.md`
|
|
38227
|
+
},
|
|
38228
|
+
args: {
|
|
38229
|
+
list: { type: "boolean", description: "List every recipe in the marketplace", required: false }
|
|
38230
|
+
},
|
|
38231
|
+
run: async () => {
|
|
38232
|
+
try {
|
|
38233
|
+
const response = await apiPost("/api/marketplace/list", {});
|
|
38234
|
+
writeJson(response);
|
|
38235
|
+
} catch (err) {
|
|
38236
|
+
failApi2(err);
|
|
38237
|
+
}
|
|
38238
|
+
}
|
|
38239
|
+
});
|
|
38240
|
+
|
|
38305
38241
|
// src/commands/mcp/index.ts
|
|
38306
|
-
import { defineCommand as
|
|
38242
|
+
import { defineCommand as defineCommand156 } from "citty";
|
|
38307
38243
|
|
|
38308
38244
|
// src/commands/mcp/platforms.ts
|
|
38309
38245
|
function readsKey(label) {
|
|
@@ -38372,7 +38308,7 @@ registerSchema({
|
|
|
38372
38308
|
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.",
|
|
38373
38309
|
args: {}
|
|
38374
38310
|
});
|
|
38375
|
-
var connectedCommand =
|
|
38311
|
+
var connectedCommand = defineCommand156({
|
|
38376
38312
|
meta: {
|
|
38377
38313
|
name: "connected",
|
|
38378
38314
|
description: `Everything this chat can reach \u2014 managed integrations, custom MCP servers, and connected platforms.
|
|
@@ -38431,7 +38367,7 @@ registerSchema({
|
|
|
38431
38367
|
description: "List the custom MCP servers this company's chats see (org + company + your own user scope).",
|
|
38432
38368
|
args: {}
|
|
38433
38369
|
});
|
|
38434
|
-
var
|
|
38370
|
+
var listCommand13 = defineCommand156({
|
|
38435
38371
|
meta: { name: "list", description: "List custom MCP servers visible to this company's chats." },
|
|
38436
38372
|
run: async () => {
|
|
38437
38373
|
try {
|
|
@@ -38468,7 +38404,7 @@ registerSchema({
|
|
|
38468
38404
|
header: { type: "string", description: 'Auth header "Key: Value" (repeatable)', required: false }
|
|
38469
38405
|
}
|
|
38470
38406
|
});
|
|
38471
|
-
var addCommand2 =
|
|
38407
|
+
var addCommand2 = defineCommand156({
|
|
38472
38408
|
meta: {
|
|
38473
38409
|
name: "add",
|
|
38474
38410
|
description: `Register a custom MCP server. Tools appear as mcp__<name>__* on the NEXT message.
|
|
@@ -38520,7 +38456,7 @@ registerSchema({
|
|
|
38520
38456
|
description: "Remove a company custom MCP server by name.",
|
|
38521
38457
|
args: { name: { type: "string", description: "Server name to remove", required: true } }
|
|
38522
38458
|
});
|
|
38523
|
-
var removeCommand4 =
|
|
38459
|
+
var removeCommand4 = defineCommand156({
|
|
38524
38460
|
meta: {
|
|
38525
38461
|
name: "remove",
|
|
38526
38462
|
description: `Remove a company custom MCP server by name.
|
|
@@ -38542,7 +38478,7 @@ Example:
|
|
|
38542
38478
|
}
|
|
38543
38479
|
}
|
|
38544
38480
|
});
|
|
38545
|
-
var mcpCommand =
|
|
38481
|
+
var mcpCommand = defineCommand156({
|
|
38546
38482
|
meta: {
|
|
38547
38483
|
name: "mcp",
|
|
38548
38484
|
description: `Third-party tools for this company \u2014 see what's connected, register custom HTTPS MCP endpoints.
|
|
@@ -38561,17 +38497,17 @@ Full guide: __tooling__/docs/tools/baker/mcp.md`
|
|
|
38561
38497
|
},
|
|
38562
38498
|
subCommands: {
|
|
38563
38499
|
connected: connectedCommand,
|
|
38564
|
-
list:
|
|
38500
|
+
list: listCommand13,
|
|
38565
38501
|
add: addCommand2,
|
|
38566
38502
|
remove: removeCommand4
|
|
38567
38503
|
}
|
|
38568
38504
|
});
|
|
38569
38505
|
|
|
38570
38506
|
// src/commands/research/index.ts
|
|
38571
|
-
import { defineCommand as
|
|
38507
|
+
import { defineCommand as defineCommand168 } from "citty";
|
|
38572
38508
|
|
|
38573
38509
|
// src/commands/research/advertisers.ts
|
|
38574
|
-
import { defineCommand as
|
|
38510
|
+
import { defineCommand as defineCommand157 } from "citty";
|
|
38575
38511
|
|
|
38576
38512
|
// src/commands/research/hints.ts
|
|
38577
38513
|
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.';
|
|
@@ -38754,7 +38690,7 @@ var FIELDS3 = {
|
|
|
38754
38690
|
etv: "Estimated traffic value (USD)",
|
|
38755
38691
|
visibility: "SERP visibility score (0-1)"
|
|
38756
38692
|
};
|
|
38757
|
-
var advertisersCommand =
|
|
38693
|
+
var advertisersCommand = defineCommand157({
|
|
38758
38694
|
meta: {
|
|
38759
38695
|
name: "advertisers",
|
|
38760
38696
|
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).
|
|
@@ -38810,7 +38746,7 @@ Examples:
|
|
|
38810
38746
|
});
|
|
38811
38747
|
|
|
38812
38748
|
// src/commands/research/autocomplete.ts
|
|
38813
|
-
import { defineCommand as
|
|
38749
|
+
import { defineCommand as defineCommand158 } from "citty";
|
|
38814
38750
|
registerSchema({
|
|
38815
38751
|
command: "research.autocomplete",
|
|
38816
38752
|
description: "Get Google Autocomplete suggestions for a seed keyword. Useful for keyword expansion and discovering what people actually search for. IMPORTANT: If --location and --language are omitted, defaults to United States (us) and English (en).",
|
|
@@ -38833,7 +38769,7 @@ registerSchema({
|
|
|
38833
38769
|
var FIELDS4 = {
|
|
38834
38770
|
suggestion: "Autocomplete suggestion from Google"
|
|
38835
38771
|
};
|
|
38836
|
-
var autocompleteCommand =
|
|
38772
|
+
var autocompleteCommand = defineCommand158({
|
|
38837
38773
|
meta: {
|
|
38838
38774
|
name: "autocomplete",
|
|
38839
38775
|
description: `Get Google Autocomplete suggestions for keyword expansion.
|
|
@@ -38888,7 +38824,7 @@ Examples:
|
|
|
38888
38824
|
});
|
|
38889
38825
|
|
|
38890
38826
|
// src/commands/research/countries.ts
|
|
38891
|
-
import { defineCommand as
|
|
38827
|
+
import { defineCommand as defineCommand159 } from "citty";
|
|
38892
38828
|
registerSchema({
|
|
38893
38829
|
command: "research.countries",
|
|
38894
38830
|
description: "List all supported country codes for --location flag in research commands.",
|
|
@@ -38945,7 +38881,7 @@ var FIELDS5 = {
|
|
|
38945
38881
|
code: "Country code to pass as --location",
|
|
38946
38882
|
name: "Country name"
|
|
38947
38883
|
};
|
|
38948
|
-
var countriesCommand =
|
|
38884
|
+
var countriesCommand = defineCommand159({
|
|
38949
38885
|
meta: {
|
|
38950
38886
|
name: "countries",
|
|
38951
38887
|
description: "List all supported country codes for --location flag."
|
|
@@ -38956,7 +38892,7 @@ var countriesCommand = defineCommand161({
|
|
|
38956
38892
|
});
|
|
38957
38893
|
|
|
38958
38894
|
// src/commands/research/fetch.ts
|
|
38959
|
-
import { defineCommand as
|
|
38895
|
+
import { defineCommand as defineCommand160 } from "citty";
|
|
38960
38896
|
var CONTENT_PREVIEW_CHARS = 2e4;
|
|
38961
38897
|
var TIMEOUT_MS = 18e4;
|
|
38962
38898
|
registerSchema({
|
|
@@ -39029,7 +38965,7 @@ function fetchFix(code) {
|
|
|
39029
38965
|
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."
|
|
39030
38966
|
};
|
|
39031
38967
|
}
|
|
39032
|
-
var fetchCommand =
|
|
38968
|
+
var fetchCommand = defineCommand160({
|
|
39033
38969
|
meta: {
|
|
39034
38970
|
name: "fetch",
|
|
39035
38971
|
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.
|
|
@@ -39106,7 +39042,7 @@ Examples:
|
|
|
39106
39042
|
});
|
|
39107
39043
|
|
|
39108
39044
|
// src/commands/research/intent.ts
|
|
39109
|
-
import { defineCommand as
|
|
39045
|
+
import { defineCommand as defineCommand161 } from "citty";
|
|
39110
39046
|
registerSchema({
|
|
39111
39047
|
command: "research.intent",
|
|
39112
39048
|
description: "Classify Google Search intent for keywords. Determines if someone searching is looking to buy, research, or navigate. IMPORTANT: If --language is omitted, defaults to English (en). The response includes a query_context object showing which language was used.",
|
|
@@ -39129,7 +39065,7 @@ var FIELDS7 = {
|
|
|
39129
39065
|
intent: "Primary Google Search intent: informational, navigational, commercial, transactional",
|
|
39130
39066
|
probability: "Confidence score 0.0-1.0"
|
|
39131
39067
|
};
|
|
39132
|
-
var intentCommand =
|
|
39068
|
+
var intentCommand = defineCommand161({
|
|
39133
39069
|
meta: {
|
|
39134
39070
|
name: "intent",
|
|
39135
39071
|
description: `Classify Google Search intent for keywords. Returns intent type and confidence.
|
|
@@ -39177,7 +39113,7 @@ Examples:
|
|
|
39177
39113
|
});
|
|
39178
39114
|
|
|
39179
39115
|
// src/commands/research/keyword-gap.ts
|
|
39180
|
-
import { defineCommand as
|
|
39116
|
+
import { defineCommand as defineCommand162 } from "citty";
|
|
39181
39117
|
registerSchema({
|
|
39182
39118
|
command: "research.keyword-gap",
|
|
39183
39119
|
description: "Find keywords a competitor ranks for (organic or paid) that you don't. Discovers expansion opportunities. IMPORTANT: If --location and --language are omitted, defaults to United States (us) and English (en). The response includes a query_context object showing which location/language were used.",
|
|
@@ -39206,7 +39142,7 @@ var FIELDS8 = {
|
|
|
39206
39142
|
cpc: "Cost per click USD",
|
|
39207
39143
|
their_position: "Competitor's ranking position"
|
|
39208
39144
|
};
|
|
39209
|
-
var keywordGapCommand =
|
|
39145
|
+
var keywordGapCommand = defineCommand162({
|
|
39210
39146
|
meta: {
|
|
39211
39147
|
name: "keyword-gap",
|
|
39212
39148
|
description: `Find keywords a competitor has that you don't. Supports pagination via --offset.
|
|
@@ -39281,7 +39217,7 @@ Examples:
|
|
|
39281
39217
|
});
|
|
39282
39218
|
|
|
39283
39219
|
// src/commands/research/keywords-for-site.ts
|
|
39284
|
-
import { defineCommand as
|
|
39220
|
+
import { defineCommand as defineCommand163 } from "citty";
|
|
39285
39221
|
registerSchema({
|
|
39286
39222
|
command: "research.keywords-for-site",
|
|
39287
39223
|
description: "Get keywords a competitor targets in Google. Use --type paid to see only paid keywords, --type organic for organic only. IMPORTANT: If --location and --language are omitted, defaults to United States (us) and English (en). The response includes a query_context object showing which location/language were used.",
|
|
@@ -39314,7 +39250,7 @@ var FIELDS9 = {
|
|
|
39314
39250
|
competition: "LOW, MEDIUM, or HIGH",
|
|
39315
39251
|
competition_index: "Competition score 0-100"
|
|
39316
39252
|
};
|
|
39317
|
-
var keywordsForSiteCommand =
|
|
39253
|
+
var keywordsForSiteCommand = defineCommand163({
|
|
39318
39254
|
meta: {
|
|
39319
39255
|
name: "keywords-for-site",
|
|
39320
39256
|
description: `Get keywords a competitor targets in Google. Use --type to filter paid/organic.
|
|
@@ -39376,7 +39312,7 @@ Examples:
|
|
|
39376
39312
|
});
|
|
39377
39313
|
|
|
39378
39314
|
// src/commands/research/languages.ts
|
|
39379
|
-
import { defineCommand as
|
|
39315
|
+
import { defineCommand as defineCommand164 } from "citty";
|
|
39380
39316
|
registerSchema({
|
|
39381
39317
|
command: "research.languages",
|
|
39382
39318
|
description: "List all supported language codes for --language flag in research commands.",
|
|
@@ -39406,7 +39342,7 @@ var FIELDS10 = {
|
|
|
39406
39342
|
code: "Language code to pass as --language",
|
|
39407
39343
|
name: "Language name (also accepted by --language)"
|
|
39408
39344
|
};
|
|
39409
|
-
var languagesCommand2 =
|
|
39345
|
+
var languagesCommand2 = defineCommand164({
|
|
39410
39346
|
meta: {
|
|
39411
39347
|
name: "languages",
|
|
39412
39348
|
description: "List all supported language codes for --language flag."
|
|
@@ -39417,7 +39353,7 @@ var languagesCommand2 = defineCommand166({
|
|
|
39417
39353
|
});
|
|
39418
39354
|
|
|
39419
39355
|
// src/commands/research/lighthouse.ts
|
|
39420
|
-
import { defineCommand as
|
|
39356
|
+
import { defineCommand as defineCommand165 } from "citty";
|
|
39421
39357
|
registerSchema({
|
|
39422
39358
|
command: "research.lighthouse",
|
|
39423
39359
|
description: "Landing page performance audit. Returns metrics that affect Google Ads Quality Score and CPC.",
|
|
@@ -39436,7 +39372,7 @@ var FIELDS11 = {
|
|
|
39436
39372
|
speed_index_ms: "Speed Index in ms (good: < 3400)",
|
|
39437
39373
|
interactive_ms: "Time to Interactive in ms (good: < 3800)"
|
|
39438
39374
|
};
|
|
39439
|
-
var lighthouseCommand =
|
|
39375
|
+
var lighthouseCommand = defineCommand165({
|
|
39440
39376
|
meta: {
|
|
39441
39377
|
name: "lighthouse",
|
|
39442
39378
|
description: `Landing page performance audit. Metrics affecting Google Ads Quality Score.
|
|
@@ -39474,7 +39410,7 @@ Examples:
|
|
|
39474
39410
|
});
|
|
39475
39411
|
|
|
39476
39412
|
// src/commands/research/relevant-pages.ts
|
|
39477
|
-
import { defineCommand as
|
|
39413
|
+
import { defineCommand as defineCommand166 } from "citty";
|
|
39478
39414
|
registerSchema({
|
|
39479
39415
|
command: "research.relevant-pages",
|
|
39480
39416
|
description: "Get the top pages of a competitor domain with organic traffic and ranking data. Shows which pages drive the most traffic. IMPORTANT: If --location and --language are omitted, defaults to United States (us) and English (en).",
|
|
@@ -39500,7 +39436,7 @@ var FIELDS12 = {
|
|
|
39500
39436
|
keywords: "Total organic keywords the page ranks for",
|
|
39501
39437
|
top_10: "Keywords in positions 1-10"
|
|
39502
39438
|
};
|
|
39503
|
-
var relevantPagesCommand =
|
|
39439
|
+
var relevantPagesCommand = defineCommand166({
|
|
39504
39440
|
meta: {
|
|
39505
39441
|
name: "relevant-pages",
|
|
39506
39442
|
description: `Get the top pages of a competitor domain with traffic data.
|
|
@@ -39547,7 +39483,7 @@ Examples:
|
|
|
39547
39483
|
});
|
|
39548
39484
|
|
|
39549
39485
|
// src/commands/research/web.ts
|
|
39550
|
-
import { defineCommand as
|
|
39486
|
+
import { defineCommand as defineCommand167 } from "citty";
|
|
39551
39487
|
registerSchema({
|
|
39552
39488
|
command: "research.web",
|
|
39553
39489
|
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).",
|
|
@@ -39598,7 +39534,7 @@ async function runDeepResearch(question) {
|
|
|
39598
39534
|
}
|
|
39599
39535
|
throw new Error("Deep research timed out");
|
|
39600
39536
|
}
|
|
39601
|
-
var webCommand =
|
|
39537
|
+
var webCommand = defineCommand167({
|
|
39602
39538
|
meta: {
|
|
39603
39539
|
name: "web",
|
|
39604
39540
|
description: `Search the web with AI to answer any open-ended marketing question. Uses live internet data via Google Search.
|
|
@@ -39660,7 +39596,7 @@ Examples:
|
|
|
39660
39596
|
});
|
|
39661
39597
|
|
|
39662
39598
|
// src/commands/research/index.ts
|
|
39663
|
-
var researchCommand =
|
|
39599
|
+
var researchCommand = defineCommand168({
|
|
39664
39600
|
meta: {
|
|
39665
39601
|
name: "research",
|
|
39666
39602
|
description: `Competitive intelligence and AI-powered research commands.
|
|
@@ -39704,10 +39640,10 @@ Full guide: __tooling__/docs/tools/baker/research.md`
|
|
|
39704
39640
|
});
|
|
39705
39641
|
|
|
39706
39642
|
// src/commands/scheduled-actions/index.ts
|
|
39707
|
-
import { defineCommand as
|
|
39643
|
+
import { defineCommand as defineCommand175 } from "citty";
|
|
39708
39644
|
|
|
39709
39645
|
// src/commands/scheduled-actions/create.ts
|
|
39710
|
-
import { defineCommand as
|
|
39646
|
+
import { defineCommand as defineCommand169 } from "citty";
|
|
39711
39647
|
|
|
39712
39648
|
// src/commands/scheduled-actions/shared.ts
|
|
39713
39649
|
var TEMP_SCHEDULED_ACTION_PREFIX = "temp_sched_";
|
|
@@ -39715,7 +39651,7 @@ var TEMP_ID_PREFIX = "temp_";
|
|
|
39715
39651
|
function writeOk2(data) {
|
|
39716
39652
|
writeJson({ ok: true, data: data ?? null });
|
|
39717
39653
|
}
|
|
39718
|
-
function
|
|
39654
|
+
function failValidation3(message) {
|
|
39719
39655
|
writeJson({ ok: false, error: { code: "VALIDATION_ERROR", message } });
|
|
39720
39656
|
process.exit(1);
|
|
39721
39657
|
}
|
|
@@ -39739,7 +39675,7 @@ function isOtherTempId(id) {
|
|
|
39739
39675
|
}
|
|
39740
39676
|
function validateScheduledActionRef(ref) {
|
|
39741
39677
|
if (isOtherTempId(ref)) {
|
|
39742
|
-
|
|
39678
|
+
failValidation3(`Scheduled action temp IDs must start with ${TEMP_SCHEDULED_ACTION_PREFIX}.`);
|
|
39743
39679
|
}
|
|
39744
39680
|
if (!isTempScheduledActionId(ref)) {
|
|
39745
39681
|
validateConvexId(ref);
|
|
@@ -39753,7 +39689,7 @@ function isPromptWithoutAgent(args, agentDisabled) {
|
|
|
39753
39689
|
}
|
|
39754
39690
|
function failIfPromptWithoutAgent(args, agentDisabled) {
|
|
39755
39691
|
if (isPromptWithoutAgent(args, agentDisabled)) {
|
|
39756
|
-
|
|
39692
|
+
failValidation3(
|
|
39757
39693
|
"--prompt only applies when an agent is spawned; it has no effect with --no-spawn-agent or --spawn-agent false."
|
|
39758
39694
|
);
|
|
39759
39695
|
}
|
|
@@ -39768,21 +39704,21 @@ function parseBooleanFlag(raw, flagName) {
|
|
|
39768
39704
|
if (raw === false || raw === "false") {
|
|
39769
39705
|
return false;
|
|
39770
39706
|
}
|
|
39771
|
-
|
|
39707
|
+
failValidation3(`${flagName} must be true or false.`);
|
|
39772
39708
|
}
|
|
39773
39709
|
function buildScheduleBody(args, options) {
|
|
39774
39710
|
const cron = args.cron;
|
|
39775
39711
|
const runAt = args["run-at"];
|
|
39776
39712
|
const timezone = args.timezone;
|
|
39777
39713
|
if (cron && runAt) {
|
|
39778
|
-
|
|
39714
|
+
failValidation3("--cron and --run-at are mutually exclusive.");
|
|
39779
39715
|
}
|
|
39780
39716
|
if (runAt) {
|
|
39781
39717
|
if (!runAt.endsWith("Z")) {
|
|
39782
|
-
|
|
39718
|
+
failValidation3("--run-at must be an ISO UTC timestamp ending in Z.");
|
|
39783
39719
|
}
|
|
39784
39720
|
if (!Number.isFinite(Date.parse(runAt))) {
|
|
39785
|
-
|
|
39721
|
+
failValidation3("--run-at must be a valid ISO timestamp.");
|
|
39786
39722
|
}
|
|
39787
39723
|
return { runAt, ...timezone ? { timezone } : {} };
|
|
39788
39724
|
}
|
|
@@ -39793,7 +39729,7 @@ function buildScheduleBody(args, options) {
|
|
|
39793
39729
|
return { timezone };
|
|
39794
39730
|
}
|
|
39795
39731
|
if (options.required) {
|
|
39796
|
-
|
|
39732
|
+
failValidation3("Provide exactly one of --cron or --run-at.");
|
|
39797
39733
|
}
|
|
39798
39734
|
return void 0;
|
|
39799
39735
|
}
|
|
@@ -39822,7 +39758,7 @@ registerSchema({
|
|
|
39822
39758
|
prompt: { type: "string", description: "Additional prompt instructions for the spawned agent", required: false }
|
|
39823
39759
|
}
|
|
39824
39760
|
});
|
|
39825
|
-
var createCommand2 =
|
|
39761
|
+
var createCommand2 = defineCommand169({
|
|
39826
39762
|
meta: {
|
|
39827
39763
|
name: "create",
|
|
39828
39764
|
description: 'Stage a scheduled action. Example: baker scheduled-actions create --name "Weekly report" --description "..." --cron "0 9 * * MON"'
|
|
@@ -39842,10 +39778,10 @@ var createCommand2 = defineCommand171({
|
|
|
39842
39778
|
const name = args.name;
|
|
39843
39779
|
const description = args.description;
|
|
39844
39780
|
if (!name || name.trim().length === 0) {
|
|
39845
|
-
|
|
39781
|
+
failValidation3("--name is required.");
|
|
39846
39782
|
}
|
|
39847
39783
|
if (!description || description.trim().length === 0) {
|
|
39848
|
-
|
|
39784
|
+
failValidation3("--description is required.");
|
|
39849
39785
|
}
|
|
39850
39786
|
const schedule = buildScheduleBody(args, { required: true });
|
|
39851
39787
|
const chatId = requireChatId();
|
|
@@ -39871,7 +39807,7 @@ var createCommand2 = defineCommand171({
|
|
|
39871
39807
|
});
|
|
39872
39808
|
|
|
39873
39809
|
// src/commands/scheduled-actions/delete.ts
|
|
39874
|
-
import { defineCommand as
|
|
39810
|
+
import { defineCommand as defineCommand170 } from "citty";
|
|
39875
39811
|
registerSchema({
|
|
39876
39812
|
command: "scheduled-actions.delete",
|
|
39877
39813
|
description: "Stage deletion of a published scheduled action or cancellation of a temp_sched_* draft creation.",
|
|
@@ -39879,7 +39815,7 @@ registerSchema({
|
|
|
39879
39815
|
id: { type: "string", description: "Published scheduled action ID or temp_sched_* draft ID", required: true }
|
|
39880
39816
|
}
|
|
39881
39817
|
});
|
|
39882
|
-
var deleteCommand2 =
|
|
39818
|
+
var deleteCommand2 = defineCommand170({
|
|
39883
39819
|
meta: {
|
|
39884
39820
|
name: "delete",
|
|
39885
39821
|
description: "Stage scheduled action deletion. Example: baker scheduled-actions delete <id-or-temp_sched_id>"
|
|
@@ -39896,7 +39832,7 @@ var deleteCommand2 = defineCommand172({
|
|
|
39896
39832
|
try {
|
|
39897
39833
|
const id = args.id || args["scheduled-action-id"];
|
|
39898
39834
|
if (!id) {
|
|
39899
|
-
|
|
39835
|
+
failValidation3("Scheduled action ID is required.");
|
|
39900
39836
|
}
|
|
39901
39837
|
validateScheduledActionRef(id);
|
|
39902
39838
|
await apiPost("/api/scheduled-actions/delete", { chatId: requireChatId(), id });
|
|
@@ -39908,7 +39844,7 @@ var deleteCommand2 = defineCommand172({
|
|
|
39908
39844
|
});
|
|
39909
39845
|
|
|
39910
39846
|
// src/commands/scheduled-actions/get.ts
|
|
39911
|
-
import { defineCommand as
|
|
39847
|
+
import { defineCommand as defineCommand171 } from "citty";
|
|
39912
39848
|
registerSchema({
|
|
39913
39849
|
command: "scheduled-actions.get",
|
|
39914
39850
|
description: "Get a published scheduled action or a temp_sched_* draft-created scheduled action.",
|
|
@@ -39917,7 +39853,7 @@ registerSchema({
|
|
|
39917
39853
|
chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
|
|
39918
39854
|
}
|
|
39919
39855
|
});
|
|
39920
|
-
var getCommand3 =
|
|
39856
|
+
var getCommand3 = defineCommand171({
|
|
39921
39857
|
meta: {
|
|
39922
39858
|
name: "get",
|
|
39923
39859
|
description: "Get a scheduled action. Example: baker scheduled-actions get <id-or-temp_sched_id>"
|
|
@@ -39935,13 +39871,13 @@ var getCommand3 = defineCommand173({
|
|
|
39935
39871
|
try {
|
|
39936
39872
|
const id = args.id || args["scheduled-action-id"];
|
|
39937
39873
|
if (!id) {
|
|
39938
|
-
|
|
39874
|
+
failValidation3("Scheduled action ID is required.");
|
|
39939
39875
|
}
|
|
39940
39876
|
validateScheduledActionRef(id);
|
|
39941
39877
|
const env = getEnv();
|
|
39942
39878
|
const chatId = typeof args.chat === "string" && args.chat.length > 0 ? args.chat : env.BAKER_CHAT_ID;
|
|
39943
39879
|
if (isTempScheduledActionId(id) && !chatId) {
|
|
39944
|
-
|
|
39880
|
+
failValidation3("BAKER_CHAT_ID or --chat is required to get a temp scheduled action ID.");
|
|
39945
39881
|
}
|
|
39946
39882
|
const body = { id };
|
|
39947
39883
|
if (chatId) {
|
|
@@ -39956,7 +39892,7 @@ var getCommand3 = defineCommand173({
|
|
|
39956
39892
|
});
|
|
39957
39893
|
|
|
39958
39894
|
// src/commands/scheduled-actions/list.ts
|
|
39959
|
-
import { defineCommand as
|
|
39895
|
+
import { defineCommand as defineCommand172 } from "citty";
|
|
39960
39896
|
registerSchema({
|
|
39961
39897
|
command: "scheduled-actions.list",
|
|
39962
39898
|
description: "List published scheduled actions. Includes draft state when BAKER_CHAT_ID is set, or --chat <id> to read an earlier chat's staged schedules instead.",
|
|
@@ -39964,7 +39900,7 @@ registerSchema({
|
|
|
39964
39900
|
chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
|
|
39965
39901
|
}
|
|
39966
39902
|
});
|
|
39967
|
-
var
|
|
39903
|
+
var listCommand14 = defineCommand172({
|
|
39968
39904
|
meta: {
|
|
39969
39905
|
name: "list",
|
|
39970
39906
|
description: "List scheduled actions. Includes staged draft ops when BAKER_CHAT_ID is set, or --chat <id> to read an earlier chat's staged schedules instead."
|
|
@@ -39987,7 +39923,7 @@ var listCommand15 = defineCommand174({
|
|
|
39987
39923
|
});
|
|
39988
39924
|
|
|
39989
39925
|
// src/commands/scheduled-actions/trigger.ts
|
|
39990
|
-
import { defineCommand as
|
|
39926
|
+
import { defineCommand as defineCommand173 } from "citty";
|
|
39991
39927
|
registerSchema({
|
|
39992
39928
|
command: "scheduled-actions.trigger",
|
|
39993
39929
|
description: "Immediately trigger a published scheduled action. Does not require BAKER_CHAT_ID and rejects temp_sched_* IDs.",
|
|
@@ -39995,7 +39931,7 @@ registerSchema({
|
|
|
39995
39931
|
id: { type: "string", description: "Published scheduled action ID", required: true }
|
|
39996
39932
|
}
|
|
39997
39933
|
});
|
|
39998
|
-
var triggerCommand =
|
|
39934
|
+
var triggerCommand = defineCommand173({
|
|
39999
39935
|
meta: {
|
|
40000
39936
|
name: "trigger",
|
|
40001
39937
|
description: "Immediately trigger a published scheduled action. Example: baker scheduled-actions trigger <id>"
|
|
@@ -40012,10 +39948,10 @@ var triggerCommand = defineCommand175({
|
|
|
40012
39948
|
try {
|
|
40013
39949
|
const id = args.id || args["scheduled-action-id"];
|
|
40014
39950
|
if (!id) {
|
|
40015
|
-
|
|
39951
|
+
failValidation3("Scheduled action ID is required.");
|
|
40016
39952
|
}
|
|
40017
39953
|
if (isTempScheduledActionId(id)) {
|
|
40018
|
-
|
|
39954
|
+
failValidation3("trigger requires a published scheduled action ID, not temp_sched_*.");
|
|
40019
39955
|
}
|
|
40020
39956
|
validateConvexId(id);
|
|
40021
39957
|
const env = getEnv();
|
|
@@ -40032,7 +39968,7 @@ var triggerCommand = defineCommand175({
|
|
|
40032
39968
|
});
|
|
40033
39969
|
|
|
40034
39970
|
// src/commands/scheduled-actions/update.ts
|
|
40035
|
-
import { defineCommand as
|
|
39971
|
+
import { defineCommand as defineCommand174 } from "citty";
|
|
40036
39972
|
registerSchema({
|
|
40037
39973
|
command: "scheduled-actions.update",
|
|
40038
39974
|
description: "Stage an update to a published scheduled action or temp_sched_* draft-created scheduled action.",
|
|
@@ -40057,7 +39993,7 @@ registerSchema({
|
|
|
40057
39993
|
prompt: { type: "string", description: "Replacement additional spawned-agent instructions", required: false }
|
|
40058
39994
|
}
|
|
40059
39995
|
});
|
|
40060
|
-
var updateCommand2 =
|
|
39996
|
+
var updateCommand2 = defineCommand174({
|
|
40061
39997
|
meta: {
|
|
40062
39998
|
name: "update",
|
|
40063
39999
|
description: "Stage a scheduled action update. Example: baker scheduled-actions update <id> --enabled false"
|
|
@@ -40082,7 +40018,7 @@ var updateCommand2 = defineCommand176({
|
|
|
40082
40018
|
try {
|
|
40083
40019
|
const id = args.id || args["scheduled-action-id"];
|
|
40084
40020
|
if (!id) {
|
|
40085
|
-
|
|
40021
|
+
failValidation3("Scheduled action ID is required.");
|
|
40086
40022
|
}
|
|
40087
40023
|
validateScheduledActionRef(id);
|
|
40088
40024
|
const body = { id };
|
|
@@ -40114,7 +40050,7 @@ var updateCommand2 = defineCommand176({
|
|
|
40114
40050
|
hasPatch = true;
|
|
40115
40051
|
}
|
|
40116
40052
|
if (!hasPatch) {
|
|
40117
|
-
|
|
40053
|
+
failValidation3(
|
|
40118
40054
|
"Provide at least one of --name, --description, --cron, --run-at, --timezone, --enabled, --spawn-agent, --prompt."
|
|
40119
40055
|
);
|
|
40120
40056
|
}
|
|
@@ -40128,7 +40064,7 @@ var updateCommand2 = defineCommand176({
|
|
|
40128
40064
|
});
|
|
40129
40065
|
|
|
40130
40066
|
// src/commands/scheduled-actions/index.ts
|
|
40131
|
-
var scheduledActionsCommand =
|
|
40067
|
+
var scheduledActionsCommand = defineCommand175({
|
|
40132
40068
|
meta: {
|
|
40133
40069
|
name: "scheduled-actions",
|
|
40134
40070
|
description: `Manage Scheduled Actions. Subcommands: list, get, create, update, delete, trigger.
|
|
@@ -40145,7 +40081,7 @@ Examples:
|
|
|
40145
40081
|
Full guide: __tooling__/docs/tools/baker/scheduled-actions.md`
|
|
40146
40082
|
},
|
|
40147
40083
|
subCommands: {
|
|
40148
|
-
list:
|
|
40084
|
+
list: listCommand14,
|
|
40149
40085
|
get: getCommand3,
|
|
40150
40086
|
create: createCommand2,
|
|
40151
40087
|
update: updateCommand2,
|
|
@@ -40155,14 +40091,14 @@ Full guide: __tooling__/docs/tools/baker/scheduled-actions.md`
|
|
|
40155
40091
|
});
|
|
40156
40092
|
|
|
40157
40093
|
// src/commands/schema.ts
|
|
40158
|
-
import { defineCommand as
|
|
40094
|
+
import { defineCommand as defineCommand176 } from "citty";
|
|
40159
40095
|
function narrowToFamily(commandName, available) {
|
|
40160
40096
|
const segments = commandName.split(".");
|
|
40161
40097
|
const prefix = segments[0] === "ads" && segments[1] ? `ads.${segments[1]}.` : `${segments[0]}.`;
|
|
40162
40098
|
const siblings = available.filter((name) => name.startsWith(prefix));
|
|
40163
40099
|
return siblings.length > 0 ? siblings : available;
|
|
40164
40100
|
}
|
|
40165
|
-
var schemaCommand =
|
|
40101
|
+
var schemaCommand = defineCommand176({
|
|
40166
40102
|
meta: {
|
|
40167
40103
|
name: "schema",
|
|
40168
40104
|
description: "Inspect command argument schemas (for AI agent introspection). Lists all commands if no argument given. Example: baker schema images.search"
|
|
@@ -40206,10 +40142,10 @@ var schemaCommand = defineCommand178({
|
|
|
40206
40142
|
});
|
|
40207
40143
|
|
|
40208
40144
|
// src/commands/studio/index.ts
|
|
40209
|
-
import { defineCommand as
|
|
40145
|
+
import { defineCommand as defineCommand185 } from "citty";
|
|
40210
40146
|
|
|
40211
40147
|
// src/commands/studio/animate.ts
|
|
40212
|
-
import { defineCommand as
|
|
40148
|
+
import { defineCommand as defineCommand177 } from "citty";
|
|
40213
40149
|
|
|
40214
40150
|
// src/commands/studio/batch.ts
|
|
40215
40151
|
function projectBatch(generation, full) {
|
|
@@ -40654,7 +40590,7 @@ function costHintsFor(body) {
|
|
|
40654
40590
|
}
|
|
40655
40591
|
return hints;
|
|
40656
40592
|
}
|
|
40657
|
-
var animateCommand =
|
|
40593
|
+
var animateCommand = defineCommand177({
|
|
40658
40594
|
meta: {
|
|
40659
40595
|
name: "animate",
|
|
40660
40596
|
description: "Render a clip. With an image the look is already fixed, so the prompt describes MOVEMENT \u2014 what the camera does, what the subject does, in what order. With --from text there is no image and the prompt is the whole shot.\n\nA rendered clip is NOT usable anywhere until you keep it: `baker studio keep <id> --slot N` is what puts it in the video library. Takes nobody keeps are never ingested, which is what makes a rejected batch cheap.\n\nFor anything longer than 15 seconds, or to build on footage that already exists, use --model bytedance/seedance-2.5: it renders 4-30s and is the only model that reads an existing clip or an existing soundtrack.\n\nExamples:\n baker studio animate 'slow push in, model turns to camera and smiles' --image j57abc123def456ghi789\n baker studio animate 'handheld drift right, steam rising from the cup' --image './out/hero.png' --duration 6 --quality 1080p\n baker studio animate 'product rotates once on a turntable' --image j57abc\u2026,j57def\u2026 --from references\n baker studio animate 'she keeps walking, camera stays with her, then she stops and looks up' --image j57abc\u2026 --from references --from-clip j57batch\u2026:0 --model bytedance/seedance-2.5 --duration 20\n baker studio animate 'hold on the product, then a slow push-in' --from references --from-video j57vid\u2026 --model bytedance/seedance-2.5\n baker studio animate 'slow drone pull-back over a solar farm at golden hour, no people' --from text --model bytedance/seedance-2.5 --duration 12"
|
|
@@ -40773,7 +40709,7 @@ var animateCommand = defineCommand179({
|
|
|
40773
40709
|
});
|
|
40774
40710
|
|
|
40775
40711
|
// src/commands/studio/generate.ts
|
|
40776
|
-
import { defineCommand as
|
|
40712
|
+
import { defineCommand as defineCommand178 } from "citty";
|
|
40777
40713
|
var MODEL_LIST2 = IMAGE_MODEL_IDS;
|
|
40778
40714
|
var DEFAULT_MAX_WAIT_MS2 = 24e4;
|
|
40779
40715
|
registerSchema({
|
|
@@ -40903,7 +40839,7 @@ function buildGenerateBody(args, prompt) {
|
|
|
40903
40839
|
}
|
|
40904
40840
|
return body;
|
|
40905
40841
|
}
|
|
40906
|
-
var generateCommand =
|
|
40842
|
+
var generateCommand = defineCommand178({
|
|
40907
40843
|
meta: {
|
|
40908
40844
|
name: "generate",
|
|
40909
40845
|
description: "Start here to make an image. Renders 1-8 takes of one brief, ingests each into the media library as it lands, and shows the batch in the dashboard Studio next to the ones the client ran.\n\nModel choice: google/gemini-3.1-flash-image-preview (default \u2014 fast, best at editing a reference and at extreme ratios), google/gemini-3-pro-image-preview (highest fidelity, slower), openai/gpt-image-2 (photoreal and the cleanest in-image text \u2014 no --image-size, no 4:5 / 5:4), recraft/recraft-v4.1-pro-vector (vector/flat marks with palette control).\n\n--reference is the biggest quality lever there is: a real logo, product shot, Pinterest pin or sandbox screenshot beats any amount of adjectives.\n\nExamples:\n baker studio generate 'matte black bottle on wet marble, hard studio light, 35mm' --aspect-ratio 3:2 --count 3\n baker studio generate 'this bottle on a sunlit kitchen counter' --reference './src/brand/product.png,https://\u2026/kitchen.jpg'\n baker studio generate 'founder-style selfie, kitchen background, natural light' --skill ugc-selfie-hook\n baker studio generate 'flat geometric mascot, brand palette' --model recraft/recraft-v4.1-pro-vector --rgb-colors '[[10,10,10],[255,80,0]]'"
|
|
@@ -40981,7 +40917,7 @@ var generateCommand = defineCommand180({
|
|
|
40981
40917
|
});
|
|
40982
40918
|
|
|
40983
40919
|
// src/commands/studio/get.ts
|
|
40984
|
-
import { defineCommand as
|
|
40920
|
+
import { defineCommand as defineCommand179 } from "citty";
|
|
40985
40921
|
registerSchema({
|
|
40986
40922
|
command: "studio.get",
|
|
40987
40923
|
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.",
|
|
@@ -40990,7 +40926,7 @@ registerSchema({
|
|
|
40990
40926
|
full: { type: "boolean", description: "Include settings, references and attribution", required: false }
|
|
40991
40927
|
}
|
|
40992
40928
|
});
|
|
40993
|
-
var getCommand4 =
|
|
40929
|
+
var getCommand4 = defineCommand179({
|
|
40994
40930
|
meta: {
|
|
40995
40931
|
name: "get",
|
|
40996
40932
|
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"
|
|
@@ -41019,7 +40955,7 @@ var getCommand4 = defineCommand181({
|
|
|
41019
40955
|
});
|
|
41020
40956
|
|
|
41021
40957
|
// src/commands/studio/improve.ts
|
|
41022
|
-
import { defineCommand as
|
|
40958
|
+
import { defineCommand as defineCommand180 } from "citty";
|
|
41023
40959
|
var DESCRIPTION = "Sharpen a rough brief into directed art direction \u2014 the same rewrite the client gets from the wand in the Studio prompt bar. Reach for it when you are relaying the CLIENT's own words and want them shaped without substituting your voice; when you are writing the art direction yourself, just write it, because you will do a better job than this does.";
|
|
41024
40960
|
registerSchema({
|
|
41025
40961
|
command: "studio.improve",
|
|
@@ -41044,7 +40980,7 @@ registerSchema({
|
|
|
41044
40980
|
}
|
|
41045
40981
|
}
|
|
41046
40982
|
});
|
|
41047
|
-
var improveCommand =
|
|
40983
|
+
var improveCommand = defineCommand180({
|
|
41048
40984
|
meta: {
|
|
41049
40985
|
name: "improve",
|
|
41050
40986
|
description: `${DESCRIPTION}
|
|
@@ -41088,7 +41024,7 @@ Examples:
|
|
|
41088
41024
|
});
|
|
41089
41025
|
|
|
41090
41026
|
// src/commands/studio/keep.ts
|
|
41091
|
-
import { defineCommand as
|
|
41027
|
+
import { defineCommand as defineCommand181 } from "citty";
|
|
41092
41028
|
registerSchema({
|
|
41093
41029
|
command: "studio.keep",
|
|
41094
41030
|
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.",
|
|
@@ -41098,7 +41034,7 @@ registerSchema({
|
|
|
41098
41034
|
undo: { type: "boolean", description: "Un-star an image, or take a kept clip back out", required: false }
|
|
41099
41035
|
}
|
|
41100
41036
|
});
|
|
41101
|
-
var keepCommand =
|
|
41037
|
+
var keepCommand = defineCommand181({
|
|
41102
41038
|
meta: {
|
|
41103
41039
|
name: "keep",
|
|
41104
41040
|
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"
|
|
@@ -41149,7 +41085,7 @@ var keepCommand = defineCommand183({
|
|
|
41149
41085
|
});
|
|
41150
41086
|
|
|
41151
41087
|
// src/commands/studio/list.ts
|
|
41152
|
-
import { defineCommand as
|
|
41088
|
+
import { defineCommand as defineCommand182 } from "citty";
|
|
41153
41089
|
registerSchema({
|
|
41154
41090
|
command: "studio.list",
|
|
41155
41091
|
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.",
|
|
@@ -41160,7 +41096,7 @@ registerSchema({
|
|
|
41160
41096
|
full: { type: "boolean", description: "Include settings, references and attribution", required: false }
|
|
41161
41097
|
}
|
|
41162
41098
|
});
|
|
41163
|
-
var
|
|
41099
|
+
var listCommand15 = defineCommand182({
|
|
41164
41100
|
meta: {
|
|
41165
41101
|
name: "list",
|
|
41166
41102
|
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"
|
|
@@ -41194,7 +41130,7 @@ var listCommand16 = defineCommand184({
|
|
|
41194
41130
|
});
|
|
41195
41131
|
|
|
41196
41132
|
// src/commands/studio/models.ts
|
|
41197
|
-
import { defineCommand as
|
|
41133
|
+
import { defineCommand as defineCommand183 } from "citty";
|
|
41198
41134
|
var DESCRIPTION2 = "What each Studio model actually accepts: its shapes, resolutions, clip lengths, prompt character cap, how many reference images it takes, and which knobs it has. Read this before a batch you care about \u2014 the models disagree far more than they look like they do, and a setting the chosen model does not have is REFUSED, not ignored.";
|
|
41199
41135
|
registerSchema({
|
|
41200
41136
|
command: "studio.models",
|
|
@@ -41281,7 +41217,7 @@ function buildModelCards(kind, model) {
|
|
|
41281
41217
|
const selected = model ? ids.filter((id) => id === model) : ids;
|
|
41282
41218
|
return selected.map((id) => build(id));
|
|
41283
41219
|
}
|
|
41284
|
-
var modelsCommand =
|
|
41220
|
+
var modelsCommand = defineCommand183({
|
|
41285
41221
|
meta: {
|
|
41286
41222
|
name: "models",
|
|
41287
41223
|
description: `${DESCRIPTION2}
|
|
@@ -41328,13 +41264,13 @@ Examples:
|
|
|
41328
41264
|
});
|
|
41329
41265
|
|
|
41330
41266
|
// src/commands/studio/skills.ts
|
|
41331
|
-
import { defineCommand as
|
|
41267
|
+
import { defineCommand as defineCommand184 } from "citty";
|
|
41332
41268
|
registerSchema({
|
|
41333
41269
|
command: "studio.skills",
|
|
41334
41270
|
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.",
|
|
41335
41271
|
args: {}
|
|
41336
41272
|
});
|
|
41337
|
-
var skillsCommand =
|
|
41273
|
+
var skillsCommand = defineCommand184({
|
|
41338
41274
|
meta: {
|
|
41339
41275
|
name: "skills",
|
|
41340
41276
|
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"
|
|
@@ -41358,7 +41294,7 @@ var skillsCommand = defineCommand186({
|
|
|
41358
41294
|
});
|
|
41359
41295
|
|
|
41360
41296
|
// src/commands/studio/index.ts
|
|
41361
|
-
var studioCommand =
|
|
41297
|
+
var studioCommand = defineCommand185({
|
|
41362
41298
|
meta: {
|
|
41363
41299
|
name: "studio",
|
|
41364
41300
|
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.
|
|
@@ -41392,7 +41328,7 @@ Full guide: __tooling__/docs/tools/baker/studio.md`
|
|
|
41392
41328
|
generate: generateCommand,
|
|
41393
41329
|
animate: animateCommand,
|
|
41394
41330
|
get: getCommand4,
|
|
41395
|
-
list:
|
|
41331
|
+
list: listCommand15,
|
|
41396
41332
|
keep: keepCommand,
|
|
41397
41333
|
models: modelsCommand,
|
|
41398
41334
|
skills: skillsCommand,
|
|
@@ -41401,14 +41337,14 @@ Full guide: __tooling__/docs/tools/baker/studio.md`
|
|
|
41401
41337
|
});
|
|
41402
41338
|
|
|
41403
41339
|
// src/commands/tag-manager/index.ts
|
|
41404
|
-
import { defineCommand as
|
|
41340
|
+
import { defineCommand as defineCommand189 } from "citty";
|
|
41405
41341
|
|
|
41406
41342
|
// src/commands/tag-manager/draft.ts
|
|
41407
|
-
import { defineCommand as
|
|
41343
|
+
import { defineCommand as defineCommand186 } from "citty";
|
|
41408
41344
|
|
|
41409
41345
|
// src/commands/tag-manager/shared.ts
|
|
41410
41346
|
import { readFileSync as readFileSync13 } from "fs";
|
|
41411
|
-
function
|
|
41347
|
+
function failValidation4(message) {
|
|
41412
41348
|
writeJsonEnvelope({ ok: false, error: { code: "VALIDATION_ERROR", message } });
|
|
41413
41349
|
process.exit(1);
|
|
41414
41350
|
}
|
|
@@ -41416,7 +41352,7 @@ function requireTarget5(args, entity) {
|
|
|
41416
41352
|
const positional = Array.isArray(args._) ? args._[0] : void 0;
|
|
41417
41353
|
const target = args.id ?? args.target ?? positional;
|
|
41418
41354
|
if (typeof target !== "string" || target.length === 0) {
|
|
41419
|
-
|
|
41355
|
+
failValidation4(`pass the ${entity} id or path as the positional argument`);
|
|
41420
41356
|
}
|
|
41421
41357
|
return target;
|
|
41422
41358
|
}
|
|
@@ -41425,16 +41361,16 @@ function loadJsonArg2(args, flag = "json") {
|
|
|
41425
41361
|
const file = args.file;
|
|
41426
41362
|
const raw = typeof file === "string" && file.length > 0 ? readFileSync13(file, "utf8") : typeof inline === "string" && inline.length > 0 ? inline : void 0;
|
|
41427
41363
|
if (raw === void 0) {
|
|
41428
|
-
|
|
41364
|
+
failValidation4(`pass --${flag} with inline JSON or --file with a path to a JSON file`);
|
|
41429
41365
|
}
|
|
41430
41366
|
try {
|
|
41431
41367
|
const parsed = JSON.parse(raw);
|
|
41432
41368
|
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
41433
|
-
|
|
41369
|
+
failValidation4(`--${flag} must be a JSON object`);
|
|
41434
41370
|
}
|
|
41435
41371
|
return parsed;
|
|
41436
41372
|
} catch {
|
|
41437
|
-
return
|
|
41373
|
+
return failValidation4(`--${flag} is not valid JSON`);
|
|
41438
41374
|
}
|
|
41439
41375
|
}
|
|
41440
41376
|
var RETRYABLE_CODES2 = /* @__PURE__ */ new Set(["RATE_LIMITED", "INTERNAL_ERROR", "NETWORK_ERROR", "TIMEOUT"]);
|
|
@@ -41527,13 +41463,13 @@ registerSchema({
|
|
|
41527
41463
|
chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
|
|
41528
41464
|
}
|
|
41529
41465
|
});
|
|
41530
|
-
var draftCommand4 =
|
|
41466
|
+
var draftCommand4 = defineCommand186({
|
|
41531
41467
|
meta: {
|
|
41532
41468
|
name: "draft",
|
|
41533
41469
|
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."
|
|
41534
41470
|
},
|
|
41535
41471
|
subCommands: {
|
|
41536
|
-
list:
|
|
41472
|
+
list: defineCommand186({
|
|
41537
41473
|
meta: {
|
|
41538
41474
|
name: "list",
|
|
41539
41475
|
description: "Review everything staged on this chat (--json for the raw envelope)"
|
|
@@ -41546,7 +41482,7 @@ var draftCommand4 = defineCommand188({
|
|
|
41546
41482
|
await draftList2(args.json === true, args.chat);
|
|
41547
41483
|
}
|
|
41548
41484
|
}),
|
|
41549
|
-
show:
|
|
41485
|
+
show: defineCommand186({
|
|
41550
41486
|
meta: {
|
|
41551
41487
|
name: "show",
|
|
41552
41488
|
description: "Print the full staged payload for one change \u2014 the receipt to verify it looks right before publish (never truncated)."
|
|
@@ -41563,7 +41499,7 @@ var draftCommand4 = defineCommand188({
|
|
|
41563
41499
|
);
|
|
41564
41500
|
}
|
|
41565
41501
|
}),
|
|
41566
|
-
amend:
|
|
41502
|
+
amend: defineCommand186({
|
|
41567
41503
|
meta: {
|
|
41568
41504
|
name: "amend",
|
|
41569
41505
|
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."
|
|
@@ -41580,7 +41516,7 @@ var draftCommand4 = defineCommand188({
|
|
|
41580
41516
|
});
|
|
41581
41517
|
}
|
|
41582
41518
|
}),
|
|
41583
|
-
remove:
|
|
41519
|
+
remove: defineCommand186({
|
|
41584
41520
|
meta: { name: "remove", description: "Remove one staged change (cascades to anything depending on it)" },
|
|
41585
41521
|
args: { ref: { type: "positional", description: "Staged ref (gtm_temp_*) or target", required: false } },
|
|
41586
41522
|
run: async ({ args }) => {
|
|
@@ -41589,7 +41525,7 @@ var draftCommand4 = defineCommand188({
|
|
|
41589
41525
|
});
|
|
41590
41526
|
}
|
|
41591
41527
|
}),
|
|
41592
|
-
clear:
|
|
41528
|
+
clear: defineCommand186({
|
|
41593
41529
|
meta: { name: "clear", description: "Discard all Tag Manager changes staged on this chat" },
|
|
41594
41530
|
run: async () => {
|
|
41595
41531
|
await draftAction3("/api/tag-manager/draft/clear", {});
|
|
@@ -41599,7 +41535,7 @@ var draftCommand4 = defineCommand188({
|
|
|
41599
41535
|
});
|
|
41600
41536
|
|
|
41601
41537
|
// src/commands/tag-manager/read.ts
|
|
41602
|
-
import { defineCommand as
|
|
41538
|
+
import { defineCommand as defineCommand187 } from "citty";
|
|
41603
41539
|
registerSchema({
|
|
41604
41540
|
command: "tagManager.containers",
|
|
41605
41541
|
description: "List the Google Tag Manager containers this company's connection can reach. Every container the company connected is flagged `connected: true` \u2014 there can be several, and Baker may read and change all of them. Start here to confirm which containers you are managing.",
|
|
@@ -41640,7 +41576,7 @@ function containersHints(containers) {
|
|
|
41640
41576
|
}))
|
|
41641
41577
|
});
|
|
41642
41578
|
}
|
|
41643
|
-
var containersCommand =
|
|
41579
|
+
var containersCommand = defineCommand187({
|
|
41644
41580
|
meta: {
|
|
41645
41581
|
name: "containers",
|
|
41646
41582
|
description: `List Tag Manager containers reachable by this company's connection.
|
|
@@ -41657,7 +41593,7 @@ Start here:
|
|
|
41657
41593
|
}
|
|
41658
41594
|
}
|
|
41659
41595
|
});
|
|
41660
|
-
var readCommand =
|
|
41596
|
+
var readCommand = defineCommand187({
|
|
41661
41597
|
meta: {
|
|
41662
41598
|
name: "read",
|
|
41663
41599
|
description: `Read the current contents of the Tag Manager container \u2014 always do this before staging changes.
|
|
@@ -41699,7 +41635,7 @@ Examples:
|
|
|
41699
41635
|
});
|
|
41700
41636
|
|
|
41701
41637
|
// src/commands/tag-manager/write-commands.ts
|
|
41702
|
-
import { defineCommand as
|
|
41638
|
+
import { defineCommand as defineCommand188 } from "citty";
|
|
41703
41639
|
var CONTAINER_ARG_DESCRIPTION = "Numeric container id (optional only when one container is connected \u2014 run `baker tag-manager containers`)";
|
|
41704
41640
|
var ENTITIES = [
|
|
41705
41641
|
{
|
|
@@ -41755,10 +41691,10 @@ for (const { entity, noun, createHint } of ENTITIES) {
|
|
|
41755
41691
|
});
|
|
41756
41692
|
}
|
|
41757
41693
|
function entityCommand(entity, noun, example) {
|
|
41758
|
-
return
|
|
41694
|
+
return defineCommand188({
|
|
41759
41695
|
meta: { name: entity, description: `Stage ${noun} changes on this chat's Tag Manager draft` },
|
|
41760
41696
|
subCommands: {
|
|
41761
|
-
create:
|
|
41697
|
+
create: defineCommand188({
|
|
41762
41698
|
meta: {
|
|
41763
41699
|
name: "create",
|
|
41764
41700
|
description: `Stage a new ${noun}
|
|
@@ -41780,7 +41716,7 @@ Examples:
|
|
|
41780
41716
|
});
|
|
41781
41717
|
}
|
|
41782
41718
|
}),
|
|
41783
|
-
update:
|
|
41719
|
+
update: defineCommand188({
|
|
41784
41720
|
meta: {
|
|
41785
41721
|
name: "update",
|
|
41786
41722
|
description: `Stage an update to an existing ${noun} (pass its id or path)`
|
|
@@ -41800,7 +41736,7 @@ Examples:
|
|
|
41800
41736
|
});
|
|
41801
41737
|
}
|
|
41802
41738
|
}),
|
|
41803
|
-
delete:
|
|
41739
|
+
delete: defineCommand188({
|
|
41804
41740
|
meta: { name: "delete", description: `Stage the deletion of a ${noun} (pass its id or path)` },
|
|
41805
41741
|
args: {
|
|
41806
41742
|
id: { type: "positional", description: `${noun} id or path`, required: false },
|
|
@@ -41841,7 +41777,7 @@ function builtinTypes(args) {
|
|
|
41841
41777
|
}
|
|
41842
41778
|
return raw.split(",").map((entry) => entry.trim());
|
|
41843
41779
|
}
|
|
41844
|
-
var builtinCommand =
|
|
41780
|
+
var builtinCommand = defineCommand188({
|
|
41845
41781
|
meta: {
|
|
41846
41782
|
name: "builtin",
|
|
41847
41783
|
description: `Enable or disable built-in variables
|
|
@@ -41851,7 +41787,7 @@ Examples:
|
|
|
41851
41787
|
baker tag-manager builtin disable --types formId`
|
|
41852
41788
|
},
|
|
41853
41789
|
subCommands: {
|
|
41854
|
-
enable:
|
|
41790
|
+
enable: defineCommand188({
|
|
41855
41791
|
meta: { name: "enable", description: "Stage enabling built-in variables" },
|
|
41856
41792
|
args: {
|
|
41857
41793
|
types: { type: "string", description: "Comma-separated types", required: false },
|
|
@@ -41865,7 +41801,7 @@ Examples:
|
|
|
41865
41801
|
});
|
|
41866
41802
|
}
|
|
41867
41803
|
}),
|
|
41868
|
-
disable:
|
|
41804
|
+
disable: defineCommand188({
|
|
41869
41805
|
meta: { name: "disable", description: "Stage disabling built-in variables" },
|
|
41870
41806
|
args: {
|
|
41871
41807
|
types: { type: "string", description: "Comma-separated types", required: false },
|
|
@@ -41883,7 +41819,7 @@ Examples:
|
|
|
41883
41819
|
});
|
|
41884
41820
|
|
|
41885
41821
|
// src/commands/tag-manager/index.ts
|
|
41886
|
-
var tagManagerCommand =
|
|
41822
|
+
var tagManagerCommand = defineCommand189({
|
|
41887
41823
|
meta: {
|
|
41888
41824
|
name: "tag-manager",
|
|
41889
41825
|
description: `Read and change what lives inside the client's Google Tag Manager container \u2014 tags, triggers, variables, folders and built-in variables.
|
|
@@ -41920,7 +41856,7 @@ Full guide: __tooling__/docs/tools/baker/tag-manager.md`
|
|
|
41920
41856
|
});
|
|
41921
41857
|
|
|
41922
41858
|
// src/commands/tags/index.ts
|
|
41923
|
-
import { defineCommand as
|
|
41859
|
+
import { defineCommand as defineCommand190 } from "citty";
|
|
41924
41860
|
|
|
41925
41861
|
// src/commands/tags/shared.ts
|
|
41926
41862
|
function failApi4(err) {
|
|
@@ -41989,7 +41925,7 @@ async function listTags(json) {
|
|
|
41989
41925
|
var listArgs9 = {
|
|
41990
41926
|
json: { type: "boolean", description: "Print the raw JSON envelope instead of the readable list" }
|
|
41991
41927
|
};
|
|
41992
|
-
var
|
|
41928
|
+
var listCommand16 = defineCommand190({
|
|
41993
41929
|
meta: {
|
|
41994
41930
|
name: "list",
|
|
41995
41931
|
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"
|
|
@@ -42008,7 +41944,7 @@ async function listDraft3(chat) {
|
|
|
42008
41944
|
failApi4(err);
|
|
42009
41945
|
}
|
|
42010
41946
|
}
|
|
42011
|
-
var draftCommand5 =
|
|
41947
|
+
var draftCommand5 = defineCommand190({
|
|
42012
41948
|
meta: {
|
|
42013
41949
|
name: "draft",
|
|
42014
41950
|
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."
|
|
@@ -42018,7 +41954,7 @@ var draftCommand5 = defineCommand192({
|
|
|
42018
41954
|
await listDraft3(args.chat);
|
|
42019
41955
|
}
|
|
42020
41956
|
});
|
|
42021
|
-
var tagsCommand3 =
|
|
41957
|
+
var tagsCommand3 = defineCommand190({
|
|
42022
41958
|
meta: {
|
|
42023
41959
|
name: "tags",
|
|
42024
41960
|
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.
|
|
@@ -42035,7 +41971,7 @@ Examples:
|
|
|
42035
41971
|
Full guide: __tooling__/docs/tools/baker/tags.md`
|
|
42036
41972
|
},
|
|
42037
41973
|
subCommands: {
|
|
42038
|
-
list:
|
|
41974
|
+
list: listCommand16,
|
|
42039
41975
|
draft: draftCommand5
|
|
42040
41976
|
},
|
|
42041
41977
|
// Bare `baker tags` lists the effective tags. `args` stays so citty knows this
|
|
@@ -42047,10 +41983,10 @@ Full guide: __tooling__/docs/tools/baker/tags.md`
|
|
|
42047
41983
|
});
|
|
42048
41984
|
|
|
42049
41985
|
// src/commands/testimonials/index.ts
|
|
42050
|
-
import { defineCommand as
|
|
41986
|
+
import { defineCommand as defineCommand194 } from "citty";
|
|
42051
41987
|
|
|
42052
41988
|
// src/commands/testimonials/get.ts
|
|
42053
|
-
import { defineCommand as
|
|
41989
|
+
import { defineCommand as defineCommand191 } from "citty";
|
|
42054
41990
|
registerSchema({
|
|
42055
41991
|
command: "testimonials.get",
|
|
42056
41992
|
description: "Get a single testimonial by ID",
|
|
@@ -42058,7 +41994,7 @@ registerSchema({
|
|
|
42058
41994
|
id: { type: "string", description: "Testimonial ID", required: true }
|
|
42059
41995
|
}
|
|
42060
41996
|
});
|
|
42061
|
-
var getCommand5 =
|
|
41997
|
+
var getCommand5 = defineCommand191({
|
|
42062
41998
|
meta: { name: "get", description: "Get a single testimonial by ID. Example: baker testimonials get j571abc123" },
|
|
42063
41999
|
args: {
|
|
42064
42000
|
id: { type: "positional", description: "Testimonial ID", required: false },
|
|
@@ -42095,7 +42031,7 @@ var getCommand5 = defineCommand193({
|
|
|
42095
42031
|
});
|
|
42096
42032
|
|
|
42097
42033
|
// src/commands/testimonials/list.ts
|
|
42098
|
-
import { defineCommand as
|
|
42034
|
+
import { defineCommand as defineCommand192 } from "citty";
|
|
42099
42035
|
|
|
42100
42036
|
// src/commands/testimonials/emptyCorpusHints.ts
|
|
42101
42037
|
var NO_CORPUS_TAIL = 'this company has NO review corpus connected. Testimonials are ingested from the client\'s Google/Trustpilot reviews \u2014 an agent cannot write one \u2014 so no rewording will find quotes. Stop searching and source proof another way: a result or case study the client already published, a named-customer logo (`baker images logo`), or a founder claim attributed as a claim. Otherwise ship without a testimonial block and file the gap: `baker actions create --name "Collect customer quotes for <page>" --priority medium --tags <slug>`. Never invent, paraphrase-into-existence, or pad with unrelated praise.';
|
|
@@ -42171,7 +42107,7 @@ function buildListParams(args) {
|
|
|
42171
42107
|
}
|
|
42172
42108
|
return params;
|
|
42173
42109
|
}
|
|
42174
|
-
var
|
|
42110
|
+
var listCommand17 = defineCommand192({
|
|
42175
42111
|
meta: {
|
|
42176
42112
|
name: "list",
|
|
42177
42113
|
description: "List testimonials with optional filters. Example: baker testimonials list --source google --sentiment positive"
|
|
@@ -42223,7 +42159,7 @@ var listCommand18 = defineCommand194({
|
|
|
42223
42159
|
});
|
|
42224
42160
|
|
|
42225
42161
|
// src/commands/testimonials/search.ts
|
|
42226
|
-
import { defineCommand as
|
|
42162
|
+
import { defineCommand as defineCommand193 } from "citty";
|
|
42227
42163
|
var FILTER_FLAGS2 = ["source", "rating-min", "rating-max", "status", "sentiment", "language", "tags"];
|
|
42228
42164
|
function languageBiasHint(results, requestedLanguage) {
|
|
42229
42165
|
if (requestedLanguage) {
|
|
@@ -42302,7 +42238,7 @@ function buildSearchRequest(query, args) {
|
|
|
42302
42238
|
}
|
|
42303
42239
|
return body;
|
|
42304
42240
|
}
|
|
42305
|
-
var searchCommand3 =
|
|
42241
|
+
var searchCommand3 = defineCommand193({
|
|
42306
42242
|
meta: {
|
|
42307
42243
|
name: "search",
|
|
42308
42244
|
description: "Semantic search testimonials by text query. Uses hybrid BM25 + vector + reranking. Example: baker testimonials search 'great service' --rating-min 4"
|
|
@@ -42368,7 +42304,7 @@ var searchCommand3 = defineCommand195({
|
|
|
42368
42304
|
var tagsCommand4 = makeTagsCommand("testimonials", "testimonial", "/api/testimonials/tags");
|
|
42369
42305
|
|
|
42370
42306
|
// src/commands/testimonials/index.ts
|
|
42371
|
-
var testimonialsCommand =
|
|
42307
|
+
var testimonialsCommand = defineCommand194({
|
|
42372
42308
|
meta: {
|
|
42373
42309
|
name: "testimonials",
|
|
42374
42310
|
description: `Find and browse testimonials in Baker. Subcommands: search, get, list, tags.
|
|
@@ -42384,16 +42320,16 @@ Full guide: __tooling__/docs/tools/baker/testimonials.md`
|
|
|
42384
42320
|
subCommands: {
|
|
42385
42321
|
get: getCommand5,
|
|
42386
42322
|
search: searchCommand3,
|
|
42387
|
-
list:
|
|
42323
|
+
list: listCommand17,
|
|
42388
42324
|
tags: tagsCommand4
|
|
42389
42325
|
}
|
|
42390
42326
|
});
|
|
42391
42327
|
|
|
42392
42328
|
// src/commands/videos/index.ts
|
|
42393
|
-
import { defineCommand as
|
|
42329
|
+
import { defineCommand as defineCommand200 } from "citty";
|
|
42394
42330
|
|
|
42395
42331
|
// src/commands/videos/delete.ts
|
|
42396
|
-
import { defineCommand as
|
|
42332
|
+
import { defineCommand as defineCommand195 } from "citty";
|
|
42397
42333
|
registerSchema({
|
|
42398
42334
|
command: "videos.delete",
|
|
42399
42335
|
description: "Delete a video by ID",
|
|
@@ -42407,7 +42343,7 @@ registerSchema({
|
|
|
42407
42343
|
}
|
|
42408
42344
|
}
|
|
42409
42345
|
});
|
|
42410
|
-
var deleteCommand3 =
|
|
42346
|
+
var deleteCommand3 = defineCommand195({
|
|
42411
42347
|
meta: {
|
|
42412
42348
|
name: "delete",
|
|
42413
42349
|
description: "Delete a video by ID. Use --dry-run to preview. Example: baker videos delete j571abc123 --dry-run"
|
|
@@ -42448,7 +42384,7 @@ var deleteCommand3 = defineCommand197({
|
|
|
42448
42384
|
});
|
|
42449
42385
|
|
|
42450
42386
|
// src/commands/videos/get.ts
|
|
42451
|
-
import { defineCommand as
|
|
42387
|
+
import { defineCommand as defineCommand196 } from "citty";
|
|
42452
42388
|
registerSchema({
|
|
42453
42389
|
command: "videos.get",
|
|
42454
42390
|
description: "Get a single video by ID",
|
|
@@ -42456,7 +42392,7 @@ registerSchema({
|
|
|
42456
42392
|
id: { type: "string", description: "Video ID", required: true }
|
|
42457
42393
|
}
|
|
42458
42394
|
});
|
|
42459
|
-
var getCommand6 =
|
|
42395
|
+
var getCommand6 = defineCommand196({
|
|
42460
42396
|
meta: { name: "get", description: "Get a single video by ID. Example: baker videos get j571abc123" },
|
|
42461
42397
|
args: {
|
|
42462
42398
|
id: { type: "positional", description: "Video ID", required: false },
|
|
@@ -42493,7 +42429,7 @@ var getCommand6 = defineCommand198({
|
|
|
42493
42429
|
});
|
|
42494
42430
|
|
|
42495
42431
|
// src/commands/videos/group.ts
|
|
42496
|
-
import { defineCommand as
|
|
42432
|
+
import { defineCommand as defineCommand197 } from "citty";
|
|
42497
42433
|
registerSchema({
|
|
42498
42434
|
command: "videos.group",
|
|
42499
42435
|
description: "List every clip and image that arrived in the same set as this video (carousel slides, one page)",
|
|
@@ -42502,7 +42438,7 @@ registerSchema({
|
|
|
42502
42438
|
"group-key": { type: "string", description: "The set key directly, when you already have it", required: false }
|
|
42503
42439
|
}
|
|
42504
42440
|
});
|
|
42505
|
-
var groupCommand2 =
|
|
42441
|
+
var groupCommand2 = defineCommand197({
|
|
42506
42442
|
meta: {
|
|
42507
42443
|
name: "group",
|
|
42508
42444
|
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>"
|
|
@@ -42522,7 +42458,7 @@ var groupCommand2 = defineCommand199({
|
|
|
42522
42458
|
});
|
|
42523
42459
|
|
|
42524
42460
|
// src/commands/videos/search.ts
|
|
42525
|
-
import { defineCommand as
|
|
42461
|
+
import { defineCommand as defineCommand198 } from "citty";
|
|
42526
42462
|
registerSchema({
|
|
42527
42463
|
command: "videos.search",
|
|
42528
42464
|
description: "Search videos by text query. Only returns ready videos.",
|
|
@@ -42532,7 +42468,7 @@ registerSchema({
|
|
|
42532
42468
|
tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
|
|
42533
42469
|
}
|
|
42534
42470
|
});
|
|
42535
|
-
var searchCommand4 =
|
|
42471
|
+
var searchCommand4 = defineCommand198({
|
|
42536
42472
|
meta: {
|
|
42537
42473
|
name: "search",
|
|
42538
42474
|
description: "Semantic search videos by text query. Uses hybrid BM25 + vector + reranking. Example: baker videos search 'product demo' --tags tutorial"
|
|
@@ -42584,7 +42520,7 @@ var tagsCommand5 = makeTagsCommand("videos", "video", "/api/videos/tags");
|
|
|
42584
42520
|
// src/commands/videos/upload.ts
|
|
42585
42521
|
import { readFile as readFile24, stat as stat7 } from "fs/promises";
|
|
42586
42522
|
import { basename as basename3, extname as extname4 } from "path";
|
|
42587
|
-
import { defineCommand as
|
|
42523
|
+
import { defineCommand as defineCommand199 } from "citty";
|
|
42588
42524
|
var MIME_MAP = {
|
|
42589
42525
|
".mp4": "video/mp4",
|
|
42590
42526
|
".mov": "video/quicktime",
|
|
@@ -42623,7 +42559,7 @@ function detectContentType(filePath) {
|
|
|
42623
42559
|
}
|
|
42624
42560
|
return mime;
|
|
42625
42561
|
}
|
|
42626
|
-
var uploadCommand2 =
|
|
42562
|
+
var uploadCommand2 = defineCommand199({
|
|
42627
42563
|
meta: {
|
|
42628
42564
|
name: "upload",
|
|
42629
42565
|
description: "Upload a video file to Baker via Mux direct upload. Auto-detects content type. Example: baker videos upload ./demo.mp4"
|
|
@@ -42693,7 +42629,7 @@ var uploadCommand2 = defineCommand201({
|
|
|
42693
42629
|
});
|
|
42694
42630
|
|
|
42695
42631
|
// src/commands/videos/index.ts
|
|
42696
|
-
var videosCommand =
|
|
42632
|
+
var videosCommand = defineCommand200({
|
|
42697
42633
|
meta: {
|
|
42698
42634
|
name: "videos",
|
|
42699
42635
|
description: `Find and manage videos in Baker. Subcommands: search, get, upload, delete, tags.
|
|
@@ -42718,10 +42654,10 @@ Full guide: __tooling__/docs/tools/baker/videos.md`
|
|
|
42718
42654
|
});
|
|
42719
42655
|
|
|
42720
42656
|
// src/commands/winning-ads/index.ts
|
|
42721
|
-
import { defineCommand as
|
|
42657
|
+
import { defineCommand as defineCommand213 } from "citty";
|
|
42722
42658
|
|
|
42723
42659
|
// src/commands/winning-ads/advertisers.ts
|
|
42724
|
-
import { defineCommand as
|
|
42660
|
+
import { defineCommand as defineCommand201 } from "citty";
|
|
42725
42661
|
|
|
42726
42662
|
// src/commands/winning-ads/shared.ts
|
|
42727
42663
|
function splitList2(value) {
|
|
@@ -42774,7 +42710,7 @@ function advertiserNormalizer(record, full) {
|
|
|
42774
42710
|
last_synced_at: record.last_synced_at ?? null
|
|
42775
42711
|
};
|
|
42776
42712
|
}
|
|
42777
|
-
var advertisersCommand2 =
|
|
42713
|
+
var advertisersCommand2 = defineCommand201({
|
|
42778
42714
|
meta: {
|
|
42779
42715
|
name: "advertisers",
|
|
42780
42716
|
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'
|
|
@@ -42832,7 +42768,7 @@ var advertisersCommand2 = defineCommand203({
|
|
|
42832
42768
|
});
|
|
42833
42769
|
|
|
42834
42770
|
// src/commands/winning-ads/brief.ts
|
|
42835
|
-
import { defineCommand as
|
|
42771
|
+
import { defineCommand as defineCommand202 } from "citty";
|
|
42836
42772
|
registerSchema({
|
|
42837
42773
|
command: "winning-ads.brief",
|
|
42838
42774
|
description: "Generate a creative brief grounded in strategically-similar winning ads. Optionally describe the target creative with --dna (JSON) and steer with --notes.",
|
|
@@ -42878,7 +42814,7 @@ function parseDna(raw) {
|
|
|
42878
42814
|
}
|
|
42879
42815
|
return parsed;
|
|
42880
42816
|
}
|
|
42881
|
-
var briefCommand =
|
|
42817
|
+
var briefCommand = defineCommand202({
|
|
42882
42818
|
meta: {
|
|
42883
42819
|
name: "brief",
|
|
42884
42820
|
description: `Generate a creative brief from winning references. Example: baker winning-ads brief --dna '{"angle":"cost savings"}' --notes "B2B, LinkedIn video" --k 8`
|
|
@@ -42914,7 +42850,7 @@ var briefCommand = defineCommand204({
|
|
|
42914
42850
|
});
|
|
42915
42851
|
|
|
42916
42852
|
// src/commands/winning-ads/content.ts
|
|
42917
|
-
import { defineCommand as
|
|
42853
|
+
import { defineCommand as defineCommand203 } from "citty";
|
|
42918
42854
|
registerSchema({
|
|
42919
42855
|
command: "winning-ads.content",
|
|
42920
42856
|
description: "Read what's INSIDE one winning ad: the spoken transcript, the on-screen text, and the ad copy. Use this after `search`/`winners`/`feed` return a shortlist \u2014 pass an ad_id to understand a reference before reproducing it. Add --full for speech, pacing, and soundtrack detail. Video ads carry the transcript/on-screen text; static ads carry only the copy.",
|
|
@@ -42927,7 +42863,7 @@ registerSchema({
|
|
|
42927
42863
|
}
|
|
42928
42864
|
}
|
|
42929
42865
|
});
|
|
42930
|
-
var contentCommand =
|
|
42866
|
+
var contentCommand = defineCommand203({
|
|
42931
42867
|
meta: {
|
|
42932
42868
|
name: "content",
|
|
42933
42869
|
description: "Read the transcript + on-screen text + copy of one winning ad. Example: baker winning-ads content adg_123 --platform meta --full --output md"
|
|
@@ -42976,7 +42912,7 @@ var contentCommand = defineCommand205({
|
|
|
42976
42912
|
});
|
|
42977
42913
|
|
|
42978
42914
|
// src/commands/winning-ads/feed.ts
|
|
42979
|
-
import { defineCommand as
|
|
42915
|
+
import { defineCommand as defineCommand204 } from "citty";
|
|
42980
42916
|
function buildFeedParams(input) {
|
|
42981
42917
|
const params = {};
|
|
42982
42918
|
const advertiser = splitList2(input.advertiser);
|
|
@@ -43028,7 +42964,7 @@ registerSchema({
|
|
|
43028
42964
|
format: { type: "string", description: "Comma-separated formats to include (e.g. static,video)", required: false }
|
|
43029
42965
|
}
|
|
43030
42966
|
});
|
|
43031
|
-
var feedCommand =
|
|
42967
|
+
var feedCommand = defineCommand204({
|
|
43032
42968
|
meta: {
|
|
43033
42969
|
name: "feed",
|
|
43034
42970
|
description: "Winners across every brand you follow (browse, then trim per advertiser). Example: baker winning-ads feed --per-advertiser 5 --output md"
|
|
@@ -43113,7 +43049,7 @@ var feedCommand = defineCommand206({
|
|
|
43113
43049
|
});
|
|
43114
43050
|
|
|
43115
43051
|
// src/commands/winning-ads/follow.ts
|
|
43116
|
-
import { defineCommand as
|
|
43052
|
+
import { defineCommand as defineCommand205 } from "citty";
|
|
43117
43053
|
var PLATFORMS = ["meta", "linkedin"];
|
|
43118
43054
|
registerSchema({
|
|
43119
43055
|
command: "winning-ads.follow",
|
|
@@ -43128,7 +43064,7 @@ registerSchema({
|
|
|
43128
43064
|
label: { type: "string", description: "Optional display label (defaults to the resolved name)", required: false }
|
|
43129
43065
|
}
|
|
43130
43066
|
});
|
|
43131
|
-
var followCommand =
|
|
43067
|
+
var followCommand = defineCommand205({
|
|
43132
43068
|
meta: {
|
|
43133
43069
|
name: "follow",
|
|
43134
43070
|
description: 'Follow a brand to track ALL its ads \u2014 every platform and country. --platform is how we read your input, not a limit. A domain tracks both Meta + LinkedIn. Example: baker winning-ads follow "deel.com" --platform meta'
|
|
@@ -43175,7 +43111,7 @@ var followCommand = defineCommand207({
|
|
|
43175
43111
|
});
|
|
43176
43112
|
|
|
43177
43113
|
// src/commands/winning-ads/follow-competitors.ts
|
|
43178
|
-
import { defineCommand as
|
|
43114
|
+
import { defineCommand as defineCommand206 } from "citty";
|
|
43179
43115
|
var PLATFORMS2 = ["meta", "linkedin"];
|
|
43180
43116
|
var BATCH_TIMEOUT_MS = 3e5;
|
|
43181
43117
|
function buildFollowBatchBody(input) {
|
|
@@ -43208,7 +43144,7 @@ registerSchema({
|
|
|
43208
43144
|
}
|
|
43209
43145
|
}
|
|
43210
43146
|
});
|
|
43211
|
-
var followCompetitorsCommand =
|
|
43147
|
+
var followCompetitorsCommand = defineCommand206({
|
|
43212
43148
|
meta: {
|
|
43213
43149
|
name: "follow-competitors",
|
|
43214
43150
|
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"'
|
|
@@ -43283,7 +43219,7 @@ var followCompetitorsCommand = defineCommand208({
|
|
|
43283
43219
|
});
|
|
43284
43220
|
|
|
43285
43221
|
// src/commands/winning-ads/following.ts
|
|
43286
|
-
import { defineCommand as
|
|
43222
|
+
import { defineCommand as defineCommand207 } from "citty";
|
|
43287
43223
|
registerSchema({
|
|
43288
43224
|
command: "winning-ads.following",
|
|
43289
43225
|
description: "List the brands you follow in your ad-dna library, with each one's status (ready vs still adding) and cached ad counts.",
|
|
@@ -43316,7 +43252,7 @@ function followingNormalizer(record, full) {
|
|
|
43316
43252
|
platforms: Array.isArray(record.platforms) ? record.platforms : []
|
|
43317
43253
|
};
|
|
43318
43254
|
}
|
|
43319
|
-
var followingCommand =
|
|
43255
|
+
var followingCommand = defineCommand207({
|
|
43320
43256
|
meta: {
|
|
43321
43257
|
name: "following",
|
|
43322
43258
|
description: "List brands you follow, with status (ready / adding\u2026) and cached counts. Example: baker winning-ads following --output md"
|
|
@@ -43351,7 +43287,7 @@ var followingCommand = defineCommand209({
|
|
|
43351
43287
|
});
|
|
43352
43288
|
|
|
43353
43289
|
// src/commands/winning-ads/patterns.ts
|
|
43354
|
-
import { defineCommand as
|
|
43290
|
+
import { defineCommand as defineCommand208 } from "citty";
|
|
43355
43291
|
registerSchema({
|
|
43356
43292
|
command: "winning-ads.patterns",
|
|
43357
43293
|
description: "Mine what separates two cohorts of ads: pass a comma-list of winning ad ids (--winners) and a comma-list of weaker ad ids (--duds). Returns the discriminating DNA fields.",
|
|
@@ -43390,7 +43326,7 @@ function discriminatorRow(record) {
|
|
|
43390
43326
|
top_values_duds: Array.isArray(record.top_values_b) ? record.top_values_b.join(", ") : ""
|
|
43391
43327
|
};
|
|
43392
43328
|
}
|
|
43393
|
-
var patternsCommand =
|
|
43329
|
+
var patternsCommand = defineCommand208({
|
|
43394
43330
|
meta: {
|
|
43395
43331
|
name: "patterns",
|
|
43396
43332
|
description: "Discover what separates winning ads from weak ones. Example: baker winning-ads patterns --winners a_1,a_2,a_3 --duds a_9,a_8 --output md"
|
|
@@ -43446,7 +43382,7 @@ var patternsCommand = defineCommand210({
|
|
|
43446
43382
|
});
|
|
43447
43383
|
|
|
43448
43384
|
// src/commands/winning-ads/search.ts
|
|
43449
|
-
import { defineCommand as
|
|
43385
|
+
import { defineCommand as defineCommand209 } from "citty";
|
|
43450
43386
|
registerSchema({
|
|
43451
43387
|
command: "winning-ads.search",
|
|
43452
43388
|
description: "Search the ad-dna corpus of scored winning ads. Returns a lean shortlist (advertiser, summary, scores, media_url) to pick a reference to reproduce.",
|
|
@@ -43554,7 +43490,7 @@ function buildSearchBody2(args) {
|
|
|
43554
43490
|
}
|
|
43555
43491
|
return body;
|
|
43556
43492
|
}
|
|
43557
|
-
var searchCommand5 =
|
|
43493
|
+
var searchCommand5 = defineCommand209({
|
|
43558
43494
|
meta: {
|
|
43559
43495
|
name: "search",
|
|
43560
43496
|
description: "Search winning reference ads. Example: baker winning-ads search 'B2B SaaS before/after AI automation' --platform meta --format static --winner-category winner --exclude-advertiser adv_123 --output md"
|
|
@@ -43669,7 +43605,7 @@ var searchCommand5 = defineCommand211({
|
|
|
43669
43605
|
});
|
|
43670
43606
|
|
|
43671
43607
|
// src/commands/winning-ads/seeds.ts
|
|
43672
|
-
import { defineCommand as
|
|
43608
|
+
import { defineCommand as defineCommand210 } from "citty";
|
|
43673
43609
|
function leanRow(r) {
|
|
43674
43610
|
return {
|
|
43675
43611
|
key: r.key,
|
|
@@ -43697,7 +43633,7 @@ function makeSeedCommand(opts) {
|
|
|
43697
43633
|
limit: { type: "number", description: "Max keys 1-100 (default 20)", required: false, default: 20 }
|
|
43698
43634
|
}
|
|
43699
43635
|
});
|
|
43700
|
-
return
|
|
43636
|
+
return defineCommand210({
|
|
43701
43637
|
meta: { name: opts.name, description: opts.description },
|
|
43702
43638
|
args: {
|
|
43703
43639
|
platform: { type: "string", description: "Single platform to segment on", required: false },
|
|
@@ -43746,7 +43682,7 @@ var formatsCommand = makeSeedCommand({
|
|
|
43746
43682
|
});
|
|
43747
43683
|
|
|
43748
43684
|
// src/commands/winning-ads/unfollow.ts
|
|
43749
|
-
import { defineCommand as
|
|
43685
|
+
import { defineCommand as defineCommand211 } from "citty";
|
|
43750
43686
|
registerSchema({
|
|
43751
43687
|
command: "winning-ads.unfollow",
|
|
43752
43688
|
description: "Stop following a brand \u2014 removes it from your ad-dna library by advertiser id.",
|
|
@@ -43754,7 +43690,7 @@ registerSchema({
|
|
|
43754
43690
|
advertiser: { type: "string", description: "Advertiser id to unfollow", required: true }
|
|
43755
43691
|
}
|
|
43756
43692
|
});
|
|
43757
|
-
var unfollowCommand =
|
|
43693
|
+
var unfollowCommand = defineCommand211({
|
|
43758
43694
|
meta: {
|
|
43759
43695
|
name: "unfollow",
|
|
43760
43696
|
description: "Stop following a brand by advertiser id. Example: baker winning-ads unfollow adv_123"
|
|
@@ -43775,7 +43711,7 @@ var unfollowCommand = defineCommand213({
|
|
|
43775
43711
|
});
|
|
43776
43712
|
|
|
43777
43713
|
// src/commands/winning-ads/winners.ts
|
|
43778
|
-
import { defineCommand as
|
|
43714
|
+
import { defineCommand as defineCommand212 } from "citty";
|
|
43779
43715
|
registerSchema({
|
|
43780
43716
|
command: "winning-ads.winners",
|
|
43781
43717
|
description: "Top winning ads for one advertiser id (from `advertisers` or `following`). Returns lean winner cards; add --full for DNA + longevity.",
|
|
@@ -43785,7 +43721,7 @@ registerSchema({
|
|
|
43785
43721
|
platform: { type: "string", description: "Filter to a single platform: meta|linkedin", required: false }
|
|
43786
43722
|
}
|
|
43787
43723
|
});
|
|
43788
|
-
var winnersCommand =
|
|
43724
|
+
var winnersCommand = defineCommand212({
|
|
43789
43725
|
meta: {
|
|
43790
43726
|
name: "winners",
|
|
43791
43727
|
description: "Top winning ads for a specific advertiser id. Example: baker winning-ads winners adv_123 --top 15 --output md"
|
|
@@ -43835,7 +43771,7 @@ var winnersCommand = defineCommand214({
|
|
|
43835
43771
|
});
|
|
43836
43772
|
|
|
43837
43773
|
// src/commands/winning-ads/index.ts
|
|
43838
|
-
var winningAdsCommand =
|
|
43774
|
+
var winningAdsCommand = defineCommand213({
|
|
43839
43775
|
meta: {
|
|
43840
43776
|
name: "winning-ads",
|
|
43841
43777
|
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.
|
|
@@ -43890,6 +43826,164 @@ Full guide: __tooling__/docs/tools/baker/winning-ads.md`
|
|
|
43890
43826
|
}
|
|
43891
43827
|
});
|
|
43892
43828
|
|
|
43829
|
+
// src/unknown-flags.ts
|
|
43830
|
+
var ALWAYS_ACCEPTED = /* @__PURE__ */ new Set(["help", "h", "version"]);
|
|
43831
|
+
function subCommandsOf(command) {
|
|
43832
|
+
const sub = command.subCommands;
|
|
43833
|
+
return sub && typeof sub === "object" ? sub : null;
|
|
43834
|
+
}
|
|
43835
|
+
function argsOf(command) {
|
|
43836
|
+
const args = command.args;
|
|
43837
|
+
return args && typeof args === "object" ? args : null;
|
|
43838
|
+
}
|
|
43839
|
+
function resolveCommand2(root, argv) {
|
|
43840
|
+
let command = root;
|
|
43841
|
+
for (const token of argv) {
|
|
43842
|
+
if (token === "--" || token.startsWith("-")) {
|
|
43843
|
+
break;
|
|
43844
|
+
}
|
|
43845
|
+
const subCommands = subCommandsOf(command);
|
|
43846
|
+
if (!subCommands) {
|
|
43847
|
+
break;
|
|
43848
|
+
}
|
|
43849
|
+
const next = subCommands[token];
|
|
43850
|
+
if (next === void 0) {
|
|
43851
|
+
break;
|
|
43852
|
+
}
|
|
43853
|
+
if (typeof next !== "object") {
|
|
43854
|
+
return { command, resolved: false };
|
|
43855
|
+
}
|
|
43856
|
+
command = next;
|
|
43857
|
+
}
|
|
43858
|
+
return { command, resolved: true };
|
|
43859
|
+
}
|
|
43860
|
+
function typeOf(def) {
|
|
43861
|
+
return def && typeof def === "object" ? def.type : void 0;
|
|
43862
|
+
}
|
|
43863
|
+
function acceptedNames(command) {
|
|
43864
|
+
const args = argsOf(command);
|
|
43865
|
+
if (!args) {
|
|
43866
|
+
return null;
|
|
43867
|
+
}
|
|
43868
|
+
const names = new Set(ALWAYS_ACCEPTED);
|
|
43869
|
+
for (const [name, def] of Object.entries(args)) {
|
|
43870
|
+
if (typeOf(def) === "positional") {
|
|
43871
|
+
continue;
|
|
43872
|
+
}
|
|
43873
|
+
names.add(name);
|
|
43874
|
+
if (typeOf(def) === "boolean") {
|
|
43875
|
+
names.add(`no-${name}`);
|
|
43876
|
+
}
|
|
43877
|
+
}
|
|
43878
|
+
return names;
|
|
43879
|
+
}
|
|
43880
|
+
function findUnknownFlags(root, argv) {
|
|
43881
|
+
const { command, resolved } = resolveCommand2(root, argv);
|
|
43882
|
+
if (!resolved) {
|
|
43883
|
+
return [];
|
|
43884
|
+
}
|
|
43885
|
+
const accepted = acceptedNames(command);
|
|
43886
|
+
if (!accepted) {
|
|
43887
|
+
return [];
|
|
43888
|
+
}
|
|
43889
|
+
const unknown = [];
|
|
43890
|
+
for (const token of argv) {
|
|
43891
|
+
if (token === "--") {
|
|
43892
|
+
break;
|
|
43893
|
+
}
|
|
43894
|
+
if (!token.startsWith("--")) {
|
|
43895
|
+
continue;
|
|
43896
|
+
}
|
|
43897
|
+
const name = token.slice(2).split("=")[0] ?? "";
|
|
43898
|
+
if (name.length > 0 && !accepted.has(name) && !unknown.includes(token)) {
|
|
43899
|
+
unknown.push(token);
|
|
43900
|
+
}
|
|
43901
|
+
}
|
|
43902
|
+
return unknown;
|
|
43903
|
+
}
|
|
43904
|
+
function closestFlag(unknown, command) {
|
|
43905
|
+
const accepted = acceptedNames(command);
|
|
43906
|
+
if (!accepted) {
|
|
43907
|
+
return null;
|
|
43908
|
+
}
|
|
43909
|
+
const name = unknown.replace(/^--/, "").split("=")[0] ?? "";
|
|
43910
|
+
const scored = [...accepted].filter((candidate) => !ALWAYS_ACCEPTED.has(candidate)).map((candidate) => ({
|
|
43911
|
+
candidate,
|
|
43912
|
+
prefix: sharedPrefix(name, candidate),
|
|
43913
|
+
distance: editDistance(name, candidate)
|
|
43914
|
+
})).filter(({ prefix, distance }) => prefix >= 4 || distance <= 3).sort((a, b) => b.prefix - a.prefix || a.distance - b.distance);
|
|
43915
|
+
return scored[0] ? `--${scored[0].candidate}` : null;
|
|
43916
|
+
}
|
|
43917
|
+
function sharedPrefix(a, b) {
|
|
43918
|
+
let i = 0;
|
|
43919
|
+
while (i < a.length && i < b.length && a[i] === b[i]) {
|
|
43920
|
+
i++;
|
|
43921
|
+
}
|
|
43922
|
+
return i;
|
|
43923
|
+
}
|
|
43924
|
+
function editDistance(a, b) {
|
|
43925
|
+
let previous = Array.from({ length: b.length + 1 }, (_, j) => j);
|
|
43926
|
+
for (let i = 1; i <= a.length; i++) {
|
|
43927
|
+
const current = [i];
|
|
43928
|
+
for (let j = 1; j <= b.length; j++) {
|
|
43929
|
+
const substitution = (previous[j - 1] ?? 0) + (a[i - 1] === b[j - 1] ? 0 : 1);
|
|
43930
|
+
current.push(Math.min((previous[j] ?? 0) + 1, (current[j - 1] ?? 0) + 1, substitution));
|
|
43931
|
+
}
|
|
43932
|
+
previous = current;
|
|
43933
|
+
}
|
|
43934
|
+
return previous[b.length] ?? 0;
|
|
43935
|
+
}
|
|
43936
|
+
function commandFor(root, argv) {
|
|
43937
|
+
const { command, resolved } = resolveCommand2(root, argv);
|
|
43938
|
+
return resolved ? command : null;
|
|
43939
|
+
}
|
|
43940
|
+
function unknownFlagEnvelope(unknown, commandPath, suggestion) {
|
|
43941
|
+
const list = unknown.join(", ");
|
|
43942
|
+
return {
|
|
43943
|
+
ok: false,
|
|
43944
|
+
error: {
|
|
43945
|
+
code: "UNKNOWN_ARGUMENT",
|
|
43946
|
+
message: `${list} ${unknown.length > 1 ? "are not options" : "is not an option"} of \`baker ${commandPath}\`.`,
|
|
43947
|
+
fix: {
|
|
43948
|
+
action: "check_schema",
|
|
43949
|
+
explanation: (suggestion ? `Did you mean ${suggestion}? ` : "") + `Run \`baker schema ${commandPath}\` to see every option this command takes. Do not re-run the same call: until this version an unrecognised option was accepted and ignored, so a command that looked like it had filtered or narrowed the result was in fact answering the unfiltered question.`
|
|
43950
|
+
},
|
|
43951
|
+
retryable: false
|
|
43952
|
+
}
|
|
43953
|
+
};
|
|
43954
|
+
}
|
|
43955
|
+
function commandPathOf(root, argv) {
|
|
43956
|
+
const path36 = [];
|
|
43957
|
+
let command = root;
|
|
43958
|
+
for (const token of argv) {
|
|
43959
|
+
if (token === "--" || token.startsWith("-")) {
|
|
43960
|
+
break;
|
|
43961
|
+
}
|
|
43962
|
+
const subCommands = subCommandsOf(command);
|
|
43963
|
+
const next = subCommands?.[token];
|
|
43964
|
+
if (next === void 0 || typeof next !== "object") {
|
|
43965
|
+
break;
|
|
43966
|
+
}
|
|
43967
|
+
path36.push(token);
|
|
43968
|
+
command = next;
|
|
43969
|
+
}
|
|
43970
|
+
return path36.join(" ");
|
|
43971
|
+
}
|
|
43972
|
+
function refuseUnknownFlags(root, argv) {
|
|
43973
|
+
const unknown = findUnknownFlags(root, argv);
|
|
43974
|
+
if (unknown.length === 0) {
|
|
43975
|
+
return;
|
|
43976
|
+
}
|
|
43977
|
+
const command = commandFor(root, argv);
|
|
43978
|
+
const first = unknown[0];
|
|
43979
|
+
const suggestion = command && first ? closestFlag(first, command) : null;
|
|
43980
|
+
process.stdout.write(
|
|
43981
|
+
`${JSON.stringify(unknownFlagEnvelope(unknown, commandPathOf(root, argv), suggestion), null, 2)}
|
|
43982
|
+
`
|
|
43983
|
+
);
|
|
43984
|
+
process.exit(1);
|
|
43985
|
+
}
|
|
43986
|
+
|
|
43893
43987
|
// src/version.ts
|
|
43894
43988
|
import { readFileSync as readFileSync14 } from "fs";
|
|
43895
43989
|
function packageJsonUrl() {
|
|
@@ -43907,7 +44001,7 @@ function getCliVersion() {
|
|
|
43907
44001
|
}
|
|
43908
44002
|
|
|
43909
44003
|
// src/cli.ts
|
|
43910
|
-
var main =
|
|
44004
|
+
var main = defineCommand214({
|
|
43911
44005
|
meta: {
|
|
43912
44006
|
name: "baker",
|
|
43913
44007
|
version: getCliVersion(),
|
|
@@ -43922,7 +44016,6 @@ Introspection: Run 'baker schema <command>' to inspect argument schemas.`
|
|
|
43922
44016
|
subCommands: {
|
|
43923
44017
|
capabilities: capabilitiesCommand,
|
|
43924
44018
|
actions: actionsCommand,
|
|
43925
|
-
agents: agentsCommand,
|
|
43926
44019
|
"scheduled-actions": scheduledActionsCommand,
|
|
43927
44020
|
ads: adsCommand2,
|
|
43928
44021
|
brand: brandCommand,
|
|
@@ -43943,11 +44036,13 @@ Introspection: Run 'baker schema <command>' to inspect argument schemas.`
|
|
|
43943
44036
|
history: historyCommand,
|
|
43944
44037
|
hubspot: hubspotCommand,
|
|
43945
44038
|
"winning-ads": winningAdsCommand,
|
|
44039
|
+
marketplace: marketplaceCommand,
|
|
43946
44040
|
mcp: mcpCommand,
|
|
43947
44041
|
schema: schemaCommand
|
|
43948
44042
|
}
|
|
43949
44043
|
});
|
|
43950
44044
|
installStreamTaps();
|
|
43951
44045
|
logInvocation(process.argv.slice(2));
|
|
44046
|
+
refuseUnknownFlags(main, process.argv.slice(2));
|
|
43952
44047
|
runMain(main);
|
|
43953
44048
|
//# sourceMappingURL=cli.js.map
|