@koda-sl/baker-cli 0.192.0 → 0.192.2
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 +5 -4
- package/dist/cli.js +29 -20
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -789,7 +789,7 @@ baker ads meta pixels --pixel-id 9988 --stats --days 7
|
|
|
789
789
|
|
|
790
790
|
Meta writes mirror the Google/LinkedIn model: they **never hit the Graph API when you run them**. Each op is validated at stage time (field shapes, budget rules, page/Instagram identity ownership, CBO/ABO exclusivity, status-transition legality), shows in the dashboard chat as a pending Meta change, and applies only when the chat is published. Meta has no atomic batch mutate, so ops apply **sequentially** on publish — one failure skips its dependents but the publish completes.
|
|
791
791
|
|
|
792
|
-
|
|
792
|
+
**That publish reaches the real ad account for every company** — Meta writes are generally available, with no per-company flag and no simulated mode to turn on. Discarding the chat before it completes is what undoes a staged change.
|
|
793
793
|
|
|
794
794
|
Chain a full ad from scratch with `meta_temp_*` refs (each create returns one):
|
|
795
795
|
|
|
@@ -999,7 +999,7 @@ draft [list|remove <ref>|clear|amend <ref>|show <ref>] # review/undo/amend sta
|
|
|
999
999
|
|
|
1000
1000
|
Write commands never call the LinkedIn API at stage time. Each stages an op on the current chat's draft, fully validated at staging (field limits, enums, budget minimums, URN shapes, parent existence, Baker media readiness, status-transition legality). Validation errors are structured per-field; non-blocking warnings (Maximum Delivery when no `--bid`, budget below playbook floor, audience under 300 rows, >4 lead-form questions, audience expansion/LAN on) come back in the stage envelope. Ops apply when the chat is published.
|
|
1001
1001
|
|
|
1002
|
-
|
|
1002
|
+
**That publish reaches the real ad account for every company** — LinkedIn writes are generally available, with no per-company flag and no simulated mode to turn on. Discarding the chat before it completes is what undoes a staged change.
|
|
1003
1003
|
|
|
1004
1004
|
```bash
|
|
1005
1005
|
# Chain creates via li_temp_* refs — group → campaign → creative in one chat
|
|
@@ -4701,10 +4701,11 @@ baker canvas catalog | jq '.compositions[].id'
|
|
|
4701
4701
|
// URL source — font file for font_specimen (direct fetch; magic-byte sniffed, so octet-stream CDNs work)
|
|
4702
4702
|
{ "id": "src", "type": "ingest", "params": { "source": "url", "url": "https://cdn.example.com/brand.ttf", "expect": "font" } }
|
|
4703
4703
|
|
|
4704
|
-
// Path source — relative
|
|
4704
|
+
// Path source — relative to the canvas file's own directory (validate/run resolve it there)
|
|
4705
4705
|
{ "id": "src", "type": "ingest", "params": { "source": "path", "path": "./inputs/headshot.png", "expect": "image" } }
|
|
4706
4706
|
|
|
4707
|
-
// Path source — absolute path used as-is
|
|
4707
|
+
// Path source — an absolute path is used as-is, and so resolves only on the machine that wrote it.
|
|
4708
|
+
// Keep canvases portable: creative canvases are validated for this (`absolute-reference`).
|
|
4708
4709
|
{ "id": "src", "type": "ingest", "params": { "source": "path", "path": "/abs/work/clip.mp4", "expect": "video" } }
|
|
4709
4710
|
```
|
|
4710
4711
|
|
package/dist/cli.js
CHANGED
|
@@ -2477,7 +2477,7 @@ var CAPABILITY_SURFACE_SPECS = {
|
|
|
2477
2477
|
label: "Google Ads",
|
|
2478
2478
|
provider: "google-ads",
|
|
2479
2479
|
resourceNoun: "ad account",
|
|
2480
|
-
writePath: "staged-
|
|
2480
|
+
writePath: "staged-live",
|
|
2481
2481
|
writeScopes: ["https://www.googleapis.com/auth/adwords"],
|
|
2482
2482
|
commands: "baker ads google"
|
|
2483
2483
|
},
|
|
@@ -2486,7 +2486,7 @@ var CAPABILITY_SURFACE_SPECS = {
|
|
|
2486
2486
|
label: "Meta Ads",
|
|
2487
2487
|
provider: "meta",
|
|
2488
2488
|
resourceNoun: "ad account",
|
|
2489
|
-
writePath: "staged-
|
|
2489
|
+
writePath: "staged-live",
|
|
2490
2490
|
writeScopes: ["ads_management"],
|
|
2491
2491
|
commands: "baker ads meta"
|
|
2492
2492
|
},
|
|
@@ -2495,7 +2495,7 @@ var CAPABILITY_SURFACE_SPECS = {
|
|
|
2495
2495
|
label: "LinkedIn Ads",
|
|
2496
2496
|
provider: "linkedin",
|
|
2497
2497
|
resourceNoun: "ad account",
|
|
2498
|
-
writePath: "staged-
|
|
2498
|
+
writePath: "staged-live",
|
|
2499
2499
|
writeScopes: ["rw_ads"],
|
|
2500
2500
|
commands: "baker ads linkedin"
|
|
2501
2501
|
},
|
|
@@ -2575,7 +2575,7 @@ var capabilityLimitViewSchema = z6.object({
|
|
|
2575
2575
|
cause: z6.enum(["not_built", "provider_forbids", "no_permission"]),
|
|
2576
2576
|
detail: z6.string()
|
|
2577
2577
|
});
|
|
2578
|
-
var capabilityWriteModeSchema = z6.enum(["live", "
|
|
2578
|
+
var capabilityWriteModeSchema = z6.enum(["live", "applies-at-publish", "none"]);
|
|
2579
2579
|
var capabilitySurfaceReportSchema = z6.object({
|
|
2580
2580
|
surface: capabilitySurfaceSchema,
|
|
2581
2581
|
label: z6.string(),
|
|
@@ -12525,7 +12525,7 @@ registerSchema({
|
|
|
12525
12525
|
});
|
|
12526
12526
|
registerSchema({
|
|
12527
12527
|
command: "ads.linkedin.draft.list",
|
|
12528
|
-
description: "Show every LinkedIn write op staged in this chat: ref, summary, dependencies, warnings,
|
|
12528
|
+
description: "Show every LinkedIn write op staged in this chat: ref, summary, dependencies, warnings, and post-publish results. Ops are invisible to the read commands until publish, and publishing reaches the real ad account \u2014 check here before finishing.",
|
|
12529
12529
|
args: {
|
|
12530
12530
|
json: {
|
|
12531
12531
|
type: "boolean",
|
|
@@ -15270,7 +15270,7 @@ Performance \u2014 the workhorse (3 axes):
|
|
|
15270
15270
|
|
|
15271
15271
|
Staged writes (NEVER hit LinkedIn directly \u2014 ops stage on this chat's draft,
|
|
15272
15272
|
show in the dashboard as pending LinkedIn changes, and apply when the chat is
|
|
15273
|
-
published
|
|
15273
|
+
published, at which point they reach the real ad account):
|
|
15274
15274
|
baker ads linkedin campaign-groups create|update|pause|resume|duplicate
|
|
15275
15275
|
baker ads linkedin campaigns create|update|pause|resume|archive|duplicate
|
|
15276
15276
|
baker ads linkedin creatives create|update|pause|resume|duplicate
|
|
@@ -17260,7 +17260,7 @@ async function listDraft2(chat) {
|
|
|
17260
17260
|
var listCommand9 = defineCommand62({
|
|
17261
17261
|
meta: {
|
|
17262
17262
|
name: "list",
|
|
17263
|
-
description: "Show every Meta write op staged in this chat, its
|
|
17263
|
+
description: "Show every Meta write op staged in this chat, its dependencies, and post-publish results. Publishing reaches the real ad account, so review this before you finish. Example: baker ads meta draft"
|
|
17264
17264
|
},
|
|
17265
17265
|
args: { chat: CHAT_READ_ARG },
|
|
17266
17266
|
run: async ({ args }) => {
|
|
@@ -20906,7 +20906,7 @@ function todoPath(el, label) {
|
|
|
20906
20906
|
const t = el.type.toLowerCase();
|
|
20907
20907
|
const fresh = t === "person" || t === "animal" || t === "location" ? " [SOURCE FRESH \u2014 a DIFFERENT person/animal/set than the original ad; do not reuse the source's individual]" : "";
|
|
20908
20908
|
const same = el.same_as ? ` [SAME INDIVIDUAL as ${el.same_as} \u2014 a different wardrobe/look of the same person; reuse that cast person, change only the outfit]` : "";
|
|
20909
|
-
return `[TODO: drop one real source image for ${label} (${el.type})${desc}${expr} \u2014 reused across every frame it appears in${fresh}${same}]`;
|
|
20909
|
+
return `[TODO: drop one real source image for ${label} (${el.type})${desc}${expr} \u2014 reused across every frame it appears in${fresh}${same}; use a path relative to this canvas file, never an absolute path]`;
|
|
20910
20910
|
}
|
|
20911
20911
|
function buildElementSlots(elements) {
|
|
20912
20912
|
const usedIds = /* @__PURE__ */ new Set([
|
|
@@ -21753,7 +21753,7 @@ function emitScreenScene(i, scene, lengths, out, surfaceIngests, nodes, clips) {
|
|
|
21753
21753
|
type: "ingest",
|
|
21754
21754
|
params: {
|
|
21755
21755
|
source: "path",
|
|
21756
|
-
path: `[TODO: supply the REAL screen for "${label}" \u2014 NEVER AI-generate a UI. Capture a clean, text-free screenshot with \`baker images screenshot https://<brand-domain>/<path>\` (image-library skill); spoken/overlay text rides the overlay layer, not the screenshot]`,
|
|
21756
|
+
path: `[TODO: supply the REAL screen for "${label}" \u2014 NEVER AI-generate a UI. Capture a clean, text-free screenshot with \`baker images screenshot https://<brand-domain>/<path>\` (image-library skill); spoken/overlay text rides the overlay layer, not the screenshot. Wire it in as a path relative to this canvas file, never an absolute path]`,
|
|
21757
21757
|
expect: "image"
|
|
21758
21758
|
}
|
|
21759
21759
|
});
|
|
@@ -21805,7 +21805,7 @@ function emitGraphicScene(i, scene, lengths, out, surfaceIngests, nodes, clips)
|
|
|
21805
21805
|
type: "ingest",
|
|
21806
21806
|
params: {
|
|
21807
21807
|
source: "path",
|
|
21808
|
-
path: `[TODO: supply the REAL designed graphic for "${label}" \u2014 NEVER AI-generate a designed panel (its typography/wordmarks garble). Rebuild it as brand HTML in video-overlay-composition (the scene's text/logos are already seeded there), export the design from the brand kit, or source stock art; text rides the overlay layer, not this plate]`,
|
|
21808
|
+
path: `[TODO: supply the REAL designed graphic for "${label}" \u2014 NEVER AI-generate a designed panel (its typography/wordmarks garble). Rebuild it as brand HTML in video-overlay-composition (the scene's text/logos are already seeded there), export the design from the brand kit, or source stock art; text rides the overlay layer, not this plate. Wire it in as a path relative to this canvas file, never an absolute path]`,
|
|
21809
21809
|
expect: "image"
|
|
21810
21810
|
}
|
|
21811
21811
|
});
|
|
@@ -24082,6 +24082,10 @@ function mimeForFile(filePath) {
|
|
|
24082
24082
|
function toPosix(p) {
|
|
24083
24083
|
return p.split(path12.sep).join("/");
|
|
24084
24084
|
}
|
|
24085
|
+
function isInside(dir, target) {
|
|
24086
|
+
const rel = path12.relative(dir, target);
|
|
24087
|
+
return !rel.startsWith("..") && !path12.isAbsolute(rel);
|
|
24088
|
+
}
|
|
24085
24089
|
function localPathRefsFromCanvas(parsed) {
|
|
24086
24090
|
const nodes = parsed?.nodes;
|
|
24087
24091
|
if (!Array.isArray(nodes)) return [];
|
|
@@ -24120,6 +24124,13 @@ async function uploadRunSnapshot(client, opts) {
|
|
|
24120
24124
|
const skipped = [];
|
|
24121
24125
|
for (const refPath of await sourceRefsToSnapshot(canvasDir, opts.parsed)) {
|
|
24122
24126
|
const abs = path12.isAbsolute(refPath) ? refPath : path12.resolve(canvasDir, refPath);
|
|
24127
|
+
if (!isInside(canvasDir, abs)) {
|
|
24128
|
+
skipped.push({
|
|
24129
|
+
path: toPosix(path12.relative(canvasDir, abs)),
|
|
24130
|
+
reason: "outside the creative folder \u2014 read from the workspace on rerun"
|
|
24131
|
+
});
|
|
24132
|
+
continue;
|
|
24133
|
+
}
|
|
24123
24134
|
let st;
|
|
24124
24135
|
try {
|
|
24125
24136
|
st = await stat2(abs);
|
|
@@ -24776,7 +24787,7 @@ function todoPath2(el, label) {
|
|
|
24776
24787
|
const expr = el.expression ? `, with a ${el.expression} expression` : "";
|
|
24777
24788
|
const t = el.type.toLowerCase();
|
|
24778
24789
|
const lock = t === "person" || t === "animal" ? " \u2014 REQUIRED: this is the emotional hero; ground it in a real reference (image-library / video-library / Pinterest), do not delete this slot and free-generate" : "";
|
|
24779
|
-
return `[TODO: drop a real image for ${label} (${el.type})${desc}${expr}${lock}]`;
|
|
24790
|
+
return `[TODO: drop a real image for ${label} (${el.type})${desc}${expr}${lock} \u2014 replace with a path relative to this canvas file, never an absolute path]`;
|
|
24780
24791
|
}
|
|
24781
24792
|
function sheetSubjectDescription(el) {
|
|
24782
24793
|
const desc = el.description ?? `the ${el.type}`;
|
|
@@ -24867,7 +24878,11 @@ function scaffoldStaticAd(input, elementsInput, opts) {
|
|
|
24867
24878
|
nodes.push({
|
|
24868
24879
|
id: "brandfont",
|
|
24869
24880
|
type: "ingest",
|
|
24870
|
-
params: {
|
|
24881
|
+
params: {
|
|
24882
|
+
source: "path",
|
|
24883
|
+
path: "[TODO: brand font .otf/.ttf, as a path relative to this canvas file (e.g. ../../brand/fonts/Brand-Bold.otf) \u2014 never an absolute path]",
|
|
24884
|
+
expect: "font"
|
|
24885
|
+
}
|
|
24871
24886
|
});
|
|
24872
24887
|
nodes.push({
|
|
24873
24888
|
id: "type_ref",
|
|
@@ -26520,7 +26535,7 @@ Full guide: __tooling__/docs/tools/baker/canvas.md`
|
|
|
26520
26535
|
import { defineCommand as defineCommand100 } from "citty";
|
|
26521
26536
|
registerSchema({
|
|
26522
26537
|
command: "capabilities",
|
|
26523
|
-
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,
|
|
26538
|
+
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.",
|
|
26524
26539
|
args: {
|
|
26525
26540
|
surface: {
|
|
26526
26541
|
type: "positional",
|
|
@@ -26537,12 +26552,6 @@ registerSchema({
|
|
|
26537
26552
|
});
|
|
26538
26553
|
function capabilityHints(surfaces) {
|
|
26539
26554
|
const hints = [];
|
|
26540
|
-
const simulated = surfaces.filter((surface) => surface.writeMode === "simulated");
|
|
26541
|
-
if (simulated.length > 0) {
|
|
26542
|
-
hints.push(
|
|
26543
|
-
`SIMULATED: ${simulated.map((s) => s.label).join(", ")} \u2014 staging and publishing complete in full and nothing reaches the platform. Do the work, but never tell the user it is live.`
|
|
26544
|
-
);
|
|
26545
|
-
}
|
|
26546
26555
|
const immediate = surfaces.filter((surface) => surface.writeMode === "applies-at-publish");
|
|
26547
26556
|
if (immediate.length > 0) {
|
|
26548
26557
|
hints.push(
|
|
@@ -26571,7 +26580,7 @@ var runCapabilities = defineCommand100({
|
|
|
26571
26580
|
name: "capabilities",
|
|
26572
26581
|
description: `What Baker can and cannot do for this company, before any work starts.
|
|
26573
26582
|
|
|
26574
|
-
Reports, per surface: what is connected and with what access,
|
|
26583
|
+
Reports, per surface: what is connected and with what access, what a write there does when it lands, the entities that can be changed, and \u2014 the part nothing else tells you \u2014 what cannot be changed and why.
|
|
26575
26584
|
|
|
26576
26585
|
Examples:
|
|
26577
26586
|
baker capabilities
|