@koda-sl/baker-cli 0.67.0 → 0.70.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +71 -14
- package/dist/{chunk-K6LHXCKD.js → chunk-XFDZVKLF.js} +11 -3
- package/dist/chunk-XFDZVKLF.js.map +1 -0
- package/dist/cli.js +518 -607
- package/dist/cli.js.map +1 -1
- package/dist/engine/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-K6LHXCKD.js.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
ELEVENLABS_MAX_MUSIC_LENGTH_MS,
|
|
4
|
+
IMAGE_GENERATE_MODELS,
|
|
4
5
|
MODEL_REGISTRY,
|
|
5
6
|
SEEDANCE_DURATIONS,
|
|
6
7
|
ValidationError,
|
|
@@ -8,13 +9,13 @@ import {
|
|
|
8
9
|
defaultRegistry,
|
|
9
10
|
generateCatalog,
|
|
10
11
|
validateCanvasDeep
|
|
11
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-XFDZVKLF.js";
|
|
12
13
|
|
|
13
14
|
// src/cli.ts
|
|
14
|
-
import { defineCommand as
|
|
15
|
+
import { defineCommand as defineCommand138, runMain } from "citty";
|
|
15
16
|
|
|
16
17
|
// src/commands/actions/index.ts
|
|
17
|
-
import { defineCommand as
|
|
18
|
+
import { defineCommand as defineCommand12 } from "citty";
|
|
18
19
|
|
|
19
20
|
// src/commands/actions/claim.ts
|
|
20
21
|
import { defineCommand } from "citty";
|
|
@@ -500,7 +501,7 @@ var completeCommand = defineCommand2({
|
|
|
500
501
|
import { defineCommand as defineCommand3 } from "citty";
|
|
501
502
|
registerSchema({
|
|
502
503
|
command: "actions.create",
|
|
503
|
-
description: "Stage creation of a new action (applies when the chat is published). Returns a tempId you can use to link
|
|
504
|
+
description: "Stage creation of a new action (applies when the chat is published). Returns a tempId you can use to link in the same draft. After creating, check if this action blocks or is blocked by other actions and wire dependencies with `baker actions link`.",
|
|
504
505
|
args: {
|
|
505
506
|
name: { type: "string", description: "Action name (short, action-verb, \u22646 words)", required: true },
|
|
506
507
|
description: {
|
|
@@ -508,19 +509,17 @@ registerSchema({
|
|
|
508
509
|
description: "Context-complete description: what / why / where / done-when",
|
|
509
510
|
required: false
|
|
510
511
|
},
|
|
511
|
-
tag: { type: "string", description: "Tag slugs (comma-separated)", required: false },
|
|
512
512
|
"temp-id": { type: "string", description: "Custom tempId (auto-generated if omitted)", required: false }
|
|
513
513
|
}
|
|
514
514
|
});
|
|
515
515
|
var createCommand = defineCommand3({
|
|
516
516
|
meta: {
|
|
517
517
|
name: "create",
|
|
518
|
-
description: 'Stage a new action. Applies when the chat is published. Example: baker actions create --name "Build hero"
|
|
518
|
+
description: 'Stage a new action. Applies when the chat is published. Example: baker actions create --name "Build hero"'
|
|
519
519
|
},
|
|
520
520
|
args: {
|
|
521
521
|
name: { type: "string", description: "Action name", required: false },
|
|
522
522
|
description: { type: "string", description: "Description", required: false, default: "" },
|
|
523
|
-
tag: { type: "string", description: "Tag slugs (comma-separated, repeatable)", required: false },
|
|
524
523
|
"temp-id": { type: "string", description: "Optional custom tempId", required: false }
|
|
525
524
|
},
|
|
526
525
|
run: async ({ args }) => {
|
|
@@ -531,19 +530,14 @@ var createCommand = defineCommand3({
|
|
|
531
530
|
}
|
|
532
531
|
const chatId = requireChatId();
|
|
533
532
|
const tempId = args["temp-id"] || generateTempId();
|
|
534
|
-
const tagSlugs = args.tag ? args.tag.split(",").map((s) => s.trim()).filter(Boolean) : void 0;
|
|
535
533
|
const response = await apiPost("/api/actions/create", {
|
|
536
534
|
chatId,
|
|
537
535
|
tempId,
|
|
538
536
|
name,
|
|
539
|
-
description: args.description ?? ""
|
|
540
|
-
tagSlugs
|
|
537
|
+
description: args.description ?? ""
|
|
541
538
|
});
|
|
542
539
|
const hints = [];
|
|
543
540
|
hints.push(`Link dependencies: baker actions link --blocker <id> --blocked ${tempId}`);
|
|
544
|
-
if (!tagSlugs || tagSlugs.length === 0) {
|
|
545
|
-
hints.push("Add tags: baker actions tag add <tempId> --slug <tag-slug>");
|
|
546
|
-
}
|
|
547
541
|
if (!args.description) {
|
|
548
542
|
hints.push("Add description: baker actions update <tempId> --description '...' (what/why/where/done-when)");
|
|
549
543
|
}
|
|
@@ -667,7 +661,7 @@ var linkCommand = defineCommand6({
|
|
|
667
661
|
import { defineCommand as defineCommand7 } from "citty";
|
|
668
662
|
registerSchema({
|
|
669
663
|
command: "actions.list",
|
|
670
|
-
description: "List actions for the current company. Default: pre-bucketed (claimable/myClaims/blocked/claimedByOthers/completed/discarded). Set --bucketed=false for a flat list filterable by --status
|
|
664
|
+
description: "List actions for the current company. Default: pre-bucketed (claimable/myClaims/blocked/claimedByOthers/completed/discarded). Set --bucketed=false for a flat list filterable by --status.",
|
|
671
665
|
args: {
|
|
672
666
|
bucketed: {
|
|
673
667
|
type: "boolean",
|
|
@@ -679,23 +673,17 @@ registerSchema({
|
|
|
679
673
|
type: "string",
|
|
680
674
|
description: "Filter by status (only with --bucketed=false): pending|in_progress|completed|discarded",
|
|
681
675
|
required: false
|
|
682
|
-
},
|
|
683
|
-
tag: {
|
|
684
|
-
type: "string",
|
|
685
|
-
description: "Repeatable; filter by tag slug (only with --bucketed=false)",
|
|
686
|
-
required: false
|
|
687
676
|
}
|
|
688
677
|
}
|
|
689
678
|
});
|
|
690
679
|
var listCommand = defineCommand7({
|
|
691
680
|
meta: {
|
|
692
681
|
name: "list",
|
|
693
|
-
description: "List actions. Default: bucketed view (claimable, myClaims, blocked, claimedByOthers). Use --bucketed=false for raw filter by --status
|
|
682
|
+
description: "List actions. Default: bucketed view (claimable, myClaims, blocked, claimedByOthers). Use --bucketed=false for raw filter by --status."
|
|
694
683
|
},
|
|
695
684
|
args: {
|
|
696
685
|
bucketed: { type: "boolean", description: "Pre-bucket by chat", required: false, default: true },
|
|
697
|
-
status: { type: "string", description: "Status filter (raw mode)", required: false }
|
|
698
|
-
tag: { type: "string", description: "Tag slug filter (raw mode, comma-separated)", required: false }
|
|
686
|
+
status: { type: "string", description: "Status filter (raw mode)", required: false }
|
|
699
687
|
},
|
|
700
688
|
run: async ({ args }) => {
|
|
701
689
|
try {
|
|
@@ -709,9 +697,6 @@ var listCommand = defineCommand7({
|
|
|
709
697
|
if (args.status) {
|
|
710
698
|
body.status = args.status;
|
|
711
699
|
}
|
|
712
|
-
if (args.tag) {
|
|
713
|
-
body.tagSlugs = args.tag.split(",").map((s) => s.trim()).filter(Boolean);
|
|
714
|
-
}
|
|
715
700
|
}
|
|
716
701
|
const response = await apiPost("/api/actions/list", body);
|
|
717
702
|
writeJson(response);
|
|
@@ -786,270 +771,8 @@ var statusCommand = defineCommand9({
|
|
|
786
771
|
}
|
|
787
772
|
});
|
|
788
773
|
|
|
789
|
-
// src/commands/actions/tag/index.ts
|
|
790
|
-
import { defineCommand as defineCommand16 } from "citty";
|
|
791
|
-
|
|
792
|
-
// src/commands/actions/tag/add.ts
|
|
793
|
-
import { defineCommand as defineCommand10 } from "citty";
|
|
794
|
-
registerSchema({
|
|
795
|
-
command: "actions.tag.add",
|
|
796
|
-
description: "Stage adding a tag to an action. Action ref can be an action ID or a tempId from a create op in the same draft.",
|
|
797
|
-
args: {
|
|
798
|
-
"action-ref": { type: "string", description: "Action ID or tempId", required: true },
|
|
799
|
-
slug: { type: "string", description: "Tag slug", required: true }
|
|
800
|
-
}
|
|
801
|
-
});
|
|
802
|
-
var addCommand = defineCommand10({
|
|
803
|
-
meta: {
|
|
804
|
-
name: "add",
|
|
805
|
-
description: "Stage adding a tag to an action. Example: baker actions tag add <action-id-or-tempId> --slug copy"
|
|
806
|
-
},
|
|
807
|
-
args: {
|
|
808
|
-
"action-ref": { type: "positional", description: "Action ID or tempId", required: false },
|
|
809
|
-
"action-id": { type: "string", description: "Action ID (alternative)", required: false },
|
|
810
|
-
slug: { type: "string", description: "Tag slug", required: false }
|
|
811
|
-
},
|
|
812
|
-
run: async ({ args }) => {
|
|
813
|
-
try {
|
|
814
|
-
const ref = args["action-ref"] || args["action-id"];
|
|
815
|
-
const slug = args.slug;
|
|
816
|
-
if (!ref) {
|
|
817
|
-
failValidation("Action ref (ID or tempId) is required.");
|
|
818
|
-
}
|
|
819
|
-
if (!slug) {
|
|
820
|
-
failValidation("--slug is required.");
|
|
821
|
-
}
|
|
822
|
-
const chatId = requireChatId();
|
|
823
|
-
await apiPost("/api/actions/tag/add", {
|
|
824
|
-
chatId,
|
|
825
|
-
actionRef: ref,
|
|
826
|
-
tagSlug: slug
|
|
827
|
-
});
|
|
828
|
-
writeOk();
|
|
829
|
-
} catch (err) {
|
|
830
|
-
failApi(err);
|
|
831
|
-
}
|
|
832
|
-
}
|
|
833
|
-
});
|
|
834
|
-
|
|
835
|
-
// src/commands/actions/tag/create.ts
|
|
836
|
-
import { defineCommand as defineCommand11 } from "citty";
|
|
837
|
-
registerSchema({
|
|
838
|
-
command: "actions.tag.create",
|
|
839
|
-
description: "Create a new company-wide action tag. Applies immediately.",
|
|
840
|
-
args: {
|
|
841
|
-
slug: { type: "string", description: "Lowercase alphanumeric slug (hyphens allowed)", required: true },
|
|
842
|
-
label: { type: "string", description: "Display label", required: true },
|
|
843
|
-
color: { type: "string", description: "Hex color (e.g. #f59e0b)", required: false },
|
|
844
|
-
description: { type: "string", description: "Optional description", required: false }
|
|
845
|
-
}
|
|
846
|
-
});
|
|
847
|
-
var createCommand2 = defineCommand11({
|
|
848
|
-
meta: {
|
|
849
|
-
name: "create",
|
|
850
|
-
description: 'Create a new action tag. Example: baker actions tag create --slug copy --label Copy --color "#f59e0b"'
|
|
851
|
-
},
|
|
852
|
-
args: {
|
|
853
|
-
slug: { type: "string", description: "Slug", required: false },
|
|
854
|
-
label: { type: "string", description: "Label", required: false },
|
|
855
|
-
color: { type: "string", description: "Hex color", required: false },
|
|
856
|
-
description: { type: "string", description: "Description", required: false }
|
|
857
|
-
},
|
|
858
|
-
run: async ({ args }) => {
|
|
859
|
-
try {
|
|
860
|
-
const slug = args.slug;
|
|
861
|
-
const label = args.label;
|
|
862
|
-
if (!slug) {
|
|
863
|
-
failValidation("--slug is required.");
|
|
864
|
-
}
|
|
865
|
-
if (!label) {
|
|
866
|
-
failValidation("--label is required.");
|
|
867
|
-
}
|
|
868
|
-
const response = await apiPost("/api/actions/tag/create", {
|
|
869
|
-
slug,
|
|
870
|
-
label,
|
|
871
|
-
color: args.color,
|
|
872
|
-
description: args.description
|
|
873
|
-
});
|
|
874
|
-
writeJson(response);
|
|
875
|
-
} catch (err) {
|
|
876
|
-
failApi(err);
|
|
877
|
-
}
|
|
878
|
-
}
|
|
879
|
-
});
|
|
880
|
-
|
|
881
|
-
// src/commands/actions/tag/delete.ts
|
|
882
|
-
import { defineCommand as defineCommand12 } from "citty";
|
|
883
|
-
registerSchema({
|
|
884
|
-
command: "actions.tag.delete",
|
|
885
|
-
description: "Delete a tag and all its associations. Applies immediately.",
|
|
886
|
-
args: {
|
|
887
|
-
id: { type: "string", description: "Tag ID", required: true }
|
|
888
|
-
}
|
|
889
|
-
});
|
|
890
|
-
var deleteCommand = defineCommand12({
|
|
891
|
-
meta: {
|
|
892
|
-
name: "delete",
|
|
893
|
-
description: "Delete a tag. Example: baker actions tag delete <tag-id>"
|
|
894
|
-
},
|
|
895
|
-
args: {
|
|
896
|
-
id: { type: "positional", description: "Tag ID", required: false },
|
|
897
|
-
"tag-id": { type: "string", description: "Tag ID", required: false }
|
|
898
|
-
},
|
|
899
|
-
run: async ({ args }) => {
|
|
900
|
-
try {
|
|
901
|
-
const id = args.id || args["tag-id"];
|
|
902
|
-
if (!id) {
|
|
903
|
-
failValidation("Tag ID is required.");
|
|
904
|
-
}
|
|
905
|
-
validateConvexId(id);
|
|
906
|
-
await apiPost("/api/actions/tag/delete", { tagId: id });
|
|
907
|
-
writeOk();
|
|
908
|
-
} catch (err) {
|
|
909
|
-
failApi(err);
|
|
910
|
-
}
|
|
911
|
-
}
|
|
912
|
-
});
|
|
913
|
-
|
|
914
|
-
// src/commands/actions/tag/list.ts
|
|
915
|
-
import { defineCommand as defineCommand13 } from "citty";
|
|
916
|
-
registerSchema({
|
|
917
|
-
command: "actions.tag.list",
|
|
918
|
-
description: "List all action tags for the current company.",
|
|
919
|
-
args: {}
|
|
920
|
-
});
|
|
921
|
-
var listCommand2 = defineCommand13({
|
|
922
|
-
meta: { name: "list", description: "List all action tags. Example: baker actions tag list" },
|
|
923
|
-
args: {},
|
|
924
|
-
run: async () => {
|
|
925
|
-
try {
|
|
926
|
-
const response = await apiPost("/api/actions/tag/list", {});
|
|
927
|
-
writeJson(response);
|
|
928
|
-
} catch (err) {
|
|
929
|
-
failApi(err);
|
|
930
|
-
}
|
|
931
|
-
}
|
|
932
|
-
});
|
|
933
|
-
|
|
934
|
-
// src/commands/actions/tag/remove.ts
|
|
935
|
-
import { defineCommand as defineCommand14 } from "citty";
|
|
936
|
-
registerSchema({
|
|
937
|
-
command: "actions.tag.remove",
|
|
938
|
-
description: "Stage removing a tag from a claimed action.",
|
|
939
|
-
args: {
|
|
940
|
-
id: { type: "string", description: "Action ID (must be claimed by current chat)", required: true },
|
|
941
|
-
slug: { type: "string", description: "Tag slug", required: true }
|
|
942
|
-
}
|
|
943
|
-
});
|
|
944
|
-
var removeCommand = defineCommand14({
|
|
945
|
-
meta: {
|
|
946
|
-
name: "remove",
|
|
947
|
-
description: "Stage removing a tag from a claimed action. Example: baker actions tag remove <action-id> --slug copy"
|
|
948
|
-
},
|
|
949
|
-
args: {
|
|
950
|
-
id: { type: "positional", description: "Action ID", required: false },
|
|
951
|
-
"action-id": { type: "string", description: "Action ID", required: false },
|
|
952
|
-
slug: { type: "string", description: "Tag slug", required: false }
|
|
953
|
-
},
|
|
954
|
-
run: async ({ args }) => {
|
|
955
|
-
try {
|
|
956
|
-
const id = args.id || args["action-id"];
|
|
957
|
-
const slug = args.slug;
|
|
958
|
-
if (!id) {
|
|
959
|
-
failValidation("Action ID is required.");
|
|
960
|
-
}
|
|
961
|
-
if (!slug) {
|
|
962
|
-
failValidation("--slug is required.");
|
|
963
|
-
}
|
|
964
|
-
validateConvexId(id);
|
|
965
|
-
const chatId = requireChatId();
|
|
966
|
-
await apiPost("/api/actions/tag/remove", {
|
|
967
|
-
chatId,
|
|
968
|
-
actionId: id,
|
|
969
|
-
tagSlug: slug
|
|
970
|
-
});
|
|
971
|
-
writeOk();
|
|
972
|
-
} catch (err) {
|
|
973
|
-
failApi(err);
|
|
974
|
-
}
|
|
975
|
-
}
|
|
976
|
-
});
|
|
977
|
-
|
|
978
|
-
// src/commands/actions/tag/update.ts
|
|
979
|
-
import { defineCommand as defineCommand15 } from "citty";
|
|
980
|
-
registerSchema({
|
|
981
|
-
command: "actions.tag.update",
|
|
982
|
-
description: "Update a tag's label, color, or description. Applies immediately.",
|
|
983
|
-
args: {
|
|
984
|
-
id: { type: "string", description: "Tag ID", required: true },
|
|
985
|
-
label: { type: "string", description: "New label", required: false },
|
|
986
|
-
color: { type: "string", description: "New hex color", required: false },
|
|
987
|
-
description: { type: "string", description: "New description", required: false }
|
|
988
|
-
}
|
|
989
|
-
});
|
|
990
|
-
var updateCommand = defineCommand15({
|
|
991
|
-
meta: {
|
|
992
|
-
name: "update",
|
|
993
|
-
description: 'Update a tag. Example: baker actions tag update <tag-id> --label "Copywriting"'
|
|
994
|
-
},
|
|
995
|
-
args: {
|
|
996
|
-
id: { type: "positional", description: "Tag ID", required: false },
|
|
997
|
-
"tag-id": { type: "string", description: "Tag ID", required: false },
|
|
998
|
-
label: { type: "string", description: "New label", required: false },
|
|
999
|
-
color: { type: "string", description: "New hex color", required: false },
|
|
1000
|
-
description: { type: "string", description: "New description", required: false }
|
|
1001
|
-
},
|
|
1002
|
-
run: async ({ args }) => {
|
|
1003
|
-
try {
|
|
1004
|
-
const id = args.id || args["tag-id"];
|
|
1005
|
-
if (!id) {
|
|
1006
|
-
failValidation("Tag ID is required.");
|
|
1007
|
-
}
|
|
1008
|
-
validateConvexId(id);
|
|
1009
|
-
if (args.label === void 0 && args.color === void 0 && args.description === void 0) {
|
|
1010
|
-
failValidation("Provide at least one of --label, --color, --description.");
|
|
1011
|
-
}
|
|
1012
|
-
await apiPost("/api/actions/tag/update", {
|
|
1013
|
-
tagId: id,
|
|
1014
|
-
label: args.label,
|
|
1015
|
-
color: args.color,
|
|
1016
|
-
description: args.description
|
|
1017
|
-
});
|
|
1018
|
-
writeOk();
|
|
1019
|
-
} catch (err) {
|
|
1020
|
-
failApi(err);
|
|
1021
|
-
}
|
|
1022
|
-
}
|
|
1023
|
-
});
|
|
1024
|
-
|
|
1025
|
-
// src/commands/actions/tag/index.ts
|
|
1026
|
-
var tagCommand = defineCommand16({
|
|
1027
|
-
meta: {
|
|
1028
|
-
name: "tag",
|
|
1029
|
-
description: `Manage action tags. Subcommands: add, remove, list, create, update, delete.
|
|
1030
|
-
|
|
1031
|
-
Tags are company-wide. Add/remove operate on a specific action and stage on the draft (apply on publish). Create/update/delete operate on the tag definitions and apply immediately.
|
|
1032
|
-
|
|
1033
|
-
Examples:
|
|
1034
|
-
baker actions tag list
|
|
1035
|
-
baker actions tag create --slug copy --label Copy
|
|
1036
|
-
baker actions tag add <action-id> --slug copy
|
|
1037
|
-
baker actions tag remove <action-id> --slug copy
|
|
1038
|
-
baker actions tag update <tag-id> --label "Copywriting"
|
|
1039
|
-
baker actions tag delete <tag-id>`
|
|
1040
|
-
},
|
|
1041
|
-
subCommands: {
|
|
1042
|
-
list: listCommand2,
|
|
1043
|
-
add: addCommand,
|
|
1044
|
-
remove: removeCommand,
|
|
1045
|
-
create: createCommand2,
|
|
1046
|
-
update: updateCommand,
|
|
1047
|
-
delete: deleteCommand
|
|
1048
|
-
}
|
|
1049
|
-
});
|
|
1050
|
-
|
|
1051
774
|
// src/commands/actions/unlink.ts
|
|
1052
|
-
import { defineCommand as
|
|
775
|
+
import { defineCommand as defineCommand10 } from "citty";
|
|
1053
776
|
registerSchema({
|
|
1054
777
|
command: "actions.unlink",
|
|
1055
778
|
description: "Stage removal of a 'blocker -> blocked' dependency. The blocked action must be claimed by current chat.",
|
|
@@ -1058,7 +781,7 @@ registerSchema({
|
|
|
1058
781
|
blocked: { type: "string", description: "Blocked action ID (must be claimed by current chat)", required: true }
|
|
1059
782
|
}
|
|
1060
783
|
});
|
|
1061
|
-
var unlinkCommand =
|
|
784
|
+
var unlinkCommand = defineCommand10({
|
|
1062
785
|
meta: {
|
|
1063
786
|
name: "unlink",
|
|
1064
787
|
description: "Stage removal of a dependency. Example: baker actions unlink --blocker <id> --blocked <id>"
|
|
@@ -1090,7 +813,7 @@ var unlinkCommand = defineCommand17({
|
|
|
1090
813
|
});
|
|
1091
814
|
|
|
1092
815
|
// src/commands/actions/update.ts
|
|
1093
|
-
import { defineCommand as
|
|
816
|
+
import { defineCommand as defineCommand11 } from "citty";
|
|
1094
817
|
registerSchema({
|
|
1095
818
|
command: "actions.update",
|
|
1096
819
|
description: "Stage an update on a claimed action (name and/or description). Applies on publish.",
|
|
@@ -1100,7 +823,7 @@ registerSchema({
|
|
|
1100
823
|
description: { type: "string", description: "New description", required: false }
|
|
1101
824
|
}
|
|
1102
825
|
});
|
|
1103
|
-
var
|
|
826
|
+
var updateCommand = defineCommand11({
|
|
1104
827
|
meta: {
|
|
1105
828
|
name: "update",
|
|
1106
829
|
description: 'Stage an update on a claimed action. Example: baker actions update <id> --name "New name"'
|
|
@@ -1136,10 +859,10 @@ var updateCommand2 = defineCommand18({
|
|
|
1136
859
|
});
|
|
1137
860
|
|
|
1138
861
|
// src/commands/actions/index.ts
|
|
1139
|
-
var actionsCommand =
|
|
862
|
+
var actionsCommand = defineCommand12({
|
|
1140
863
|
meta: {
|
|
1141
864
|
name: "actions",
|
|
1142
|
-
description: `Manage action items for the current chat. Subcommands: list, get, status, claim, release, create, update, complete, discard, link, unlink
|
|
865
|
+
description: `Manage action items for the current chat. Subcommands: list, get, status, claim, release, create, update, complete, discard, link, unlink.
|
|
1143
866
|
|
|
1144
867
|
Lifecycle: claim an action before working on it. Stage create/complete/discard via this CLI; they apply when the chat is published. Release if you decide not to work on it after all.
|
|
1145
868
|
|
|
@@ -1147,11 +870,9 @@ Examples:
|
|
|
1147
870
|
baker actions list # bucketed view: claimable, myClaims, blocked, claimedByOthers
|
|
1148
871
|
baker actions status temp_hero jx123 # batch resolve real IDs and temp_* refs
|
|
1149
872
|
baker actions claim <id>
|
|
1150
|
-
baker actions create --name "Build hero" --description "..."
|
|
873
|
+
baker actions create --name "Build hero" --description "..."
|
|
1151
874
|
baker actions complete <id>
|
|
1152
|
-
baker actions discard <id> --reason "obsolete"
|
|
1153
|
-
baker actions tag list
|
|
1154
|
-
baker actions tag create --slug copy --label Copy`
|
|
875
|
+
baker actions discard <id> --reason "obsolete"`
|
|
1155
876
|
},
|
|
1156
877
|
subCommands: {
|
|
1157
878
|
list: listCommand,
|
|
@@ -1160,23 +881,22 @@ Examples:
|
|
|
1160
881
|
claim: claimCommand,
|
|
1161
882
|
release: releaseCommand,
|
|
1162
883
|
create: createCommand,
|
|
1163
|
-
update:
|
|
884
|
+
update: updateCommand,
|
|
1164
885
|
complete: completeCommand,
|
|
1165
886
|
discard: discardCommand,
|
|
1166
887
|
link: linkCommand,
|
|
1167
|
-
unlink: unlinkCommand
|
|
1168
|
-
tag: tagCommand
|
|
888
|
+
unlink: unlinkCommand
|
|
1169
889
|
}
|
|
1170
890
|
});
|
|
1171
891
|
|
|
1172
892
|
// src/commands/ads/index.ts
|
|
1173
|
-
import { defineCommand as
|
|
893
|
+
import { defineCommand as defineCommand71 } from "citty";
|
|
1174
894
|
|
|
1175
895
|
// src/commands/ads/google/index.ts
|
|
1176
|
-
import { defineCommand as
|
|
896
|
+
import { defineCommand as defineCommand23 } from "citty";
|
|
1177
897
|
|
|
1178
898
|
// src/commands/ads/google/accounts.ts
|
|
1179
|
-
import { defineCommand as
|
|
899
|
+
import { defineCommand as defineCommand13 } from "citty";
|
|
1180
900
|
|
|
1181
901
|
// src/commands/ads/cache.ts
|
|
1182
902
|
import { createHash } from "crypto";
|
|
@@ -1452,7 +1172,7 @@ function handleAccountsError(err) {
|
|
|
1452
1172
|
writeAdsJson({ ok: false, error: { code: "NETWORK_ERROR", message: "Unexpected error" } });
|
|
1453
1173
|
process.exit(1);
|
|
1454
1174
|
}
|
|
1455
|
-
var accountsCommand =
|
|
1175
|
+
var accountsCommand = defineCommand13({
|
|
1456
1176
|
meta: {
|
|
1457
1177
|
name: "accounts",
|
|
1458
1178
|
description: `List accessible Google Ads accounts. Returns customer IDs needed for all other commands.
|
|
@@ -1492,7 +1212,7 @@ Examples:
|
|
|
1492
1212
|
});
|
|
1493
1213
|
|
|
1494
1214
|
// src/commands/ads/google/changes.ts
|
|
1495
|
-
import { defineCommand as
|
|
1215
|
+
import { defineCommand as defineCommand14 } from "citty";
|
|
1496
1216
|
|
|
1497
1217
|
// src/commands/ads/field-descriptions.ts
|
|
1498
1218
|
var FIELD_DESCRIPTIONS = {
|
|
@@ -2044,7 +1764,7 @@ registerSchema({
|
|
|
2044
1764
|
output: { type: "string", description: "Format: json|csv|jsonl|md", required: false, default: "json" }
|
|
2045
1765
|
}
|
|
2046
1766
|
});
|
|
2047
|
-
var changesCommand =
|
|
1767
|
+
var changesCommand = defineCommand14({
|
|
2048
1768
|
meta: {
|
|
2049
1769
|
name: "changes",
|
|
2050
1770
|
description: `Get recent changes in a Google Ads account with performance data.
|
|
@@ -2095,7 +1815,7 @@ Examples:
|
|
|
2095
1815
|
});
|
|
2096
1816
|
|
|
2097
1817
|
// src/commands/ads/google/currency.ts
|
|
2098
|
-
import { defineCommand as
|
|
1818
|
+
import { defineCommand as defineCommand15 } from "citty";
|
|
2099
1819
|
registerSchema({
|
|
2100
1820
|
command: "ads.google.currency",
|
|
2101
1821
|
description: "Get the currency code for a Google Ads account. Returns currency_code, customer_id, account_name, and access_type. Call this before interpreting cost_micros values.",
|
|
@@ -2107,7 +1827,7 @@ registerSchema({
|
|
|
2107
1827
|
}
|
|
2108
1828
|
}
|
|
2109
1829
|
});
|
|
2110
|
-
var currencyCommand =
|
|
1830
|
+
var currencyCommand = defineCommand15({
|
|
2111
1831
|
meta: {
|
|
2112
1832
|
name: "currency",
|
|
2113
1833
|
description: `Get account currency code. Use this to interpret metrics.cost_micros values.
|
|
@@ -2156,10 +1876,10 @@ Examples:
|
|
|
2156
1876
|
});
|
|
2157
1877
|
|
|
2158
1878
|
// src/commands/ads/google/keywords/index.ts
|
|
2159
|
-
import { defineCommand as
|
|
1879
|
+
import { defineCommand as defineCommand20 } from "citty";
|
|
2160
1880
|
|
|
2161
1881
|
// src/commands/ads/google/keywords/discover.ts
|
|
2162
|
-
import { defineCommand as
|
|
1882
|
+
import { defineCommand as defineCommand16 } from "citty";
|
|
2163
1883
|
|
|
2164
1884
|
// src/geo-context.ts
|
|
2165
1885
|
var GOOGLE_ADS_LOCATIONS = [
|
|
@@ -2434,7 +2154,7 @@ function handleKeywordError(err) {
|
|
|
2434
2154
|
writeAdsJson({ ok: false, error: { code: "NETWORK_ERROR", message: "Unexpected error" } });
|
|
2435
2155
|
process.exit(1);
|
|
2436
2156
|
}
|
|
2437
|
-
var discoverCommand =
|
|
2157
|
+
var discoverCommand = defineCommand16({
|
|
2438
2158
|
meta: {
|
|
2439
2159
|
name: "discover",
|
|
2440
2160
|
description: `Discover new keyword ideas from seed keywords or competitor URLs.
|
|
@@ -2496,7 +2216,7 @@ Examples:
|
|
|
2496
2216
|
});
|
|
2497
2217
|
|
|
2498
2218
|
// src/commands/ads/google/keywords/languages.ts
|
|
2499
|
-
import { defineCommand as
|
|
2219
|
+
import { defineCommand as defineCommand17 } from "citty";
|
|
2500
2220
|
registerSchema({
|
|
2501
2221
|
command: "ads.google.keywords.languages",
|
|
2502
2222
|
description: "List all supported language IDs for --language flag in Google Ads keyword commands.",
|
|
@@ -2506,7 +2226,7 @@ var FIELDS = {
|
|
|
2506
2226
|
id: "Language ID to pass as --language",
|
|
2507
2227
|
name: "Language name"
|
|
2508
2228
|
};
|
|
2509
|
-
var languagesCommand =
|
|
2229
|
+
var languagesCommand = defineCommand17({
|
|
2510
2230
|
meta: {
|
|
2511
2231
|
name: "languages",
|
|
2512
2232
|
description: "List all supported language IDs for --language flag."
|
|
@@ -2517,7 +2237,7 @@ var languagesCommand = defineCommand24({
|
|
|
2517
2237
|
});
|
|
2518
2238
|
|
|
2519
2239
|
// src/commands/ads/google/keywords/locations.ts
|
|
2520
|
-
import { defineCommand as
|
|
2240
|
+
import { defineCommand as defineCommand18 } from "citty";
|
|
2521
2241
|
registerSchema({
|
|
2522
2242
|
command: "ads.google.keywords.locations",
|
|
2523
2243
|
description: "List all supported geo target IDs for --location flag in Google Ads keyword commands.",
|
|
@@ -2527,7 +2247,7 @@ var FIELDS2 = {
|
|
|
2527
2247
|
id: "Geo target ID to pass as --location",
|
|
2528
2248
|
name: "Country/region name"
|
|
2529
2249
|
};
|
|
2530
|
-
var locationsCommand =
|
|
2250
|
+
var locationsCommand = defineCommand18({
|
|
2531
2251
|
meta: {
|
|
2532
2252
|
name: "locations",
|
|
2533
2253
|
description: "List all supported geo target IDs for --location flag."
|
|
@@ -2538,7 +2258,7 @@ var locationsCommand = defineCommand25({
|
|
|
2538
2258
|
});
|
|
2539
2259
|
|
|
2540
2260
|
// src/commands/ads/google/keywords/metrics.ts
|
|
2541
|
-
import { defineCommand as
|
|
2261
|
+
import { defineCommand as defineCommand19 } from "citty";
|
|
2542
2262
|
registerSchema({
|
|
2543
2263
|
command: "ads.google.keywords.metrics",
|
|
2544
2264
|
description: "Get historical metrics for specific keywords. Returns { historical_metrics: [...] } with snake_case fields matching the Google Ads API. IMPORTANT: If --location and --language are omitted, defaults to United States (2840) and English (1000). The response includes a query_context object showing which location/language were used.",
|
|
@@ -2562,7 +2282,7 @@ registerSchema({
|
|
|
2562
2282
|
output: { type: "string", description: "Format: json|csv|jsonl|md", required: false, default: "json" }
|
|
2563
2283
|
}
|
|
2564
2284
|
});
|
|
2565
|
-
var metricsCommand =
|
|
2285
|
+
var metricsCommand = defineCommand19({
|
|
2566
2286
|
meta: {
|
|
2567
2287
|
name: "metrics",
|
|
2568
2288
|
description: `Get historical search metrics for specific keywords.
|
|
@@ -2649,7 +2369,7 @@ Examples:
|
|
|
2649
2369
|
});
|
|
2650
2370
|
|
|
2651
2371
|
// src/commands/ads/google/keywords/index.ts
|
|
2652
|
-
var keywordsCommand =
|
|
2372
|
+
var keywordsCommand = defineCommand20({
|
|
2653
2373
|
meta: {
|
|
2654
2374
|
name: "keywords",
|
|
2655
2375
|
description: `Keyword research tools. Subcommands: discover, metrics, locations, languages.
|
|
@@ -2669,8 +2389,8 @@ Examples:
|
|
|
2669
2389
|
});
|
|
2670
2390
|
|
|
2671
2391
|
// src/commands/ads/google/library/index.ts
|
|
2672
|
-
import { defineCommand as
|
|
2673
|
-
var listAdvertisers =
|
|
2392
|
+
import { defineCommand as defineCommand21 } from "citty";
|
|
2393
|
+
var listAdvertisers = defineCommand21({
|
|
2674
2394
|
meta: {
|
|
2675
2395
|
name: "list-advertisers",
|
|
2676
2396
|
description: "List tracked Google advertisers and their accounts"
|
|
@@ -2687,7 +2407,7 @@ var listAdvertisers = defineCommand28({
|
|
|
2687
2407
|
}
|
|
2688
2408
|
}
|
|
2689
2409
|
});
|
|
2690
|
-
var syncStatus =
|
|
2410
|
+
var syncStatus = defineCommand21({
|
|
2691
2411
|
meta: {
|
|
2692
2412
|
name: "sync-status",
|
|
2693
2413
|
description: "Check the sync status and ad counts of a Google account"
|
|
@@ -2707,7 +2427,7 @@ var syncStatus = defineCommand28({
|
|
|
2707
2427
|
writeAdsJson({ ok: true, data });
|
|
2708
2428
|
}
|
|
2709
2429
|
});
|
|
2710
|
-
var searchAds =
|
|
2430
|
+
var searchAds = defineCommand21({
|
|
2711
2431
|
meta: {
|
|
2712
2432
|
name: "search-ads",
|
|
2713
2433
|
description: "Search and filter Google ads for an account"
|
|
@@ -2764,7 +2484,7 @@ var searchAds = defineCommand28({
|
|
|
2764
2484
|
}
|
|
2765
2485
|
}
|
|
2766
2486
|
});
|
|
2767
|
-
var searchAdvertiser =
|
|
2487
|
+
var searchAdvertiser = defineCommand21({
|
|
2768
2488
|
meta: {
|
|
2769
2489
|
name: "search-advertiser",
|
|
2770
2490
|
description: "Search for an advertiser on the Google Ads Transparency Center"
|
|
@@ -2799,7 +2519,7 @@ var searchAdvertiser = defineCommand28({
|
|
|
2799
2519
|
function sleep(ms) {
|
|
2800
2520
|
return new Promise((resolve5) => setTimeout(resolve5, ms));
|
|
2801
2521
|
}
|
|
2802
|
-
var track =
|
|
2522
|
+
var track = defineCommand21({
|
|
2803
2523
|
meta: {
|
|
2804
2524
|
name: "track",
|
|
2805
2525
|
description: "Track a new Google advertiser (from search results). Waits for initial sync to complete before returning."
|
|
@@ -2857,7 +2577,7 @@ var track = defineCommand28({
|
|
|
2857
2577
|
process.exit(1);
|
|
2858
2578
|
}
|
|
2859
2579
|
});
|
|
2860
|
-
var sync =
|
|
2580
|
+
var sync = defineCommand21({
|
|
2861
2581
|
meta: {
|
|
2862
2582
|
name: "sync",
|
|
2863
2583
|
description: "Trigger an immediate sync for a Google account. Waits for completion before returning."
|
|
@@ -2901,7 +2621,7 @@ var sync = defineCommand28({
|
|
|
2901
2621
|
process.exit(1);
|
|
2902
2622
|
}
|
|
2903
2623
|
});
|
|
2904
|
-
var searchCompetitors =
|
|
2624
|
+
var searchCompetitors = defineCommand21({
|
|
2905
2625
|
meta: {
|
|
2906
2626
|
name: "search-competitors",
|
|
2907
2627
|
description: "Search for competitors running Google ads for a keyword (DataForSEO)"
|
|
@@ -2933,7 +2653,7 @@ var searchCompetitors = defineCommand28({
|
|
|
2933
2653
|
}
|
|
2934
2654
|
}
|
|
2935
2655
|
});
|
|
2936
|
-
var library =
|
|
2656
|
+
var library = defineCommand21({
|
|
2937
2657
|
meta: {
|
|
2938
2658
|
name: "library",
|
|
2939
2659
|
description: "Manage and search the Google Ads Library"
|
|
@@ -2952,7 +2672,7 @@ var library = defineCommand28({
|
|
|
2952
2672
|
// src/commands/ads/google/query.ts
|
|
2953
2673
|
import { appendFileSync, existsSync as existsSync2, readFileSync as readFileSync2, writeFileSync as writeFileSync2 } from "fs";
|
|
2954
2674
|
import { resolve } from "path";
|
|
2955
|
-
import { defineCommand as
|
|
2675
|
+
import { defineCommand as defineCommand22 } from "citty";
|
|
2956
2676
|
|
|
2957
2677
|
// src/commands/ads/google/preflight.ts
|
|
2958
2678
|
function buildCommand2(query, customerId) {
|
|
@@ -3408,7 +3128,7 @@ function handleQueryError(err, finalQuery, customerId) {
|
|
|
3408
3128
|
});
|
|
3409
3129
|
process.exit(1);
|
|
3410
3130
|
}
|
|
3411
|
-
var queryCommand =
|
|
3131
|
+
var queryCommand = defineCommand22({
|
|
3412
3132
|
meta: {
|
|
3413
3133
|
name: "query",
|
|
3414
3134
|
description: `Run GAQL queries against Google Ads. Supports raw GAQL, presets, pagination, file export, and caching.
|
|
@@ -3466,7 +3186,7 @@ Examples:
|
|
|
3466
3186
|
});
|
|
3467
3187
|
|
|
3468
3188
|
// src/commands/ads/google/index.ts
|
|
3469
|
-
var googleCommand =
|
|
3189
|
+
var googleCommand = defineCommand23({
|
|
3470
3190
|
meta: {
|
|
3471
3191
|
name: "google",
|
|
3472
3192
|
description: `Google Ads commands. Query campaigns, keywords, search terms, and more via GAQL.
|
|
@@ -3494,7 +3214,7 @@ Examples:
|
|
|
3494
3214
|
});
|
|
3495
3215
|
|
|
3496
3216
|
// src/commands/ads/linkedin/index.ts
|
|
3497
|
-
import { defineCommand as
|
|
3217
|
+
import { defineCommand as defineCommand40 } from "citty";
|
|
3498
3218
|
|
|
3499
3219
|
// src/commands/ads/linkedin/schemas.ts
|
|
3500
3220
|
registerSchema({
|
|
@@ -3794,7 +3514,7 @@ registerSchema({
|
|
|
3794
3514
|
});
|
|
3795
3515
|
|
|
3796
3516
|
// src/commands/ads/linkedin/account.ts
|
|
3797
|
-
import { defineCommand as
|
|
3517
|
+
import { defineCommand as defineCommand24 } from "citty";
|
|
3798
3518
|
|
|
3799
3519
|
// src/commands/ads/linkedin/shared.ts
|
|
3800
3520
|
var DAY_MS = 864e5;
|
|
@@ -3897,7 +3617,7 @@ function resolveStatusFilter(args) {
|
|
|
3897
3617
|
}
|
|
3898
3618
|
|
|
3899
3619
|
// src/commands/ads/linkedin/account.ts
|
|
3900
|
-
var accountCommand =
|
|
3620
|
+
var accountCommand = defineCommand24({
|
|
3901
3621
|
meta: {
|
|
3902
3622
|
name: "account",
|
|
3903
3623
|
description: `Single LinkedIn ad account detail (currency, status, type).
|
|
@@ -3931,9 +3651,9 @@ Examples:
|
|
|
3931
3651
|
});
|
|
3932
3652
|
|
|
3933
3653
|
// src/commands/ads/linkedin/accounts.ts
|
|
3934
|
-
import { defineCommand as
|
|
3654
|
+
import { defineCommand as defineCommand25 } from "citty";
|
|
3935
3655
|
var ACCOUNTS_TTL_MS = 60 * 60 * 1e3;
|
|
3936
|
-
var accountsCommand2 =
|
|
3656
|
+
var accountsCommand2 = defineCommand25({
|
|
3937
3657
|
meta: {
|
|
3938
3658
|
name: "accounts",
|
|
3939
3659
|
description: `List LinkedIn ad accounts in this company's connected scope.
|
|
@@ -3981,7 +3701,7 @@ Examples:
|
|
|
3981
3701
|
});
|
|
3982
3702
|
|
|
3983
3703
|
// src/commands/ads/linkedin/analytics.ts
|
|
3984
|
-
import { defineCommand as
|
|
3704
|
+
import { defineCommand as defineCommand26 } from "citty";
|
|
3985
3705
|
|
|
3986
3706
|
// src/commands/ads/linkedin/presets.ts
|
|
3987
3707
|
var INTENTS = {
|
|
@@ -4253,7 +3973,7 @@ function numberOf(v) {
|
|
|
4253
3973
|
}
|
|
4254
3974
|
return 0;
|
|
4255
3975
|
}
|
|
4256
|
-
var analyticsCommand =
|
|
3976
|
+
var analyticsCommand = defineCommand26({
|
|
4257
3977
|
meta: {
|
|
4258
3978
|
name: "analytics",
|
|
4259
3979
|
description: `Performance reporting \u2014 the workhorse for AI agents.
|
|
@@ -4381,7 +4101,7 @@ Examples \u2014 common AI questions:
|
|
|
4381
4101
|
|
|
4382
4102
|
// src/commands/ads/linkedin/audience-size.ts
|
|
4383
4103
|
import { readFileSync as readFileSync3 } from "fs";
|
|
4384
|
-
import { defineCommand as
|
|
4104
|
+
import { defineCommand as defineCommand27 } from "citty";
|
|
4385
4105
|
function loadTargeting(args) {
|
|
4386
4106
|
const inline = args.targeting;
|
|
4387
4107
|
if (inline) {
|
|
@@ -4403,7 +4123,7 @@ function loadTargeting(args) {
|
|
|
4403
4123
|
}
|
|
4404
4124
|
handleLinkedinError(new Error("Pass --targeting-file <path> or --targeting '{...JSON...}'"));
|
|
4405
4125
|
}
|
|
4406
|
-
var audienceSizeCommand =
|
|
4126
|
+
var audienceSizeCommand = defineCommand27({
|
|
4407
4127
|
meta: {
|
|
4408
4128
|
name: "audience-size",
|
|
4409
4129
|
description: `Estimate audience size for a targeting payload \u2014 pre-launch sanity check.
|
|
@@ -4448,7 +4168,7 @@ Examples:
|
|
|
4448
4168
|
});
|
|
4449
4169
|
|
|
4450
4170
|
// src/commands/ads/linkedin/audit.ts
|
|
4451
|
-
import { defineCommand as
|
|
4171
|
+
import { defineCommand as defineCommand28 } from "citty";
|
|
4452
4172
|
var SEVERITY_RANK = {
|
|
4453
4173
|
critical: 0,
|
|
4454
4174
|
high: 1,
|
|
@@ -4507,7 +4227,7 @@ function noteOf(f) {
|
|
|
4507
4227
|
const fix = f.fix?.explanation ?? "";
|
|
4508
4228
|
return [fix, ev].filter(Boolean).join(" \u2014 ");
|
|
4509
4229
|
}
|
|
4510
|
-
var auditCommand =
|
|
4230
|
+
var auditCommand = defineCommand28({
|
|
4511
4231
|
meta: {
|
|
4512
4232
|
name: "audit",
|
|
4513
4233
|
description: `Run a LinkedIn Ads playbook audit \u2014 30+ checks across Settings, Tracking,
|
|
@@ -4574,7 +4294,7 @@ Examples:
|
|
|
4574
4294
|
|
|
4575
4295
|
// src/commands/ads/linkedin/bid-pricing.ts
|
|
4576
4296
|
import { readFileSync as readFileSync4 } from "fs";
|
|
4577
|
-
import { defineCommand as
|
|
4297
|
+
import { defineCommand as defineCommand29 } from "citty";
|
|
4578
4298
|
function loadTargeting2(args) {
|
|
4579
4299
|
const inline = args.targeting;
|
|
4580
4300
|
if (inline) {
|
|
@@ -4596,7 +4316,7 @@ function loadTargeting2(args) {
|
|
|
4596
4316
|
}
|
|
4597
4317
|
handleLinkedinError(new Error("Pass --targeting-file <path> or --targeting '{...JSON...}'"));
|
|
4598
4318
|
}
|
|
4599
|
-
var bidPricingCommand =
|
|
4319
|
+
var bidPricingCommand = defineCommand29({
|
|
4600
4320
|
meta: {
|
|
4601
4321
|
name: "bid-pricing",
|
|
4602
4322
|
description: `Get LinkedIn's suggested bid range for a targeting + objective + cost type.
|
|
@@ -4646,8 +4366,8 @@ Examples:
|
|
|
4646
4366
|
});
|
|
4647
4367
|
|
|
4648
4368
|
// src/commands/ads/linkedin/campaign-groups.ts
|
|
4649
|
-
import { defineCommand as
|
|
4650
|
-
var campaignGroupsCommand =
|
|
4369
|
+
import { defineCommand as defineCommand30 } from "citty";
|
|
4370
|
+
var campaignGroupsCommand = defineCommand30({
|
|
4651
4371
|
meta: {
|
|
4652
4372
|
name: "campaign-groups",
|
|
4653
4373
|
description: `List LinkedIn campaign groups.
|
|
@@ -4690,8 +4410,8 @@ Examples:
|
|
|
4690
4410
|
});
|
|
4691
4411
|
|
|
4692
4412
|
// src/commands/ads/linkedin/campaigns.ts
|
|
4693
|
-
import { defineCommand as
|
|
4694
|
-
var campaignsCommand =
|
|
4413
|
+
import { defineCommand as defineCommand31 } from "citty";
|
|
4414
|
+
var campaignsCommand = defineCommand31({
|
|
4695
4415
|
meta: {
|
|
4696
4416
|
name: "campaigns",
|
|
4697
4417
|
description: `List LinkedIn campaigns.
|
|
@@ -4740,8 +4460,8 @@ Examples:
|
|
|
4740
4460
|
});
|
|
4741
4461
|
|
|
4742
4462
|
// src/commands/ads/linkedin/conversation.ts
|
|
4743
|
-
import { defineCommand as
|
|
4744
|
-
var conversationCommand =
|
|
4463
|
+
import { defineCommand as defineCommand32 } from "citty";
|
|
4464
|
+
var conversationCommand = defineCommand32({
|
|
4745
4465
|
meta: {
|
|
4746
4466
|
name: "conversation",
|
|
4747
4467
|
description: `Per-button click rates inside Sponsored Messaging / Conversation Ads.
|
|
@@ -4804,7 +4524,7 @@ Examples:
|
|
|
4804
4524
|
});
|
|
4805
4525
|
|
|
4806
4526
|
// src/commands/ads/linkedin/conversions.ts
|
|
4807
|
-
import { defineCommand as
|
|
4527
|
+
import { defineCommand as defineCommand33 } from "citty";
|
|
4808
4528
|
var DAY_MS2 = 864e5;
|
|
4809
4529
|
function healthOf(rules) {
|
|
4810
4530
|
const enabled = rules.filter((r) => r.enabled !== false);
|
|
@@ -4830,7 +4550,7 @@ function healthOf(rules) {
|
|
|
4830
4550
|
wrongLeadDedup: wrongDedup
|
|
4831
4551
|
};
|
|
4832
4552
|
}
|
|
4833
|
-
var listCmd =
|
|
4553
|
+
var listCmd = defineCommand33({
|
|
4834
4554
|
meta: {
|
|
4835
4555
|
name: "list",
|
|
4836
4556
|
description: `List conversion rules on the account.`
|
|
@@ -4858,7 +4578,7 @@ var listCmd = defineCommand40({
|
|
|
4858
4578
|
}
|
|
4859
4579
|
}
|
|
4860
4580
|
});
|
|
4861
|
-
var healthCmd =
|
|
4581
|
+
var healthCmd = defineCommand33({
|
|
4862
4582
|
meta: {
|
|
4863
4583
|
name: "health",
|
|
4864
4584
|
description: `5-point Insight Tag / CAPI health check (playbook \xA707).
|
|
@@ -4888,7 +4608,7 @@ Surfaces:
|
|
|
4888
4608
|
}
|
|
4889
4609
|
}
|
|
4890
4610
|
});
|
|
4891
|
-
var conversionsCommand =
|
|
4611
|
+
var conversionsCommand = defineCommand33({
|
|
4892
4612
|
meta: {
|
|
4893
4613
|
name: "conversions",
|
|
4894
4614
|
description: `Conversion rules \u2014 Insight Tag and Conversions API.
|
|
@@ -4904,8 +4624,8 @@ Subcommands:
|
|
|
4904
4624
|
});
|
|
4905
4625
|
|
|
4906
4626
|
// src/commands/ads/linkedin/creatives.ts
|
|
4907
|
-
import { defineCommand as
|
|
4908
|
-
var creativesCommand =
|
|
4627
|
+
import { defineCommand as defineCommand34 } from "citty";
|
|
4628
|
+
var creativesCommand = defineCommand34({
|
|
4909
4629
|
meta: {
|
|
4910
4630
|
name: "creatives",
|
|
4911
4631
|
description: `List LinkedIn creatives (ads).
|
|
@@ -4954,7 +4674,7 @@ Examples:
|
|
|
4954
4674
|
});
|
|
4955
4675
|
|
|
4956
4676
|
// src/commands/ads/linkedin/demographics.ts
|
|
4957
|
-
import { defineCommand as
|
|
4677
|
+
import { defineCommand as defineCommand35 } from "citty";
|
|
4958
4678
|
var DEFAULT_PIVOTS = ["job-title", "company", "industry", "seniority", "job-function", "company-size"];
|
|
4959
4679
|
function numberOf2(v) {
|
|
4960
4680
|
if (typeof v === "number") return Number.isFinite(v) ? v : 0;
|
|
@@ -4967,7 +4687,7 @@ function numberOf2(v) {
|
|
|
4967
4687
|
function topByImpressions(rows, limit) {
|
|
4968
4688
|
return [...rows].sort((a, b) => numberOf2(b.impressions) - numberOf2(a.impressions)).slice(0, limit);
|
|
4969
4689
|
}
|
|
4970
|
-
var demographicsCommand =
|
|
4690
|
+
var demographicsCommand = defineCommand35({
|
|
4971
4691
|
meta: {
|
|
4972
4692
|
name: "demographics",
|
|
4973
4693
|
description: `Sweep all firmographic pivots in one command \u2014 LinkedIn's superpower.
|
|
@@ -5064,8 +4784,8 @@ function resolveRange(args) {
|
|
|
5064
4784
|
}
|
|
5065
4785
|
|
|
5066
4786
|
// src/commands/ads/linkedin/facets.ts
|
|
5067
|
-
import { defineCommand as
|
|
5068
|
-
var listCmd2 =
|
|
4787
|
+
import { defineCommand as defineCommand36 } from "citty";
|
|
4788
|
+
var listCmd2 = defineCommand36({
|
|
5069
4789
|
meta: {
|
|
5070
4790
|
name: "list",
|
|
5071
4791
|
description: `List every targeting facet LinkedIn supports.
|
|
@@ -5093,7 +4813,7 @@ seniorities, titles, employers, growthRate, companyCategory, skills, etc.).`
|
|
|
5093
4813
|
}
|
|
5094
4814
|
}
|
|
5095
4815
|
});
|
|
5096
|
-
var valuesCmd =
|
|
4816
|
+
var valuesCmd = defineCommand36({
|
|
5097
4817
|
meta: {
|
|
5098
4818
|
name: "values",
|
|
5099
4819
|
description: `Look up entity values for a single facet \u2014 full list or typeahead search.
|
|
@@ -5134,7 +4854,7 @@ or the full URN (urn:li:adTargetingFacet:industries).`
|
|
|
5134
4854
|
}
|
|
5135
4855
|
}
|
|
5136
4856
|
});
|
|
5137
|
-
var facetsCommand =
|
|
4857
|
+
var facetsCommand = defineCommand36({
|
|
5138
4858
|
meta: {
|
|
5139
4859
|
name: "facets",
|
|
5140
4860
|
description: `LinkedIn targeting facets and entity lookup.
|
|
@@ -5152,7 +4872,7 @@ Subcommands:
|
|
|
5152
4872
|
|
|
5153
4873
|
// src/commands/ads/linkedin/forecast.ts
|
|
5154
4874
|
import { readFileSync as readFileSync5 } from "fs";
|
|
5155
|
-
import { defineCommand as
|
|
4875
|
+
import { defineCommand as defineCommand37 } from "citty";
|
|
5156
4876
|
function loadTargeting3(args) {
|
|
5157
4877
|
const inline = args.targeting;
|
|
5158
4878
|
if (inline) {
|
|
@@ -5182,7 +4902,7 @@ function parseMoney(raw) {
|
|
|
5182
4902
|
}
|
|
5183
4903
|
return { amount: m[1] ?? "0", currencyCode: m[2] ?? "USD" };
|
|
5184
4904
|
}
|
|
5185
|
-
var forecastCommand =
|
|
4905
|
+
var forecastCommand = defineCommand37({
|
|
5186
4906
|
meta: {
|
|
5187
4907
|
name: "forecast",
|
|
5188
4908
|
description: `Forecast reach + impressions + clicks + spend for a hypothetical campaign.
|
|
@@ -5229,9 +4949,9 @@ Examples:
|
|
|
5229
4949
|
});
|
|
5230
4950
|
|
|
5231
4951
|
// src/commands/ads/linkedin/leads.ts
|
|
5232
|
-
import { defineCommand as
|
|
4952
|
+
import { defineCommand as defineCommand38 } from "citty";
|
|
5233
4953
|
var DAY_MS3 = 864e5;
|
|
5234
|
-
var leadsCommand =
|
|
4954
|
+
var leadsCommand = defineCommand38({
|
|
5235
4955
|
meta: {
|
|
5236
4956
|
name: "leads",
|
|
5237
4957
|
description: `List Lead Gen Form responses (playbook \xA707).
|
|
@@ -5291,8 +5011,8 @@ Examples:
|
|
|
5291
5011
|
});
|
|
5292
5012
|
|
|
5293
5013
|
// src/commands/ads/linkedin/top-companies.ts
|
|
5294
|
-
import { defineCommand as
|
|
5295
|
-
var topCompaniesCommand =
|
|
5014
|
+
import { defineCommand as defineCommand39 } from "citty";
|
|
5015
|
+
var topCompaniesCommand = defineCommand39({
|
|
5296
5016
|
meta: {
|
|
5297
5017
|
name: "top-companies",
|
|
5298
5018
|
description: `Top companies whose employees saw / clicked / converted on a campaign.
|
|
@@ -5363,7 +5083,7 @@ Examples:
|
|
|
5363
5083
|
});
|
|
5364
5084
|
|
|
5365
5085
|
// src/commands/ads/linkedin/index.ts
|
|
5366
|
-
var linkedinCommand =
|
|
5086
|
+
var linkedinCommand = defineCommand40({
|
|
5367
5087
|
meta: {
|
|
5368
5088
|
name: "linkedin",
|
|
5369
5089
|
description: `LinkedIn Marketing API \u2014 AI-first command surface for B2B ad insights.
|
|
@@ -5413,10 +5133,10 @@ Account ID format:
|
|
|
5413
5133
|
});
|
|
5414
5134
|
|
|
5415
5135
|
// src/commands/ads/meta/index.ts
|
|
5416
|
-
import { defineCommand as
|
|
5136
|
+
import { defineCommand as defineCommand53 } from "citty";
|
|
5417
5137
|
|
|
5418
5138
|
// src/commands/ads/meta/account.ts
|
|
5419
|
-
import { defineCommand as
|
|
5139
|
+
import { defineCommand as defineCommand41 } from "citty";
|
|
5420
5140
|
|
|
5421
5141
|
// src/commands/ads/meta/shared.ts
|
|
5422
5142
|
var DAY_MS4 = 864e5;
|
|
@@ -5495,7 +5215,7 @@ function resolveEffectiveStatus(args) {
|
|
|
5495
5215
|
}
|
|
5496
5216
|
|
|
5497
5217
|
// src/commands/ads/meta/account.ts
|
|
5498
|
-
var accountCommand2 =
|
|
5218
|
+
var accountCommand2 = defineCommand41({
|
|
5499
5219
|
meta: {
|
|
5500
5220
|
name: "account",
|
|
5501
5221
|
description: `Show single Meta ad account detail (currency, timezone, balance, business).
|
|
@@ -5522,8 +5242,8 @@ Examples:
|
|
|
5522
5242
|
});
|
|
5523
5243
|
|
|
5524
5244
|
// src/commands/ads/meta/accounts.ts
|
|
5525
|
-
import { defineCommand as
|
|
5526
|
-
var accountsCommand3 =
|
|
5245
|
+
import { defineCommand as defineCommand42 } from "citty";
|
|
5246
|
+
var accountsCommand3 = defineCommand42({
|
|
5527
5247
|
meta: {
|
|
5528
5248
|
name: "accounts",
|
|
5529
5249
|
description: `List Meta ad accounts in this company's connected scope.
|
|
@@ -5571,8 +5291,8 @@ Examples:
|
|
|
5571
5291
|
});
|
|
5572
5292
|
|
|
5573
5293
|
// src/commands/ads/meta/activities.ts
|
|
5574
|
-
import { defineCommand as
|
|
5575
|
-
var activitiesCommand =
|
|
5294
|
+
import { defineCommand as defineCommand43 } from "citty";
|
|
5295
|
+
var activitiesCommand = defineCommand43({
|
|
5576
5296
|
meta: {
|
|
5577
5297
|
name: "activities",
|
|
5578
5298
|
description: `Audit log of recent ad-account changes (created, paused, edited). Default lookback 7 days,
|
|
@@ -5609,8 +5329,8 @@ Examples:
|
|
|
5609
5329
|
});
|
|
5610
5330
|
|
|
5611
5331
|
// src/commands/ads/meta/ads.ts
|
|
5612
|
-
import { defineCommand as
|
|
5613
|
-
var adsListCommand =
|
|
5332
|
+
import { defineCommand as defineCommand44 } from "citty";
|
|
5333
|
+
var adsListCommand = defineCommand44({
|
|
5614
5334
|
meta: {
|
|
5615
5335
|
name: "ads",
|
|
5616
5336
|
description: `List ads in a Meta ad account. Defaults to ACTIVE only \u2014 pass --all-statuses to widen.
|
|
@@ -5658,8 +5378,8 @@ Examples:
|
|
|
5658
5378
|
});
|
|
5659
5379
|
|
|
5660
5380
|
// src/commands/ads/meta/adsets.ts
|
|
5661
|
-
import { defineCommand as
|
|
5662
|
-
var adsetsCommand =
|
|
5381
|
+
import { defineCommand as defineCommand45 } from "citty";
|
|
5382
|
+
var adsetsCommand = defineCommand45({
|
|
5663
5383
|
meta: {
|
|
5664
5384
|
name: "adsets",
|
|
5665
5385
|
description: `List ad sets in a Meta ad account, optionally scoped to one campaign. Defaults to ACTIVE only.
|
|
@@ -5701,8 +5421,8 @@ Examples:
|
|
|
5701
5421
|
});
|
|
5702
5422
|
|
|
5703
5423
|
// src/commands/ads/meta/audiences.ts
|
|
5704
|
-
import { defineCommand as
|
|
5705
|
-
var audiencesCommand =
|
|
5424
|
+
import { defineCommand as defineCommand46 } from "citty";
|
|
5425
|
+
var audiencesCommand = defineCommand46({
|
|
5706
5426
|
meta: {
|
|
5707
5427
|
name: "audiences",
|
|
5708
5428
|
description: `List custom audiences for a Meta ad account. Includes lookalikes, website-pixel audiences,
|
|
@@ -5737,8 +5457,8 @@ Examples:
|
|
|
5737
5457
|
});
|
|
5738
5458
|
|
|
5739
5459
|
// src/commands/ads/meta/businesses.ts
|
|
5740
|
-
import { defineCommand as
|
|
5741
|
-
var businessesCommand =
|
|
5460
|
+
import { defineCommand as defineCommand47 } from "citty";
|
|
5461
|
+
var businessesCommand = defineCommand47({
|
|
5742
5462
|
meta: {
|
|
5743
5463
|
name: "businesses",
|
|
5744
5464
|
description: `List Meta Business Manager accounts the connected user has access to. Required for ad-studies and product-catalogs commands.
|
|
@@ -5768,8 +5488,8 @@ Examples:
|
|
|
5768
5488
|
});
|
|
5769
5489
|
|
|
5770
5490
|
// src/commands/ads/meta/campaigns.ts
|
|
5771
|
-
import { defineCommand as
|
|
5772
|
-
var campaignsCommand2 =
|
|
5491
|
+
import { defineCommand as defineCommand48 } from "citty";
|
|
5492
|
+
var campaignsCommand2 = defineCommand48({
|
|
5773
5493
|
meta: {
|
|
5774
5494
|
name: "campaigns",
|
|
5775
5495
|
description: `List campaigns for a Meta ad account. Defaults to ACTIVE only \u2014 pass --all-statuses to widen.
|
|
@@ -5813,8 +5533,8 @@ Examples:
|
|
|
5813
5533
|
});
|
|
5814
5534
|
|
|
5815
5535
|
// src/commands/ads/meta/creatives.ts
|
|
5816
|
-
import { defineCommand as
|
|
5817
|
-
var creativesCommand2 =
|
|
5536
|
+
import { defineCommand as defineCommand49 } from "citty";
|
|
5537
|
+
var creativesCommand2 = defineCommand49({
|
|
5818
5538
|
meta: {
|
|
5819
5539
|
name: "creatives",
|
|
5820
5540
|
description: `List ad creatives in an account, or fetch a single creative by ID.
|
|
@@ -5858,7 +5578,7 @@ Examples:
|
|
|
5858
5578
|
});
|
|
5859
5579
|
|
|
5860
5580
|
// src/commands/ads/meta/insights.ts
|
|
5861
|
-
import { defineCommand as
|
|
5581
|
+
import { defineCommand as defineCommand50 } from "citty";
|
|
5862
5582
|
|
|
5863
5583
|
// src/commands/ads/meta/presets.ts
|
|
5864
5584
|
var INSIGHTS_INTENTS = {
|
|
@@ -6063,7 +5783,7 @@ function sortRowsBySpendDesc(rows) {
|
|
|
6063
5783
|
return sb - sa;
|
|
6064
5784
|
});
|
|
6065
5785
|
}
|
|
6066
|
-
var insightsCommand =
|
|
5786
|
+
var insightsCommand = defineCommand50({
|
|
6067
5787
|
meta: {
|
|
6068
5788
|
name: "insights",
|
|
6069
5789
|
description: `Performance reporting \u2014 the main Meta tool for AI agents.
|
|
@@ -6164,8 +5884,8 @@ Async is automatic for heavy queries; pass --async to force it, or --no-async to
|
|
|
6164
5884
|
});
|
|
6165
5885
|
|
|
6166
5886
|
// src/commands/ads/meta/pixels.ts
|
|
6167
|
-
import { defineCommand as
|
|
6168
|
-
var pixelsCommand =
|
|
5887
|
+
import { defineCommand as defineCommand51 } from "citty";
|
|
5888
|
+
var pixelsCommand = defineCommand51({
|
|
6169
5889
|
meta: {
|
|
6170
5890
|
name: "pixels",
|
|
6171
5891
|
description: `List Meta Pixels for an ad account, or fetch firing stats for one pixel.
|
|
@@ -6236,7 +5956,7 @@ function emit(data, args) {
|
|
|
6236
5956
|
|
|
6237
5957
|
// src/commands/ads/meta/preview.ts
|
|
6238
5958
|
import { writeFileSync as writeFileSync3 } from "fs";
|
|
6239
|
-
import { defineCommand as
|
|
5959
|
+
import { defineCommand as defineCommand52 } from "citty";
|
|
6240
5960
|
var VALID_AD_FORMATS = [
|
|
6241
5961
|
"DESKTOP_FEED_STANDARD",
|
|
6242
5962
|
"MOBILE_FEED_STANDARD",
|
|
@@ -6270,7 +5990,7 @@ var VALID_AD_FORMATS = [
|
|
|
6270
5990
|
"MARKETPLACE_MOBILE",
|
|
6271
5991
|
"BIZ_DISCO_FEED_MOBILE"
|
|
6272
5992
|
];
|
|
6273
|
-
var previewCommand =
|
|
5993
|
+
var previewCommand = defineCommand52({
|
|
6274
5994
|
meta: {
|
|
6275
5995
|
name: "preview",
|
|
6276
5996
|
description: `Generate a Meta-hosted preview iframe for a creative or ad. Returns iframe HTML which you
|
|
@@ -6317,7 +6037,7 @@ Examples:
|
|
|
6317
6037
|
});
|
|
6318
6038
|
|
|
6319
6039
|
// src/commands/ads/meta/index.ts
|
|
6320
|
-
var metaCommand =
|
|
6040
|
+
var metaCommand = defineCommand53({
|
|
6321
6041
|
meta: {
|
|
6322
6042
|
name: "meta",
|
|
6323
6043
|
description: `Meta Marketing API \u2014 AI-first command surface (Facebook + Instagram ads).
|
|
@@ -6369,10 +6089,10 @@ Audit & review:
|
|
|
6369
6089
|
});
|
|
6370
6090
|
|
|
6371
6091
|
// src/commands/ads/x/index.ts
|
|
6372
|
-
import { defineCommand as
|
|
6092
|
+
import { defineCommand as defineCommand70 } from "citty";
|
|
6373
6093
|
|
|
6374
6094
|
// src/commands/ads/x/accounts.ts
|
|
6375
|
-
import { defineCommand as
|
|
6095
|
+
import { defineCommand as defineCommand54 } from "citty";
|
|
6376
6096
|
registerSchema({
|
|
6377
6097
|
command: "ads.x.accounts",
|
|
6378
6098
|
description: "List all accessible X Ads accounts. Returns accounts with id (base36), name, approval_status, timezone, currency. Run this first to find account IDs for other commands.",
|
|
@@ -6400,7 +6120,7 @@ function handleAccountsError2(err) {
|
|
|
6400
6120
|
writeAdsJson({ ok: false, error: { code: "NETWORK_ERROR", message: "Unexpected error" } });
|
|
6401
6121
|
process.exit(1);
|
|
6402
6122
|
}
|
|
6403
|
-
var accountsCommand4 =
|
|
6123
|
+
var accountsCommand4 = defineCommand54({
|
|
6404
6124
|
meta: {
|
|
6405
6125
|
name: "accounts",
|
|
6406
6126
|
description: `List accessible X Ads accounts. Returns account IDs needed for all other commands.
|
|
@@ -6440,7 +6160,7 @@ Examples:
|
|
|
6440
6160
|
});
|
|
6441
6161
|
|
|
6442
6162
|
// src/commands/ads/x/active-entities.ts
|
|
6443
|
-
import { defineCommand as
|
|
6163
|
+
import { defineCommand as defineCommand55 } from "citty";
|
|
6444
6164
|
|
|
6445
6165
|
// src/commands/ads/x/error-parser.ts
|
|
6446
6166
|
function mapXErrorCode(message) {
|
|
@@ -6591,7 +6311,7 @@ function parseCsv(v) {
|
|
|
6591
6311
|
const parts = v.split(",").map((s) => s.trim()).filter(Boolean);
|
|
6592
6312
|
return parts.length > 0 ? parts : void 0;
|
|
6593
6313
|
}
|
|
6594
|
-
var activeEntitiesCommand =
|
|
6314
|
+
var activeEntitiesCommand = defineCommand55({
|
|
6595
6315
|
meta: {
|
|
6596
6316
|
name: "active-entities",
|
|
6597
6317
|
description: `List entities with metric activity in a time range.
|
|
@@ -6649,7 +6369,7 @@ Examples:
|
|
|
6649
6369
|
});
|
|
6650
6370
|
|
|
6651
6371
|
// src/commands/ads/x/audiences.ts
|
|
6652
|
-
import { defineCommand as
|
|
6372
|
+
import { defineCommand as defineCommand56 } from "citty";
|
|
6653
6373
|
registerSchema({
|
|
6654
6374
|
command: "ads.x.audiences",
|
|
6655
6375
|
description: "List custom audiences for an X Ads account. Returns id, name, audience_size, audience_type, targetable status. Audiences need 100+ active users in the past 90 days to be targetable.",
|
|
@@ -6658,7 +6378,7 @@ registerSchema({
|
|
|
6658
6378
|
"no-cache": { type: "boolean", description: "Skip cache", required: false }
|
|
6659
6379
|
}
|
|
6660
6380
|
});
|
|
6661
|
-
var audiencesCommand2 =
|
|
6381
|
+
var audiencesCommand2 = defineCommand56({
|
|
6662
6382
|
meta: {
|
|
6663
6383
|
name: "audiences",
|
|
6664
6384
|
description: `List X Ads custom audiences.
|
|
@@ -6707,7 +6427,7 @@ Examples:
|
|
|
6707
6427
|
});
|
|
6708
6428
|
|
|
6709
6429
|
// src/commands/ads/x/campaigns.ts
|
|
6710
|
-
import { defineCommand as
|
|
6430
|
+
import { defineCommand as defineCommand57 } from "citty";
|
|
6711
6431
|
|
|
6712
6432
|
// src/commands/ads/x/run-list.ts
|
|
6713
6433
|
function buildCleanParams(opts) {
|
|
@@ -6770,7 +6490,7 @@ registerSchema({
|
|
|
6770
6490
|
"no-cache": { type: "boolean", description: "Skip cache", required: false }
|
|
6771
6491
|
}
|
|
6772
6492
|
});
|
|
6773
|
-
var campaignsCommand3 =
|
|
6493
|
+
var campaignsCommand3 = defineCommand57({
|
|
6774
6494
|
meta: {
|
|
6775
6495
|
name: "campaigns",
|
|
6776
6496
|
description: `List X Ads campaigns. Returns budget, schedule, funding instrument, status.
|
|
@@ -6812,7 +6532,7 @@ Examples:
|
|
|
6812
6532
|
});
|
|
6813
6533
|
|
|
6814
6534
|
// src/commands/ads/x/cards.ts
|
|
6815
|
-
import { defineCommand as
|
|
6535
|
+
import { defineCommand as defineCommand58 } from "citty";
|
|
6816
6536
|
registerSchema({
|
|
6817
6537
|
command: "ads.x.cards",
|
|
6818
6538
|
description: "List website cards, video cards, and carousels for an X Ads account.",
|
|
@@ -6821,7 +6541,7 @@ registerSchema({
|
|
|
6821
6541
|
"no-cache": { type: "boolean", description: "Skip cache", required: false }
|
|
6822
6542
|
}
|
|
6823
6543
|
});
|
|
6824
|
-
var cardsCommand =
|
|
6544
|
+
var cardsCommand = defineCommand58({
|
|
6825
6545
|
meta: {
|
|
6826
6546
|
name: "cards",
|
|
6827
6547
|
description: `List X Ads cards (rich creatives).
|
|
@@ -6870,7 +6590,7 @@ Examples:
|
|
|
6870
6590
|
});
|
|
6871
6591
|
|
|
6872
6592
|
// src/commands/ads/x/funding.ts
|
|
6873
|
-
import { defineCommand as
|
|
6593
|
+
import { defineCommand as defineCommand59 } from "citty";
|
|
6874
6594
|
registerSchema({
|
|
6875
6595
|
command: "ads.x.funding",
|
|
6876
6596
|
description: "List funding instruments for an X Ads account. Returns id, type, currency, credit_limit_local_micro, funded_amount_local_micro, status. Falls back to BAKER_X_ADS_ACCOUNT_ID env var.",
|
|
@@ -6879,7 +6599,7 @@ registerSchema({
|
|
|
6879
6599
|
"no-cache": { type: "boolean", description: "Skip cache", required: false }
|
|
6880
6600
|
}
|
|
6881
6601
|
});
|
|
6882
|
-
var fundingCommand =
|
|
6602
|
+
var fundingCommand = defineCommand59({
|
|
6883
6603
|
meta: {
|
|
6884
6604
|
name: "funding",
|
|
6885
6605
|
description: `List funding instruments for an X Ads account.
|
|
@@ -6928,7 +6648,7 @@ Examples:
|
|
|
6928
6648
|
});
|
|
6929
6649
|
|
|
6930
6650
|
// src/commands/ads/x/line-items.ts
|
|
6931
|
-
import { defineCommand as
|
|
6651
|
+
import { defineCommand as defineCommand60 } from "citty";
|
|
6932
6652
|
registerSchema({
|
|
6933
6653
|
command: "ads.x.lineItems",
|
|
6934
6654
|
description: "List line items (ad groups) for an X Ads account. Returns bid, product_type, objective, placements, schedule. Filter by campaign-ids or line-item-ids (CSV).",
|
|
@@ -6940,7 +6660,7 @@ registerSchema({
|
|
|
6940
6660
|
"no-cache": { type: "boolean", description: "Skip cache", required: false }
|
|
6941
6661
|
}
|
|
6942
6662
|
});
|
|
6943
|
-
var lineItemsCommand =
|
|
6663
|
+
var lineItemsCommand = defineCommand60({
|
|
6944
6664
|
meta: {
|
|
6945
6665
|
name: "line-items",
|
|
6946
6666
|
description: `List X Ads line items (ad groups).
|
|
@@ -6981,7 +6701,7 @@ Examples:
|
|
|
6981
6701
|
});
|
|
6982
6702
|
|
|
6983
6703
|
// src/commands/ads/x/media.ts
|
|
6984
|
-
import { defineCommand as
|
|
6704
|
+
import { defineCommand as defineCommand61 } from "citty";
|
|
6985
6705
|
registerSchema({
|
|
6986
6706
|
command: "ads.x.media",
|
|
6987
6707
|
description: "List media assets in the X Ads media library (images, GIFs, videos). Filter by media-type (IMAGE, GIF, VIDEO).",
|
|
@@ -6991,7 +6711,7 @@ registerSchema({
|
|
|
6991
6711
|
"no-cache": { type: "boolean", description: "Skip cache", required: false }
|
|
6992
6712
|
}
|
|
6993
6713
|
});
|
|
6994
|
-
var mediaCommand =
|
|
6714
|
+
var mediaCommand = defineCommand61({
|
|
6995
6715
|
meta: {
|
|
6996
6716
|
name: "media",
|
|
6997
6717
|
description: `List media assets in the X Ads media library.
|
|
@@ -7043,7 +6763,7 @@ Examples:
|
|
|
7043
6763
|
});
|
|
7044
6764
|
|
|
7045
6765
|
// src/commands/ads/x/promoted-tweets.ts
|
|
7046
|
-
import { defineCommand as
|
|
6766
|
+
import { defineCommand as defineCommand62 } from "citty";
|
|
7047
6767
|
registerSchema({
|
|
7048
6768
|
command: "ads.x.promotedTweets",
|
|
7049
6769
|
description: "List promoted tweets for an X Ads account. Returns id, line_item_id, tweet_id, approval_status. Filter by line-item-ids (CSV).",
|
|
@@ -7054,7 +6774,7 @@ registerSchema({
|
|
|
7054
6774
|
"no-cache": { type: "boolean", description: "Skip cache", required: false }
|
|
7055
6775
|
}
|
|
7056
6776
|
});
|
|
7057
|
-
var promotedTweetsCommand =
|
|
6777
|
+
var promotedTweetsCommand = defineCommand62({
|
|
7058
6778
|
meta: {
|
|
7059
6779
|
name: "promoted-tweets",
|
|
7060
6780
|
description: `List X Ads promoted tweets.
|
|
@@ -7108,11 +6828,11 @@ Examples:
|
|
|
7108
6828
|
});
|
|
7109
6829
|
|
|
7110
6830
|
// src/commands/ads/x/stats/index.ts
|
|
7111
|
-
import { defineCommand as
|
|
6831
|
+
import { defineCommand as defineCommand67 } from "citty";
|
|
7112
6832
|
|
|
7113
6833
|
// src/commands/ads/x/stats/job.ts
|
|
7114
6834
|
import { gunzipSync } from "zlib";
|
|
7115
|
-
import { defineCommand as
|
|
6835
|
+
import { defineCommand as defineCommand63 } from "citty";
|
|
7116
6836
|
var POLL_INTERVAL_MS2 = 1e4;
|
|
7117
6837
|
var DEADLINE_MS = 12 * 60 * 1e3;
|
|
7118
6838
|
var RESULT_CACHE_TTL_MS = 6 * 60 * 60 * 1e3;
|
|
@@ -7182,7 +6902,7 @@ async function pollUntilDone(accountId, jobId) {
|
|
|
7182
6902
|
function buildCacheKey(body) {
|
|
7183
6903
|
return `stats-job:${JSON.stringify(body)}`;
|
|
7184
6904
|
}
|
|
7185
|
-
var statsJobCommand =
|
|
6905
|
+
var statsJobCommand = defineCommand63({
|
|
7186
6906
|
meta: {
|
|
7187
6907
|
name: "job",
|
|
7188
6908
|
description: `Async X Ads stats job, sync from the CLI's perspective. Creates \u2192 polls \u2192 downloads \u2192 returns.
|
|
@@ -7287,7 +7007,7 @@ For fine-grained control (don't wait, poll yourself), use:
|
|
|
7287
7007
|
});
|
|
7288
7008
|
|
|
7289
7009
|
// src/commands/ads/x/stats/job-create.ts
|
|
7290
|
-
import { defineCommand as
|
|
7010
|
+
import { defineCommand as defineCommand64 } from "citty";
|
|
7291
7011
|
registerSchema({
|
|
7292
7012
|
command: "ads.x.statsJobCreate",
|
|
7293
7013
|
description: "Create an asynchronous X Ads stats job (range up to 90 days non-segmented, 45 days segmented). Returns a job id; poll with `stats job-status`. Times must be ISO 8601 hour-aligned.",
|
|
@@ -7310,7 +7030,7 @@ function parseCsv3(v) {
|
|
|
7310
7030
|
const parts = v.split(",").map((s) => s.trim()).filter(Boolean);
|
|
7311
7031
|
return parts.length > 0 ? parts : void 0;
|
|
7312
7032
|
}
|
|
7313
|
-
var statsJobCreateCommand =
|
|
7033
|
+
var statsJobCreateCommand = defineCommand64({
|
|
7314
7034
|
meta: {
|
|
7315
7035
|
name: "job-create",
|
|
7316
7036
|
description: `Create an async X Ads stats job (up to 90 days, supports segmentation).
|
|
@@ -7373,7 +7093,7 @@ Examples:
|
|
|
7373
7093
|
});
|
|
7374
7094
|
|
|
7375
7095
|
// src/commands/ads/x/stats/job-status.ts
|
|
7376
|
-
import { defineCommand as
|
|
7096
|
+
import { defineCommand as defineCommand65 } from "citty";
|
|
7377
7097
|
registerSchema({
|
|
7378
7098
|
command: "ads.x.statsJobStatus",
|
|
7379
7099
|
description: "Check the status of one or more X Ads stats jobs. Returns status (PROCESSING|SUCCESS|FAILED) and a downloadable url when SUCCESS. Pass --job-id or --job-ids (CSV).",
|
|
@@ -7383,7 +7103,7 @@ registerSchema({
|
|
|
7383
7103
|
"job-ids": { type: "string", description: "CSV of job IDs", required: false }
|
|
7384
7104
|
}
|
|
7385
7105
|
});
|
|
7386
|
-
var statsJobStatusCommand =
|
|
7106
|
+
var statsJobStatusCommand = defineCommand65({
|
|
7387
7107
|
meta: {
|
|
7388
7108
|
name: "job-status",
|
|
7389
7109
|
description: `Poll the status of an async X Ads stats job.
|
|
@@ -7424,7 +7144,7 @@ Examples:
|
|
|
7424
7144
|
});
|
|
7425
7145
|
|
|
7426
7146
|
// src/commands/ads/x/stats/sync.ts
|
|
7427
|
-
import { defineCommand as
|
|
7147
|
+
import { defineCommand as defineCommand66 } from "citty";
|
|
7428
7148
|
|
|
7429
7149
|
// src/commands/ads/x/presets.ts
|
|
7430
7150
|
var X_STATS_PRESETS = [
|
|
@@ -7583,7 +7303,7 @@ async function runSync(args, q) {
|
|
|
7583
7303
|
process.exit(1);
|
|
7584
7304
|
}
|
|
7585
7305
|
}
|
|
7586
|
-
var statsSyncCommand =
|
|
7306
|
+
var statsSyncCommand = defineCommand66({
|
|
7587
7307
|
meta: {
|
|
7588
7308
|
name: "sync",
|
|
7589
7309
|
description: `Synchronous X Ads analytics (max 7-day window).
|
|
@@ -7626,7 +7346,7 @@ Examples:
|
|
|
7626
7346
|
});
|
|
7627
7347
|
|
|
7628
7348
|
// src/commands/ads/x/stats/index.ts
|
|
7629
|
-
var statsCommand =
|
|
7349
|
+
var statsCommand = defineCommand67({
|
|
7630
7350
|
meta: {
|
|
7631
7351
|
name: "stats",
|
|
7632
7352
|
description: `X Ads analytics. Sync (\u22647 days, no segmentation) or async jobs (\u226490 days, segmentable).
|
|
@@ -7654,7 +7374,7 @@ Examples:
|
|
|
7654
7374
|
});
|
|
7655
7375
|
|
|
7656
7376
|
// src/commands/ads/x/targeting-constants.ts
|
|
7657
|
-
import { defineCommand as
|
|
7377
|
+
import { defineCommand as defineCommand68 } from "citty";
|
|
7658
7378
|
var ALLOWED_CONSTANTS = [
|
|
7659
7379
|
"locations",
|
|
7660
7380
|
"interests",
|
|
@@ -7682,7 +7402,7 @@ registerSchema({
|
|
|
7682
7402
|
"no-cache": { type: "boolean", description: "Skip cache", required: false }
|
|
7683
7403
|
}
|
|
7684
7404
|
});
|
|
7685
|
-
var targetingConstantsCommand =
|
|
7405
|
+
var targetingConstantsCommand = defineCommand68({
|
|
7686
7406
|
meta: {
|
|
7687
7407
|
name: "targeting-constants",
|
|
7688
7408
|
description: `Lookup X Ads targeting constants.
|
|
@@ -7732,7 +7452,7 @@ Examples:
|
|
|
7732
7452
|
});
|
|
7733
7453
|
|
|
7734
7454
|
// src/commands/ads/x/targeting-criteria.ts
|
|
7735
|
-
import { defineCommand as
|
|
7455
|
+
import { defineCommand as defineCommand69 } from "citty";
|
|
7736
7456
|
registerSchema({
|
|
7737
7457
|
command: "ads.x.targetingCriteria",
|
|
7738
7458
|
description: "List targeting criteria attached to line items in an X Ads account. Returns targeting_type, targeting_value, name, operator_type per criterion. Filter by line-item-ids.",
|
|
@@ -7742,7 +7462,7 @@ registerSchema({
|
|
|
7742
7462
|
"no-cache": { type: "boolean", description: "Skip cache", required: false }
|
|
7743
7463
|
}
|
|
7744
7464
|
});
|
|
7745
|
-
var targetingCriteriaCommand =
|
|
7465
|
+
var targetingCriteriaCommand = defineCommand69({
|
|
7746
7466
|
meta: {
|
|
7747
7467
|
name: "targeting-criteria",
|
|
7748
7468
|
description: `List targeting criteria attached to line items.
|
|
@@ -7793,7 +7513,7 @@ Examples:
|
|
|
7793
7513
|
});
|
|
7794
7514
|
|
|
7795
7515
|
// src/commands/ads/x/index.ts
|
|
7796
|
-
var xCommand =
|
|
7516
|
+
var xCommand = defineCommand70({
|
|
7797
7517
|
meta: {
|
|
7798
7518
|
name: "x",
|
|
7799
7519
|
description: `X (Twitter) Ads commands. Read campaigns, line items, promoted tweets, creatives, audiences, and analytics.
|
|
@@ -7831,7 +7551,7 @@ The CLI auto-detects --account-id when exactly one X Ads account is connected, o
|
|
|
7831
7551
|
});
|
|
7832
7552
|
|
|
7833
7553
|
// src/commands/ads/index.ts
|
|
7834
|
-
var adsCommand =
|
|
7554
|
+
var adsCommand = defineCommand71({
|
|
7835
7555
|
meta: {
|
|
7836
7556
|
name: "ads",
|
|
7837
7557
|
description: `Ad platform commands. Each platform exposes its own native command surface \u2014 no forced parity.
|
|
@@ -7861,11 +7581,11 @@ Examples:
|
|
|
7861
7581
|
});
|
|
7862
7582
|
|
|
7863
7583
|
// src/commands/canvas/index.ts
|
|
7864
|
-
import { defineCommand as
|
|
7584
|
+
import { defineCommand as defineCommand78 } from "citty";
|
|
7865
7585
|
|
|
7866
7586
|
// src/commands/canvas/catalog.ts
|
|
7867
|
-
import { defineCommand as
|
|
7868
|
-
var catalogCommand =
|
|
7587
|
+
import { defineCommand as defineCommand72 } from "citty";
|
|
7588
|
+
var catalogCommand = defineCommand72({
|
|
7869
7589
|
meta: {
|
|
7870
7590
|
name: "catalog",
|
|
7871
7591
|
description: "Print the agent-facing node catalog (JSON Schema). Includes every registered node grouped by category."
|
|
@@ -7882,9 +7602,9 @@ import { execFile } from "child_process";
|
|
|
7882
7602
|
import { readdir, readFile, stat } from "fs/promises";
|
|
7883
7603
|
import path from "path";
|
|
7884
7604
|
import { promisify } from "util";
|
|
7885
|
-
import { defineCommand as
|
|
7605
|
+
import { defineCommand as defineCommand73 } from "citty";
|
|
7886
7606
|
var execFileAsync = promisify(execFile);
|
|
7887
|
-
var inspectCommand =
|
|
7607
|
+
var inspectCommand = defineCommand73({
|
|
7888
7608
|
meta: {
|
|
7889
7609
|
name: "inspect",
|
|
7890
7610
|
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."
|
|
@@ -7993,8 +7713,8 @@ async function probeDuration(filePath) {
|
|
|
7993
7713
|
// src/commands/canvas/run.ts
|
|
7994
7714
|
import { readFile as readFile2 } from "fs/promises";
|
|
7995
7715
|
import path2 from "path";
|
|
7996
|
-
import { defineCommand as
|
|
7997
|
-
var runCommand =
|
|
7716
|
+
import { defineCommand as defineCommand74 } from "citty";
|
|
7717
|
+
var runCommand = defineCommand74({
|
|
7998
7718
|
meta: { name: "run", description: "Validate and execute a canvas JSON file." },
|
|
7999
7719
|
args: {
|
|
8000
7720
|
file: { type: "positional", required: true, description: "Path to canvas JSON" },
|
|
@@ -8060,7 +7780,7 @@ var runCommand = defineCommand81({
|
|
|
8060
7780
|
// src/commands/canvas/scaffold-static-ad.ts
|
|
8061
7781
|
import { readFile as readFile3, writeFile } from "fs/promises";
|
|
8062
7782
|
import path3 from "path";
|
|
8063
|
-
import { defineCommand as
|
|
7783
|
+
import { defineCommand as defineCommand75 } from "citty";
|
|
8064
7784
|
|
|
8065
7785
|
// src/engine/scaffold/staticAd.ts
|
|
8066
7786
|
import { z as z2 } from "zod";
|
|
@@ -8379,7 +8099,7 @@ async function runVisionPasses(canvas) {
|
|
|
8379
8099
|
return fail("read_outputs", e instanceof Error ? e.message : String(e));
|
|
8380
8100
|
}
|
|
8381
8101
|
}
|
|
8382
|
-
var scaffoldStaticAdCommand =
|
|
8102
|
+
var scaffoldStaticAdCommand = defineCommand75({
|
|
8383
8103
|
meta: {
|
|
8384
8104
|
name: "scaffold-static-ad",
|
|
8385
8105
|
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. Edit prompt.json and drop the real assets, then `baker canvas run` it."
|
|
@@ -8473,7 +8193,7 @@ var scaffoldStaticAdCommand = defineCommand82({
|
|
|
8473
8193
|
// src/commands/canvas/scaffold-video.ts
|
|
8474
8194
|
import { cp, mkdir, readFile as readFile4, writeFile as writeFile2 } from "fs/promises";
|
|
8475
8195
|
import path4 from "path";
|
|
8476
|
-
import { defineCommand as
|
|
8196
|
+
import { defineCommand as defineCommand76 } from "citty";
|
|
8477
8197
|
|
|
8478
8198
|
// src/engine/scaffold/video.ts
|
|
8479
8199
|
import { z as z3 } from "zod";
|
|
@@ -9153,7 +8873,7 @@ async function runAnalysisPasses(canvas) {
|
|
|
9153
8873
|
return fail2("read_outputs", e instanceof Error ? e.message : String(e));
|
|
9154
8874
|
}
|
|
9155
8875
|
}
|
|
9156
|
-
var scaffoldVideoCommand =
|
|
8876
|
+
var scaffoldVideoCommand = defineCommand76({
|
|
9157
8877
|
meta: {
|
|
9158
8878
|
name: "scaffold-video",
|
|
9159
8879
|
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 prompt.json as the editable 'prompt') 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 prompt.json, drop the real source images, then `baker canvas run`."
|
|
@@ -9259,8 +8979,8 @@ var scaffoldVideoCommand = defineCommand83({
|
|
|
9259
8979
|
// src/commands/canvas/validate.ts
|
|
9260
8980
|
import { readFile as readFile5 } from "fs/promises";
|
|
9261
8981
|
import path5 from "path";
|
|
9262
|
-
import { defineCommand as
|
|
9263
|
-
var validateCommand =
|
|
8982
|
+
import { defineCommand as defineCommand77 } from "citty";
|
|
8983
|
+
var validateCommand = defineCommand77({
|
|
9264
8984
|
meta: {
|
|
9265
8985
|
name: "validate",
|
|
9266
8986
|
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)."
|
|
@@ -9302,7 +9022,7 @@ var validateCommand = defineCommand84({
|
|
|
9302
9022
|
});
|
|
9303
9023
|
|
|
9304
9024
|
// src/commands/canvas/index.ts
|
|
9305
|
-
var canvasCommand =
|
|
9025
|
+
var canvasCommand = defineCommand78({
|
|
9306
9026
|
meta: {
|
|
9307
9027
|
name: "canvas",
|
|
9308
9028
|
description: `Run Baker creative canvas JSON files locally. Local nodes execute in-process; remote nodes POST to the Convex backend gateway.
|
|
@@ -9328,10 +9048,10 @@ Subcommands:
|
|
|
9328
9048
|
});
|
|
9329
9049
|
|
|
9330
9050
|
// src/commands/ga4/index.ts
|
|
9331
|
-
import { defineCommand as
|
|
9051
|
+
import { defineCommand as defineCommand82 } from "citty";
|
|
9332
9052
|
|
|
9333
9053
|
// src/commands/ga4/audit.ts
|
|
9334
|
-
import { defineCommand as
|
|
9054
|
+
import { defineCommand as defineCommand79 } from "citty";
|
|
9335
9055
|
|
|
9336
9056
|
// src/commands/ga4/resolve.ts
|
|
9337
9057
|
async function fetchProperties(useCache = true) {
|
|
@@ -9394,7 +9114,7 @@ registerSchema({
|
|
|
9394
9114
|
"no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false }
|
|
9395
9115
|
}
|
|
9396
9116
|
});
|
|
9397
|
-
var auditCommand2 =
|
|
9117
|
+
var auditCommand2 = defineCommand79({
|
|
9398
9118
|
meta: {
|
|
9399
9119
|
name: "audit",
|
|
9400
9120
|
description: `Run all GA4 admin health checks. Returns property config with playbook warnings.
|
|
@@ -9446,7 +9166,7 @@ Examples:
|
|
|
9446
9166
|
});
|
|
9447
9167
|
|
|
9448
9168
|
// src/commands/ga4/properties.ts
|
|
9449
|
-
import { defineCommand as
|
|
9169
|
+
import { defineCommand as defineCommand80 } from "citty";
|
|
9450
9170
|
registerSchema({
|
|
9451
9171
|
command: "ga4.properties",
|
|
9452
9172
|
description: "List all accessible GA4 properties. Returns property IDs needed for query and audit commands. Run this first to find property IDs.",
|
|
@@ -9454,7 +9174,7 @@ registerSchema({
|
|
|
9454
9174
|
"no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false }
|
|
9455
9175
|
}
|
|
9456
9176
|
});
|
|
9457
|
-
var propertiesCommand =
|
|
9177
|
+
var propertiesCommand = defineCommand80({
|
|
9458
9178
|
meta: {
|
|
9459
9179
|
name: "properties",
|
|
9460
9180
|
description: `List accessible GA4 properties.
|
|
@@ -9504,7 +9224,7 @@ Examples:
|
|
|
9504
9224
|
// src/commands/ga4/query.ts
|
|
9505
9225
|
import { appendFileSync as appendFileSync2, existsSync as existsSync3, readFileSync as readFileSync6, writeFileSync as writeFileSync4 } from "fs";
|
|
9506
9226
|
import { resolve as resolve2 } from "path";
|
|
9507
|
-
import { defineCommand as
|
|
9227
|
+
import { defineCommand as defineCommand81 } from "citty";
|
|
9508
9228
|
|
|
9509
9229
|
// src/commands/ga4/presets.ts
|
|
9510
9230
|
var GA4_PRESETS = [
|
|
@@ -9636,7 +9356,7 @@ function handleError(err) {
|
|
|
9636
9356
|
});
|
|
9637
9357
|
process.exit(1);
|
|
9638
9358
|
}
|
|
9639
|
-
var queryCommand2 =
|
|
9359
|
+
var queryCommand2 = defineCommand81({
|
|
9640
9360
|
meta: {
|
|
9641
9361
|
name: "query",
|
|
9642
9362
|
description: `Run GA4 Data API reports. Preset-first with free-form escape hatch.
|
|
@@ -9707,7 +9427,7 @@ Free-form (escape hatch):
|
|
|
9707
9427
|
});
|
|
9708
9428
|
|
|
9709
9429
|
// src/commands/ga4/index.ts
|
|
9710
|
-
var ga4Command =
|
|
9430
|
+
var ga4Command = defineCommand82({
|
|
9711
9431
|
meta: {
|
|
9712
9432
|
name: "ga4",
|
|
9713
9433
|
description: `Google Analytics 4 commands. Audit property config, run playbook-aligned reports.
|
|
@@ -9730,12 +9450,12 @@ Examples:
|
|
|
9730
9450
|
});
|
|
9731
9451
|
|
|
9732
9452
|
// src/commands/gsc/index.ts
|
|
9733
|
-
import { defineCommand as
|
|
9453
|
+
import { defineCommand as defineCommand86 } from "citty";
|
|
9734
9454
|
|
|
9735
9455
|
// src/commands/gsc/query.ts
|
|
9736
9456
|
import { appendFileSync as appendFileSync3, existsSync as existsSync4, readFileSync as readFileSync7, writeFileSync as writeFileSync5 } from "fs";
|
|
9737
9457
|
import { resolve as resolve3 } from "path";
|
|
9738
|
-
import { defineCommand as
|
|
9458
|
+
import { defineCommand as defineCommand83 } from "citty";
|
|
9739
9459
|
|
|
9740
9460
|
// src/commands/gsc/presets.ts
|
|
9741
9461
|
var GSC_PRESETS = [
|
|
@@ -9923,7 +9643,7 @@ function handleError2(err) {
|
|
|
9923
9643
|
});
|
|
9924
9644
|
process.exit(1);
|
|
9925
9645
|
}
|
|
9926
|
-
var queryCommand3 =
|
|
9646
|
+
var queryCommand3 = defineCommand83({
|
|
9927
9647
|
meta: {
|
|
9928
9648
|
name: "query",
|
|
9929
9649
|
description: `Run GSC Search Analytics queries. Preset-first with free-form escape hatch.
|
|
@@ -10001,7 +9721,7 @@ Free-form (escape hatch):
|
|
|
10001
9721
|
});
|
|
10002
9722
|
|
|
10003
9723
|
// src/commands/gsc/sitemaps.ts
|
|
10004
|
-
import { defineCommand as
|
|
9724
|
+
import { defineCommand as defineCommand84 } from "citty";
|
|
10005
9725
|
registerSchema({
|
|
10006
9726
|
command: "gsc.sitemaps",
|
|
10007
9727
|
description: "List sitemaps for a Search Console site. Check sitemap health and errors.",
|
|
@@ -10010,7 +9730,7 @@ registerSchema({
|
|
|
10010
9730
|
"no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false }
|
|
10011
9731
|
}
|
|
10012
9732
|
});
|
|
10013
|
-
var sitemapsCommand =
|
|
9733
|
+
var sitemapsCommand = defineCommand84({
|
|
10014
9734
|
meta: {
|
|
10015
9735
|
name: "sitemaps",
|
|
10016
9736
|
description: `List sitemaps for a site. Check health and errors.
|
|
@@ -10060,7 +9780,7 @@ Examples:
|
|
|
10060
9780
|
});
|
|
10061
9781
|
|
|
10062
9782
|
// src/commands/gsc/sites.ts
|
|
10063
|
-
import { defineCommand as
|
|
9783
|
+
import { defineCommand as defineCommand85 } from "citty";
|
|
10064
9784
|
registerSchema({
|
|
10065
9785
|
command: "gsc.sites",
|
|
10066
9786
|
description: "List all verified Google Search Console sites. Returns site URLs needed for query and sitemaps commands.",
|
|
@@ -10068,7 +9788,7 @@ registerSchema({
|
|
|
10068
9788
|
"no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false }
|
|
10069
9789
|
}
|
|
10070
9790
|
});
|
|
10071
|
-
var sitesCommand =
|
|
9791
|
+
var sitesCommand = defineCommand85({
|
|
10072
9792
|
meta: {
|
|
10073
9793
|
name: "sites",
|
|
10074
9794
|
description: `List verified Search Console sites.
|
|
@@ -10116,7 +9836,7 @@ Examples:
|
|
|
10116
9836
|
});
|
|
10117
9837
|
|
|
10118
9838
|
// src/commands/gsc/index.ts
|
|
10119
|
-
var gscCommand =
|
|
9839
|
+
var gscCommand = defineCommand86({
|
|
10120
9840
|
meta: {
|
|
10121
9841
|
name: "gsc",
|
|
10122
9842
|
description: `Google Search Console commands. PPC-SEO arbitrage, brand halo analysis, negative keyword discovery.
|
|
@@ -10139,10 +9859,10 @@ Examples:
|
|
|
10139
9859
|
});
|
|
10140
9860
|
|
|
10141
9861
|
// src/commands/images/index.ts
|
|
10142
|
-
import { defineCommand as
|
|
9862
|
+
import { defineCommand as defineCommand109 } from "citty";
|
|
10143
9863
|
|
|
10144
9864
|
// src/commands/images/crop.ts
|
|
10145
|
-
import { defineCommand as
|
|
9865
|
+
import { defineCommand as defineCommand87 } from "citty";
|
|
10146
9866
|
|
|
10147
9867
|
// src/lib/image/crop-sprite.ts
|
|
10148
9868
|
import sharp from "sharp";
|
|
@@ -10267,7 +9987,7 @@ function emitError2(err) {
|
|
|
10267
9987
|
}
|
|
10268
9988
|
process.exit(1);
|
|
10269
9989
|
}
|
|
10270
|
-
var cropCommand =
|
|
9990
|
+
var cropCommand = defineCommand87({
|
|
10271
9991
|
meta: {
|
|
10272
9992
|
name: "crop",
|
|
10273
9993
|
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"
|
|
@@ -10303,7 +10023,7 @@ var cropCommand = defineCommand94({
|
|
|
10303
10023
|
});
|
|
10304
10024
|
|
|
10305
10025
|
// src/commands/images/delete.ts
|
|
10306
|
-
import { defineCommand as
|
|
10026
|
+
import { defineCommand as defineCommand88 } from "citty";
|
|
10307
10027
|
registerSchema({
|
|
10308
10028
|
command: "images.delete",
|
|
10309
10029
|
description: "Delete an image by ID",
|
|
@@ -10317,7 +10037,7 @@ registerSchema({
|
|
|
10317
10037
|
}
|
|
10318
10038
|
}
|
|
10319
10039
|
});
|
|
10320
|
-
var
|
|
10040
|
+
var deleteCommand = defineCommand88({
|
|
10321
10041
|
meta: {
|
|
10322
10042
|
name: "delete",
|
|
10323
10043
|
description: "Delete an image by ID. Use --dry-run to preview. Example: baker images delete j571abc123 --dry-run"
|
|
@@ -10358,7 +10078,7 @@ var deleteCommand2 = defineCommand95({
|
|
|
10358
10078
|
});
|
|
10359
10079
|
|
|
10360
10080
|
// src/commands/images/dimensions.ts
|
|
10361
|
-
import { defineCommand as
|
|
10081
|
+
import { defineCommand as defineCommand89 } from "citty";
|
|
10362
10082
|
|
|
10363
10083
|
// src/lib/image/dimensions.ts
|
|
10364
10084
|
import { imageSize } from "image-size";
|
|
@@ -10381,7 +10101,7 @@ registerSchema({
|
|
|
10381
10101
|
target: { type: "string", description: "Local file path or remote http(s) URL", required: true }
|
|
10382
10102
|
}
|
|
10383
10103
|
});
|
|
10384
|
-
var dimensionsCommand =
|
|
10104
|
+
var dimensionsCommand = defineCommand89({
|
|
10385
10105
|
meta: {
|
|
10386
10106
|
name: "dimensions",
|
|
10387
10107
|
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"
|
|
@@ -10425,7 +10145,7 @@ var dimensionsCommand = defineCommand96({
|
|
|
10425
10145
|
});
|
|
10426
10146
|
|
|
10427
10147
|
// src/commands/images/extract.ts
|
|
10428
|
-
import { defineCommand as
|
|
10148
|
+
import { defineCommand as defineCommand90 } from "citty";
|
|
10429
10149
|
registerSchema({
|
|
10430
10150
|
command: "images.extract",
|
|
10431
10151
|
description: "Extract images from a URL via Firecrawl (formats: images).",
|
|
@@ -10441,7 +10161,7 @@ registerSchema({
|
|
|
10441
10161
|
}
|
|
10442
10162
|
}
|
|
10443
10163
|
});
|
|
10444
|
-
var extractCommand =
|
|
10164
|
+
var extractCommand = defineCommand90({
|
|
10445
10165
|
meta: {
|
|
10446
10166
|
name: "extract",
|
|
10447
10167
|
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"
|
|
@@ -10479,7 +10199,7 @@ var extractCommand = defineCommand97({
|
|
|
10479
10199
|
});
|
|
10480
10200
|
|
|
10481
10201
|
// src/commands/images/find.ts
|
|
10482
|
-
import { defineCommand as
|
|
10202
|
+
import { defineCommand as defineCommand91 } from "citty";
|
|
10483
10203
|
registerSchema({
|
|
10484
10204
|
command: "images.find",
|
|
10485
10205
|
description: "Fanout image search: library first, then opted-in external providers.",
|
|
@@ -10511,7 +10231,7 @@ registerSchema({
|
|
|
10511
10231
|
}
|
|
10512
10232
|
}
|
|
10513
10233
|
});
|
|
10514
|
-
var findCommand =
|
|
10234
|
+
var findCommand = defineCommand91({
|
|
10515
10235
|
meta: {
|
|
10516
10236
|
name: "find",
|
|
10517
10237
|
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"
|
|
@@ -10556,8 +10276,157 @@ var findCommand = defineCommand98({
|
|
|
10556
10276
|
}
|
|
10557
10277
|
});
|
|
10558
10278
|
|
|
10279
|
+
// src/commands/images/generate.ts
|
|
10280
|
+
import { readFile as readFile7 } from "fs/promises";
|
|
10281
|
+
import { defineCommand as defineCommand92 } from "citty";
|
|
10282
|
+
import sharp2 from "sharp";
|
|
10283
|
+
var GENERATE_TIMEOUT_MS = 18e4;
|
|
10284
|
+
var REFERENCE_MAX_EDGE = 1536;
|
|
10285
|
+
var MODEL_LIST = [...IMAGE_GENERATE_MODELS];
|
|
10286
|
+
registerSchema({
|
|
10287
|
+
command: "images.generate",
|
|
10288
|
+
description: "Generate an image with AI (OpenRouter image models) and ingest it into the library. Default model openai/gpt-5.4-image-2 \u2014 photo-realistic, cleanest text rendering. Pass --reference with image URLs AND/OR local file paths (brand logo, product shot, Pinterest pin, cropped photo) to ground the generation on real imagery for on-brand, realistic output.",
|
|
10289
|
+
args: {
|
|
10290
|
+
prompt: { type: "string", description: "What to generate", required: true },
|
|
10291
|
+
model: {
|
|
10292
|
+
type: "string",
|
|
10293
|
+
description: `Model (default openai/gpt-5.4-image-2). One of: ${MODEL_LIST.join(", ")}`,
|
|
10294
|
+
required: false,
|
|
10295
|
+
enum: MODEL_LIST
|
|
10296
|
+
},
|
|
10297
|
+
"aspect-ratio": {
|
|
10298
|
+
type: "string",
|
|
10299
|
+
description: "Aspect ratio, e.g. 1:1 (default), 16:9, 9:16, 4:5, 3:2 (Gemini flash also supports 1:4/8:1)",
|
|
10300
|
+
required: false
|
|
10301
|
+
},
|
|
10302
|
+
"image-size": {
|
|
10303
|
+
type: "string",
|
|
10304
|
+
description: "Output resolution: 1K (default) | 2K | 4K (Gemini flash also 0.5K)",
|
|
10305
|
+
required: false
|
|
10306
|
+
},
|
|
10307
|
+
reference: {
|
|
10308
|
+
type: "string",
|
|
10309
|
+
description: "Comma-separated visual references \u2014 each is a public image URL OR a local file path (a sandbox image: brand logo, cropped photo, screenshot). Local files are downscaled and inlined automatically. Grounds output in real imagery; applied in order.",
|
|
10310
|
+
required: false
|
|
10311
|
+
},
|
|
10312
|
+
strength: {
|
|
10313
|
+
type: "number",
|
|
10314
|
+
description: "Recraft v4.1 Pro Vector only: vectorization strength 0-1",
|
|
10315
|
+
required: false
|
|
10316
|
+
},
|
|
10317
|
+
"rgb-colors": {
|
|
10318
|
+
type: "string",
|
|
10319
|
+
description: 'Recraft only: JSON array of [r,g,b] palette triples, e.g. "[[10,10,10],[255,80,0]]"',
|
|
10320
|
+
required: false
|
|
10321
|
+
},
|
|
10322
|
+
"bg-rgb": {
|
|
10323
|
+
type: "string",
|
|
10324
|
+
description: 'Recraft only: JSON [r,g,b] background color, e.g. "[255,255,255]"',
|
|
10325
|
+
required: false
|
|
10326
|
+
},
|
|
10327
|
+
context: {
|
|
10328
|
+
type: "string",
|
|
10329
|
+
description: "Description context hint for the ingested row (overrides the prompt as the describe hint)",
|
|
10330
|
+
required: false
|
|
10331
|
+
}
|
|
10332
|
+
}
|
|
10333
|
+
});
|
|
10334
|
+
function parseJsonArg(raw, flag) {
|
|
10335
|
+
try {
|
|
10336
|
+
return JSON.parse(raw);
|
|
10337
|
+
} catch {
|
|
10338
|
+
throw new ApiError("VALIDATION_ERROR", `--${flag} must be valid JSON (got: ${raw})`);
|
|
10339
|
+
}
|
|
10340
|
+
}
|
|
10341
|
+
function buildGenerateBody(args, prompt) {
|
|
10342
|
+
const body = { prompt };
|
|
10343
|
+
if (args.model) body.model = args.model;
|
|
10344
|
+
if (args["aspect-ratio"]) body.aspectRatio = args["aspect-ratio"];
|
|
10345
|
+
if (args["image-size"]) body.imageSize = args["image-size"];
|
|
10346
|
+
if (args.strength !== void 0) body.strength = Number(args.strength);
|
|
10347
|
+
if (args["rgb-colors"]) body.rgbColors = parseJsonArg(args["rgb-colors"], "rgb-colors");
|
|
10348
|
+
if (args["bg-rgb"]) body.backgroundRgbColor = parseJsonArg(args["bg-rgb"], "bg-rgb");
|
|
10349
|
+
if (args.context) body.descriptionContext = args.context;
|
|
10350
|
+
return body;
|
|
10351
|
+
}
|
|
10352
|
+
async function resolveReferences(spec) {
|
|
10353
|
+
const trimmed = spec.trim();
|
|
10354
|
+
const entries = trimmed.startsWith("data:") ? [trimmed] : trimmed.split(",").map((s) => s.trim()).filter(Boolean);
|
|
10355
|
+
const out = [];
|
|
10356
|
+
for (const entry of entries) {
|
|
10357
|
+
if (isRemoteUrl(entry) || entry.startsWith("data:")) {
|
|
10358
|
+
out.push(entry);
|
|
10359
|
+
continue;
|
|
10360
|
+
}
|
|
10361
|
+
let raw;
|
|
10362
|
+
try {
|
|
10363
|
+
raw = await readFile7(entry);
|
|
10364
|
+
} catch {
|
|
10365
|
+
throw new ApiError("VALIDATION_ERROR", `Reference file not found: ${entry}`);
|
|
10366
|
+
}
|
|
10367
|
+
let webp;
|
|
10368
|
+
try {
|
|
10369
|
+
webp = await sharp2(raw).resize({ width: REFERENCE_MAX_EDGE, height: REFERENCE_MAX_EDGE, fit: "inside", withoutEnlargement: true }).webp({ quality: 82 }).toBuffer();
|
|
10370
|
+
} catch {
|
|
10371
|
+
throw new ApiError("VALIDATION_ERROR", `Reference is not a readable image: ${entry}`);
|
|
10372
|
+
}
|
|
10373
|
+
out.push(`data:image/webp;base64,${webp.toString("base64")}`);
|
|
10374
|
+
}
|
|
10375
|
+
return out;
|
|
10376
|
+
}
|
|
10377
|
+
var generateCommand = defineCommand92({
|
|
10378
|
+
meta: {
|
|
10379
|
+
name: "generate",
|
|
10380
|
+
description: "Generate an image with AI and store it in the library (cost-tracked per request via OpenRouter usage). Models mirror the canvas: openai/gpt-5.4-image-2 (default \u2014 photoreal, cleanest text, best for ad/landing reproduction), google/gemini-3-pro-image-preview (Nano Banana Pro), google/gemini-3.5-flash & google/gemini-3.1-flash-image-preview (fast, extreme aspect ratios), recraft/recraft-v4.1-pro-vector (vector/SVG-style with palette control). The result is auto-ingested (describe + embed), so the next `baker images library` query finds it. Pass --reference with image URLs and/or local file paths (Pinterest, stock, brand assets, sandbox files) to ground generation in reality.\n\nExamples:\n baker images generate 'a friendly golden retriever sitting in a bright modern living room' --aspect-ratio 16:9\n baker images generate 'hero shot of a matte black water bottle on marble' --model google/gemini-3-pro-image-preview --image-size 2K\n baker images generate 'lifestyle photo matching this mood' --reference 'https://\u2026/ref1.jpg,https://\u2026/ref2.jpg'\n baker images generate 'put this product on a marble countertop, soft daylight' --reference './src/brand/logos/product.png,./refs/kitchen-mood.jpg'\n baker images generate 'flat geometric mascot, brand palette' --model recraft/recraft-v4.1-pro-vector --rgb-colors '[[10,10,10],[255,80,0]]'"
|
|
10381
|
+
},
|
|
10382
|
+
args: {
|
|
10383
|
+
prompt: { type: "positional", description: "What to generate", required: false },
|
|
10384
|
+
model: { type: "string", description: "Model id (default openai/gpt-5.4-image-2)", required: false },
|
|
10385
|
+
"aspect-ratio": { type: "string", description: "Aspect ratio (default 1:1)", required: false },
|
|
10386
|
+
"image-size": { type: "string", description: "1K (default) | 2K | 4K | 0.5K", required: false },
|
|
10387
|
+
reference: {
|
|
10388
|
+
type: "string",
|
|
10389
|
+
description: "Comma-separated reference image URLs and/or local file paths",
|
|
10390
|
+
required: false
|
|
10391
|
+
},
|
|
10392
|
+
strength: { type: "string", description: "Recraft vectorization strength 0-1", required: false },
|
|
10393
|
+
"rgb-colors": {
|
|
10394
|
+
type: "string",
|
|
10395
|
+
description: "Recraft palette JSON, e.g. [[10,10,10],[255,80,0]]",
|
|
10396
|
+
required: false
|
|
10397
|
+
},
|
|
10398
|
+
"bg-rgb": { type: "string", description: "Recraft background JSON, e.g. [255,255,255]", required: false },
|
|
10399
|
+
context: { type: "string", description: "Describe-hint override for the ingested row", required: false }
|
|
10400
|
+
},
|
|
10401
|
+
run: async ({ args }) => {
|
|
10402
|
+
try {
|
|
10403
|
+
const prompt = args.prompt;
|
|
10404
|
+
if (!prompt) {
|
|
10405
|
+
writeJson({ ok: false, error: { code: "VALIDATION_ERROR", message: "Prompt is required" } });
|
|
10406
|
+
process.exit(1);
|
|
10407
|
+
}
|
|
10408
|
+
const body = buildGenerateBody(args, prompt);
|
|
10409
|
+
if (args.reference) {
|
|
10410
|
+
const refs = await resolveReferences(args.reference);
|
|
10411
|
+
if (refs.length > 0) body.referenceUrls = refs;
|
|
10412
|
+
}
|
|
10413
|
+
const data = await apiPost("/api/images/generate", body, {
|
|
10414
|
+
timeoutMs: GENERATE_TIMEOUT_MS
|
|
10415
|
+
});
|
|
10416
|
+
writeJson({ ok: true, data });
|
|
10417
|
+
} catch (err) {
|
|
10418
|
+
if (err instanceof ApiError) {
|
|
10419
|
+
writeJson({ ok: false, error: { code: err.code, message: err.message } });
|
|
10420
|
+
process.exit(1);
|
|
10421
|
+
}
|
|
10422
|
+
writeJson({ ok: false, error: { code: "INTERNAL_ERROR", message: "Unexpected error" } });
|
|
10423
|
+
process.exit(1);
|
|
10424
|
+
}
|
|
10425
|
+
}
|
|
10426
|
+
});
|
|
10427
|
+
|
|
10559
10428
|
// src/commands/images/get.ts
|
|
10560
|
-
import { defineCommand as
|
|
10429
|
+
import { defineCommand as defineCommand93 } from "citty";
|
|
10561
10430
|
registerSchema({
|
|
10562
10431
|
command: "images.get",
|
|
10563
10432
|
description: "Get a single image by ID",
|
|
@@ -10565,7 +10434,7 @@ registerSchema({
|
|
|
10565
10434
|
id: { type: "string", description: "Image ID", required: true }
|
|
10566
10435
|
}
|
|
10567
10436
|
});
|
|
10568
|
-
var getCommand2 =
|
|
10437
|
+
var getCommand2 = defineCommand93({
|
|
10569
10438
|
meta: { name: "get", description: "Get a single image by ID. Example: baker images get j571abc123" },
|
|
10570
10439
|
args: {
|
|
10571
10440
|
id: { type: "positional", description: "Image ID", required: false },
|
|
@@ -10601,7 +10470,7 @@ var getCommand2 = defineCommand99({
|
|
|
10601
10470
|
});
|
|
10602
10471
|
|
|
10603
10472
|
// src/commands/images/gif.ts
|
|
10604
|
-
import { defineCommand as
|
|
10473
|
+
import { defineCommand as defineCommand94 } from "citty";
|
|
10605
10474
|
registerSchema({
|
|
10606
10475
|
command: "images.gif",
|
|
10607
10476
|
description: "Search Giphy for GIFs / reaction memes (paid social creative).",
|
|
@@ -10633,7 +10502,7 @@ registerSchema({
|
|
|
10633
10502
|
}
|
|
10634
10503
|
}
|
|
10635
10504
|
});
|
|
10636
|
-
var gifCommand =
|
|
10505
|
+
var gifCommand = defineCommand94({
|
|
10637
10506
|
meta: {
|
|
10638
10507
|
name: "gif",
|
|
10639
10508
|
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"
|
|
@@ -10680,7 +10549,7 @@ var gifCommand = defineCommand100({
|
|
|
10680
10549
|
});
|
|
10681
10550
|
|
|
10682
10551
|
// src/commands/images/google.ts
|
|
10683
|
-
import { defineCommand as
|
|
10552
|
+
import { defineCommand as defineCommand95 } from "citty";
|
|
10684
10553
|
registerSchema({
|
|
10685
10554
|
command: "images.google",
|
|
10686
10555
|
description: "Google Images search via the official Custom Search JSON API. Unverified source \u2014 inspect before placing.",
|
|
@@ -10716,7 +10585,7 @@ registerSchema({
|
|
|
10716
10585
|
}
|
|
10717
10586
|
}
|
|
10718
10587
|
});
|
|
10719
|
-
var googleCommand2 =
|
|
10588
|
+
var googleCommand2 = defineCommand95({
|
|
10720
10589
|
meta: {
|
|
10721
10590
|
name: "google",
|
|
10722
10591
|
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"
|
|
@@ -10764,7 +10633,7 @@ var googleCommand2 = defineCommand101({
|
|
|
10764
10633
|
});
|
|
10765
10634
|
|
|
10766
10635
|
// src/commands/images/icon.ts
|
|
10767
|
-
import { defineCommand as
|
|
10636
|
+
import { defineCommand as defineCommand96 } from "citty";
|
|
10768
10637
|
registerSchema({
|
|
10769
10638
|
command: "images.icon",
|
|
10770
10639
|
description: "Icon lookup via Iconify (200+ icon sets, free CDN).",
|
|
@@ -10790,7 +10659,7 @@ registerSchema({
|
|
|
10790
10659
|
}
|
|
10791
10660
|
}
|
|
10792
10661
|
});
|
|
10793
|
-
var iconCommand =
|
|
10662
|
+
var iconCommand = defineCommand96({
|
|
10794
10663
|
meta: {
|
|
10795
10664
|
name: "icon",
|
|
10796
10665
|
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'"
|
|
@@ -10830,7 +10699,7 @@ var iconCommand = defineCommand102({
|
|
|
10830
10699
|
});
|
|
10831
10700
|
|
|
10832
10701
|
// src/commands/images/ingest.ts
|
|
10833
|
-
import { defineCommand as
|
|
10702
|
+
import { defineCommand as defineCommand97 } from "citty";
|
|
10834
10703
|
registerSchema({
|
|
10835
10704
|
command: "images.ingest",
|
|
10836
10705
|
description: "Ingest a remote image URL into the library (full describe + embed).",
|
|
@@ -10842,7 +10711,7 @@ registerSchema({
|
|
|
10842
10711
|
context: { type: "string", description: "Description context hint", required: false }
|
|
10843
10712
|
}
|
|
10844
10713
|
});
|
|
10845
|
-
var ingestCommand =
|
|
10714
|
+
var ingestCommand = defineCommand97({
|
|
10846
10715
|
meta: {
|
|
10847
10716
|
name: "ingest",
|
|
10848
10717
|
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"
|
|
@@ -10884,7 +10753,7 @@ var ingestCommand = defineCommand103({
|
|
|
10884
10753
|
});
|
|
10885
10754
|
|
|
10886
10755
|
// src/commands/images/library.ts
|
|
10887
|
-
import { defineCommand as
|
|
10756
|
+
import { defineCommand as defineCommand98 } from "citty";
|
|
10888
10757
|
registerSchema({
|
|
10889
10758
|
command: "images.library",
|
|
10890
10759
|
description: "Search the company image library. Returns only ready images.",
|
|
@@ -10910,7 +10779,7 @@ registerSchema({
|
|
|
10910
10779
|
}
|
|
10911
10780
|
}
|
|
10912
10781
|
});
|
|
10913
|
-
var libraryCommand =
|
|
10782
|
+
var libraryCommand = defineCommand98({
|
|
10914
10783
|
meta: {
|
|
10915
10784
|
name: "library",
|
|
10916
10785
|
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"
|
|
@@ -10967,7 +10836,7 @@ var libraryCommand = defineCommand104({
|
|
|
10967
10836
|
});
|
|
10968
10837
|
|
|
10969
10838
|
// src/commands/images/logo.ts
|
|
10970
|
-
import { defineCommand as
|
|
10839
|
+
import { defineCommand as defineCommand99 } from "citty";
|
|
10971
10840
|
registerSchema({
|
|
10972
10841
|
command: "images.logo",
|
|
10973
10842
|
description: "Brand logo lookup via Brandfetch CDN (fallback/404). Auto-ingests by default.",
|
|
@@ -10992,7 +10861,7 @@ registerSchema({
|
|
|
10992
10861
|
}
|
|
10993
10862
|
}
|
|
10994
10863
|
});
|
|
10995
|
-
var logoCommand =
|
|
10864
|
+
var logoCommand = defineCommand99({
|
|
10996
10865
|
meta: {
|
|
10997
10866
|
name: "logo",
|
|
10998
10867
|
description: "Brand logo via Brandfetch CDN. Returns up to 5 variants (icon, light/dark logo, light/dark symbol). Auto-ingests the first variant.\n\nExample: baker images logo stripe.com --variant logo"
|
|
@@ -11030,7 +10899,7 @@ var logoCommand = defineCommand105({
|
|
|
11030
10899
|
});
|
|
11031
10900
|
|
|
11032
10901
|
// src/commands/images/normalize.ts
|
|
11033
|
-
import { defineCommand as
|
|
10902
|
+
import { defineCommand as defineCommand100 } from "citty";
|
|
11034
10903
|
|
|
11035
10904
|
// src/lib/image/color-changer.ts
|
|
11036
10905
|
import quantize from "quantize";
|
|
@@ -11378,7 +11247,7 @@ function solidifyEdges(data, saturationBoost = 0.25) {
|
|
|
11378
11247
|
}
|
|
11379
11248
|
|
|
11380
11249
|
// src/lib/image/image-processor.ts
|
|
11381
|
-
import
|
|
11250
|
+
import sharp3 from "sharp";
|
|
11382
11251
|
function hasGradient(data) {
|
|
11383
11252
|
const uniqueColors = /* @__PURE__ */ new Set();
|
|
11384
11253
|
for (let i = 0; i < data.length; i += 4) {
|
|
@@ -11410,10 +11279,10 @@ function createSvgRecolorer(target, palette) {
|
|
|
11410
11279
|
async function processGradient(data, info) {
|
|
11411
11280
|
if (!hasGradient(data)) return { data, info };
|
|
11412
11281
|
const solidified = solidifyEdges(data, 0.1);
|
|
11413
|
-
const blurred = await
|
|
11282
|
+
const blurred = await sharp3(solidified, {
|
|
11414
11283
|
raw: { channels: 4, width: info.width, height: info.height }
|
|
11415
11284
|
}).png().blur(0.3).toBuffer();
|
|
11416
|
-
const result = await
|
|
11285
|
+
const result = await sharp3(blurred).ensureAlpha().raw().toBuffer({ resolveWithObject: true });
|
|
11417
11286
|
return { data: result.data, info: result.info };
|
|
11418
11287
|
}
|
|
11419
11288
|
function isSvgBuffer(buffer) {
|
|
@@ -11422,13 +11291,13 @@ function isSvgBuffer(buffer) {
|
|
|
11422
11291
|
}
|
|
11423
11292
|
async function processInternal(inputBuffer, isSVG, options) {
|
|
11424
11293
|
const stages = [];
|
|
11425
|
-
const metadata = await
|
|
11294
|
+
const metadata = await sharp3(inputBuffer).metadata();
|
|
11426
11295
|
let alreadyTransparent = false;
|
|
11427
11296
|
if (metadata.hasAlpha) {
|
|
11428
|
-
const { data: alphaData } = await
|
|
11297
|
+
const { data: alphaData } = await sharp3(inputBuffer).raw().toBuffer({ resolveWithObject: true });
|
|
11429
11298
|
alreadyTransparent = hasTransparency(alphaData, 0.05);
|
|
11430
11299
|
}
|
|
11431
|
-
let { data: processedData, info } = await
|
|
11300
|
+
let { data: processedData, info } = await sharp3(inputBuffer).ensureAlpha().raw().toBuffer({ resolveWithObject: true });
|
|
11432
11301
|
if (options.color) {
|
|
11433
11302
|
stages.push("recolor");
|
|
11434
11303
|
processedData = applyQuantization(processedData, 8);
|
|
@@ -11499,7 +11368,7 @@ async function processInternal(inputBuffer, isSVG, options) {
|
|
|
11499
11368
|
processedData = result.data;
|
|
11500
11369
|
info = result.info;
|
|
11501
11370
|
}
|
|
11502
|
-
let pipeline =
|
|
11371
|
+
let pipeline = sharp3(processedData, {
|
|
11503
11372
|
raw: { channels: 4, width: info.width, height: info.height }
|
|
11504
11373
|
}).png();
|
|
11505
11374
|
if (options.shrinkToContent) {
|
|
@@ -11512,12 +11381,12 @@ async function processInternal(inputBuffer, isSVG, options) {
|
|
|
11512
11381
|
function applyResize(buffer, resize) {
|
|
11513
11382
|
const transparent = { r: 0, g: 0, b: 0, alpha: 0 };
|
|
11514
11383
|
if (resize.size) {
|
|
11515
|
-
return
|
|
11384
|
+
return sharp3(buffer).resize(resize.size.width, resize.size.height, {
|
|
11516
11385
|
fit: resize.fit ?? "contain",
|
|
11517
11386
|
background: transparent
|
|
11518
11387
|
}).toBuffer();
|
|
11519
11388
|
}
|
|
11520
|
-
return
|
|
11389
|
+
return sharp3(buffer).resize(resize.width ?? null, resize.height ?? null, { fit: "inside", withoutEnlargement: false }).toBuffer();
|
|
11521
11390
|
}
|
|
11522
11391
|
async function processImage(inputBuffer, options = {}) {
|
|
11523
11392
|
const stages = [];
|
|
@@ -11526,7 +11395,7 @@ async function processImage(inputBuffer, options = {}) {
|
|
|
11526
11395
|
if (options.resize) {
|
|
11527
11396
|
stages.push("resize");
|
|
11528
11397
|
const resized = await applyResize(inputBuffer, options.resize);
|
|
11529
|
-
const meta3 = await
|
|
11398
|
+
const meta3 = await sharp3(resized).metadata();
|
|
11530
11399
|
return {
|
|
11531
11400
|
buffer: resized,
|
|
11532
11401
|
format: "png",
|
|
@@ -11535,7 +11404,7 @@ async function processImage(inputBuffer, options = {}) {
|
|
|
11535
11404
|
stages
|
|
11536
11405
|
};
|
|
11537
11406
|
}
|
|
11538
|
-
const meta2 = await
|
|
11407
|
+
const meta2 = await sharp3(inputBuffer).metadata();
|
|
11539
11408
|
return {
|
|
11540
11409
|
buffer: inputBuffer,
|
|
11541
11410
|
format: "svg",
|
|
@@ -11547,7 +11416,7 @@ async function processImage(inputBuffer, options = {}) {
|
|
|
11547
11416
|
let workingBuffer = inputBuffer;
|
|
11548
11417
|
if (isSVG) {
|
|
11549
11418
|
stages.push("rasterize-svg");
|
|
11550
|
-
workingBuffer = await
|
|
11419
|
+
workingBuffer = await sharp3(inputBuffer).png({ compressionLevel: 0, force: true, palette: false, quality: 100 }).toBuffer();
|
|
11551
11420
|
}
|
|
11552
11421
|
const pass = await processInternal(workingBuffer, isSVG, options);
|
|
11553
11422
|
stages.push(...pass.stages);
|
|
@@ -11556,7 +11425,7 @@ async function processImage(inputBuffer, options = {}) {
|
|
|
11556
11425
|
stages.push("resize");
|
|
11557
11426
|
processed = await applyResize(processed, options.resize);
|
|
11558
11427
|
}
|
|
11559
|
-
const meta = await
|
|
11428
|
+
const meta = await sharp3(processed).metadata();
|
|
11560
11429
|
return {
|
|
11561
11430
|
buffer: processed,
|
|
11562
11431
|
format: "png",
|
|
@@ -11762,7 +11631,7 @@ function coerceRawArgs(args) {
|
|
|
11762
11631
|
"dry-run": bool(args["dry-run"])
|
|
11763
11632
|
};
|
|
11764
11633
|
}
|
|
11765
|
-
var normalizeCommand =
|
|
11634
|
+
var normalizeCommand = defineCommand100({
|
|
11766
11635
|
meta: {
|
|
11767
11636
|
name: "normalize",
|
|
11768
11637
|
description: `Normalize logos / images: declarative recolor + bg removal + trim + resize. Operates on local files; writes in-place by default.
|
|
@@ -11816,8 +11685,68 @@ Examples:
|
|
|
11816
11685
|
}
|
|
11817
11686
|
});
|
|
11818
11687
|
|
|
11688
|
+
// src/commands/images/pinterest.ts
|
|
11689
|
+
import { defineCommand as defineCommand101 } from "citty";
|
|
11690
|
+
registerSchema({
|
|
11691
|
+
command: "images.pinterest",
|
|
11692
|
+
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.",
|
|
11693
|
+
args: {
|
|
11694
|
+
query: { type: "string", description: "Search query", required: true },
|
|
11695
|
+
limit: { type: "number", description: "Max results (1-20, default 5)", required: false, default: 5 },
|
|
11696
|
+
"auto-ingest": {
|
|
11697
|
+
type: "number",
|
|
11698
|
+
description: "Auto-ingest top N and return Baker-owned URLs on ingested hits",
|
|
11699
|
+
required: false,
|
|
11700
|
+
default: 0
|
|
11701
|
+
},
|
|
11702
|
+
context: {
|
|
11703
|
+
type: "string",
|
|
11704
|
+
description: "Free-text hint applied to every auto-ingested hit (overrides the pin title)",
|
|
11705
|
+
required: false
|
|
11706
|
+
}
|
|
11707
|
+
}
|
|
11708
|
+
});
|
|
11709
|
+
var pinterestCommand = defineCommand101({
|
|
11710
|
+
meta: {
|
|
11711
|
+
name: "pinterest",
|
|
11712
|
+
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'"
|
|
11713
|
+
},
|
|
11714
|
+
args: {
|
|
11715
|
+
query: { type: "positional", description: "Search query", required: false },
|
|
11716
|
+
limit: { type: "string", description: "Max results (1-20)", required: false },
|
|
11717
|
+
"auto-ingest": {
|
|
11718
|
+
type: "string",
|
|
11719
|
+
description: "Auto-ingest top N and return Baker-owned URLs on ingested hits",
|
|
11720
|
+
required: false
|
|
11721
|
+
},
|
|
11722
|
+
context: { type: "string", description: "Description context hint applied to auto-ingested hits", required: false }
|
|
11723
|
+
},
|
|
11724
|
+
run: async ({ args }) => {
|
|
11725
|
+
try {
|
|
11726
|
+
const query = args.query;
|
|
11727
|
+
if (!query) {
|
|
11728
|
+
writeJson({ ok: false, error: { code: "VALIDATION_ERROR", message: "Query is required" } });
|
|
11729
|
+
process.exit(1);
|
|
11730
|
+
}
|
|
11731
|
+
const body = { query };
|
|
11732
|
+
if (args.limit) body.limit = Number(args.limit);
|
|
11733
|
+
if (args["auto-ingest"]) body.autoIngest = Number(args["auto-ingest"]);
|
|
11734
|
+
if (args.context) body.descriptionContext = args.context;
|
|
11735
|
+
const data = await apiPost("/api/images/pinterest", body);
|
|
11736
|
+
writeJson({ ok: true, data });
|
|
11737
|
+
} catch (err) {
|
|
11738
|
+
if (err instanceof ApiError) {
|
|
11739
|
+
writeJson({ ok: false, error: { code: err.code, message: err.message } });
|
|
11740
|
+
process.exit(1);
|
|
11741
|
+
}
|
|
11742
|
+
writeJson({ ok: false, error: { code: "INTERNAL_ERROR", message: "Unexpected error" } });
|
|
11743
|
+
process.exit(1);
|
|
11744
|
+
}
|
|
11745
|
+
}
|
|
11746
|
+
});
|
|
11747
|
+
|
|
11819
11748
|
// src/commands/images/screenshot.ts
|
|
11820
|
-
import { defineCommand as
|
|
11749
|
+
import { defineCommand as defineCommand102 } from "citty";
|
|
11821
11750
|
registerSchema({
|
|
11822
11751
|
command: "images.screenshot",
|
|
11823
11752
|
description: "Capture a website screenshot via ScreenshotOne. Auto-ingests on success.",
|
|
@@ -11833,7 +11762,7 @@ registerSchema({
|
|
|
11833
11762
|
}
|
|
11834
11763
|
}
|
|
11835
11764
|
});
|
|
11836
|
-
var screenshotCommand =
|
|
11765
|
+
var screenshotCommand = defineCommand102({
|
|
11837
11766
|
meta: {
|
|
11838
11767
|
name: "screenshot",
|
|
11839
11768
|
description: "Screenshot a URL via ScreenshotOne. $0.009/capture. Auto-ingests to library.\n\nExample: baker images screenshot https://stripe.com --full-page"
|
|
@@ -11883,7 +11812,7 @@ var screenshotCommand = defineCommand107({
|
|
|
11883
11812
|
});
|
|
11884
11813
|
|
|
11885
11814
|
// src/commands/images/search.ts
|
|
11886
|
-
import { defineCommand as
|
|
11815
|
+
import { defineCommand as defineCommand103 } from "citty";
|
|
11887
11816
|
registerSchema({
|
|
11888
11817
|
command: "images.search",
|
|
11889
11818
|
description: "Search images by text query. Only returns ready images.",
|
|
@@ -11899,7 +11828,7 @@ registerSchema({
|
|
|
11899
11828
|
tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
|
|
11900
11829
|
}
|
|
11901
11830
|
});
|
|
11902
|
-
var searchCommand =
|
|
11831
|
+
var searchCommand = defineCommand103({
|
|
11903
11832
|
meta: {
|
|
11904
11833
|
name: "search",
|
|
11905
11834
|
description: "Semantic search images by text query. Uses hybrid BM25 + vector + reranking. Example: baker images search 'hero banner' --aspect-ratio 16:9 --tags logo"
|
|
@@ -11959,7 +11888,7 @@ var searchCommand = defineCommand108({
|
|
|
11959
11888
|
});
|
|
11960
11889
|
|
|
11961
11890
|
// src/commands/images/sticker.ts
|
|
11962
|
-
import { defineCommand as
|
|
11891
|
+
import { defineCommand as defineCommand104 } from "citty";
|
|
11963
11892
|
registerSchema({
|
|
11964
11893
|
command: "images.sticker",
|
|
11965
11894
|
description: "Search Giphy stickers \u2014 transparent-background overlays for ad creative.",
|
|
@@ -11991,7 +11920,7 @@ registerSchema({
|
|
|
11991
11920
|
}
|
|
11992
11921
|
}
|
|
11993
11922
|
});
|
|
11994
|
-
var stickerCommand =
|
|
11923
|
+
var stickerCommand = defineCommand104({
|
|
11995
11924
|
meta: {
|
|
11996
11925
|
name: "sticker",
|
|
11997
11926
|
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"
|
|
@@ -12038,7 +11967,7 @@ var stickerCommand = defineCommand109({
|
|
|
12038
11967
|
});
|
|
12039
11968
|
|
|
12040
11969
|
// src/commands/images/stock.ts
|
|
12041
|
-
import { defineCommand as
|
|
11970
|
+
import { defineCommand as defineCommand105 } from "citty";
|
|
12042
11971
|
registerSchema({
|
|
12043
11972
|
command: "images.stock",
|
|
12044
11973
|
description: "Stock photo, vector illustration, icon-set, and PSD search via Magnific (Freepik's developer API).",
|
|
@@ -12096,7 +12025,7 @@ registerSchema({
|
|
|
12096
12025
|
}
|
|
12097
12026
|
}
|
|
12098
12027
|
});
|
|
12099
|
-
var stockCommand =
|
|
12028
|
+
var stockCommand = defineCommand105({
|
|
12100
12029
|
meta: {
|
|
12101
12030
|
name: "stock",
|
|
12102
12031
|
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"
|
|
@@ -12152,9 +12081,9 @@ var stockCommand = defineCommand110({
|
|
|
12152
12081
|
});
|
|
12153
12082
|
|
|
12154
12083
|
// src/commands/images/upload.ts
|
|
12155
|
-
import { readFile as
|
|
12084
|
+
import { readFile as readFile8 } from "fs/promises";
|
|
12156
12085
|
import { extname as extname2 } from "path";
|
|
12157
|
-
import { defineCommand as
|
|
12086
|
+
import { defineCommand as defineCommand106 } from "citty";
|
|
12158
12087
|
var MIME_MAP = {
|
|
12159
12088
|
".png": "image/png",
|
|
12160
12089
|
".jpg": "image/jpeg",
|
|
@@ -12209,7 +12138,7 @@ function detectContentType(filePath) {
|
|
|
12209
12138
|
}
|
|
12210
12139
|
return mime;
|
|
12211
12140
|
}
|
|
12212
|
-
var uploadCommand =
|
|
12141
|
+
var uploadCommand = defineCommand106({
|
|
12213
12142
|
meta: {
|
|
12214
12143
|
name: "upload",
|
|
12215
12144
|
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'"
|
|
@@ -12292,7 +12221,7 @@ async function uploadLocal(target, args) {
|
|
|
12292
12221
|
});
|
|
12293
12222
|
return;
|
|
12294
12223
|
}
|
|
12295
|
-
const fileBuffer = await
|
|
12224
|
+
const fileBuffer = await readFile8(target);
|
|
12296
12225
|
const base64 = fileBuffer.toString("base64");
|
|
12297
12226
|
const body = { base64, contentType };
|
|
12298
12227
|
if (args.source) body.source = args.source;
|
|
@@ -12302,7 +12231,7 @@ async function uploadLocal(target, args) {
|
|
|
12302
12231
|
}
|
|
12303
12232
|
|
|
12304
12233
|
// src/commands/images/upscale.ts
|
|
12305
|
-
import { defineCommand as
|
|
12234
|
+
import { defineCommand as defineCommand107 } from "citty";
|
|
12306
12235
|
registerSchema({
|
|
12307
12236
|
command: "images.upscale",
|
|
12308
12237
|
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).",
|
|
@@ -12317,7 +12246,7 @@ registerSchema({
|
|
|
12317
12246
|
}
|
|
12318
12247
|
});
|
|
12319
12248
|
var POLL_INTERVAL_MS3 = 1500;
|
|
12320
|
-
var upscaleCommand =
|
|
12249
|
+
var upscaleCommand = defineCommand107({
|
|
12321
12250
|
meta: {
|
|
12322
12251
|
name: "upscale",
|
|
12323
12252
|
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"
|
|
@@ -12372,7 +12301,7 @@ var upscaleCommand = defineCommand112({
|
|
|
12372
12301
|
});
|
|
12373
12302
|
|
|
12374
12303
|
// src/commands/images/use.ts
|
|
12375
|
-
import { defineCommand as
|
|
12304
|
+
import { defineCommand as defineCommand108 } from "citty";
|
|
12376
12305
|
registerSchema({
|
|
12377
12306
|
command: "images.use",
|
|
12378
12307
|
description: "Ingest a URL and wait for the library record to be ready.",
|
|
@@ -12388,7 +12317,7 @@ registerSchema({
|
|
|
12388
12317
|
}
|
|
12389
12318
|
});
|
|
12390
12319
|
var POLL_INTERVAL_MS4 = 1500;
|
|
12391
|
-
var useCommand =
|
|
12320
|
+
var useCommand = defineCommand108({
|
|
12392
12321
|
meta: {
|
|
12393
12322
|
name: "use",
|
|
12394
12323
|
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"
|
|
@@ -12434,7 +12363,7 @@ var useCommand = defineCommand113({
|
|
|
12434
12363
|
});
|
|
12435
12364
|
|
|
12436
12365
|
// src/commands/images/index.ts
|
|
12437
|
-
var imagesCommand =
|
|
12366
|
+
var imagesCommand = defineCommand109({
|
|
12438
12367
|
meta: {
|
|
12439
12368
|
name: "images",
|
|
12440
12369
|
description: `Find, source, and normalize images. Subcommands route by provider so cost + license are explicit.
|
|
@@ -12446,6 +12375,7 @@ Library + search:
|
|
|
12446
12375
|
External providers:
|
|
12447
12376
|
baker images stock <q> [--type photo|vector|psd] Magnific (Freepik's dev API) \u2014 photos, vectors, illustrations, PSDs
|
|
12448
12377
|
baker images google <q> Google Images via the official Custom Search API
|
|
12378
|
+
baker images pinterest <q> Pinterest reference imagery via ScrapeCreators (photo-real mood boards)
|
|
12449
12379
|
baker images logo <domain> Brand logo via Brandfetch CDN
|
|
12450
12380
|
baker images icon <name> [--set \u2026] Iconify (200+ sets)
|
|
12451
12381
|
baker images gif <q> [--trending] Giphy GIFs / reaction memes (paid-social creative)
|
|
@@ -12453,7 +12383,9 @@ External providers:
|
|
|
12453
12383
|
baker images extract <url> Firecrawl page extract
|
|
12454
12384
|
baker images screenshot <url> ScreenshotOne capture
|
|
12455
12385
|
|
|
12456
|
-
|
|
12386
|
+
AI generation (run on the Convex backend, cost-tracked):
|
|
12387
|
+
baker images generate <prompt> [--model \u2026] [--aspect-ratio \u2026] [--reference url1,url2]
|
|
12388
|
+
Generate an image with AI (OpenRouter models) and ingest it
|
|
12457
12389
|
baker images ingest <url> --source <enum> Save remote URL to library
|
|
12458
12390
|
baker images use <url> Ingest and wait for ready
|
|
12459
12391
|
baker images upload ./file Upload local file
|
|
@@ -12476,6 +12408,8 @@ Paid transforms (run on the Convex backend, cost-tracked):
|
|
|
12476
12408
|
find: findCommand,
|
|
12477
12409
|
stock: stockCommand,
|
|
12478
12410
|
google: googleCommand2,
|
|
12411
|
+
pinterest: pinterestCommand,
|
|
12412
|
+
generate: generateCommand,
|
|
12479
12413
|
logo: logoCommand,
|
|
12480
12414
|
icon: iconCommand,
|
|
12481
12415
|
gif: gifCommand,
|
|
@@ -12486,7 +12420,7 @@ Paid transforms (run on the Convex backend, cost-tracked):
|
|
|
12486
12420
|
use: useCommand,
|
|
12487
12421
|
search: searchCommand,
|
|
12488
12422
|
upload: uploadCommand,
|
|
12489
|
-
delete:
|
|
12423
|
+
delete: deleteCommand,
|
|
12490
12424
|
normalize: normalizeCommand,
|
|
12491
12425
|
crop: cropCommand,
|
|
12492
12426
|
dimensions: dimensionsCommand,
|
|
@@ -12495,10 +12429,10 @@ Paid transforms (run on the Convex backend, cost-tracked):
|
|
|
12495
12429
|
});
|
|
12496
12430
|
|
|
12497
12431
|
// src/commands/research/index.ts
|
|
12498
|
-
import { defineCommand as
|
|
12432
|
+
import { defineCommand as defineCommand120 } from "citty";
|
|
12499
12433
|
|
|
12500
12434
|
// src/commands/research/advertisers.ts
|
|
12501
|
-
import { defineCommand as
|
|
12435
|
+
import { defineCommand as defineCommand110 } from "citty";
|
|
12502
12436
|
|
|
12503
12437
|
// src/commands/research/output.ts
|
|
12504
12438
|
var RESEARCH_DATA_NOTE = "Estimates based on third-party SERP data \u2014 not exact figures. Use for directional insights, not precise measurement.";
|
|
@@ -12611,7 +12545,7 @@ var FIELDS3 = {
|
|
|
12611
12545
|
etv: "Estimated traffic value (USD)",
|
|
12612
12546
|
visibility: "SERP visibility score (0-1)"
|
|
12613
12547
|
};
|
|
12614
|
-
var advertisersCommand =
|
|
12548
|
+
var advertisersCommand = defineCommand110({
|
|
12615
12549
|
meta: {
|
|
12616
12550
|
name: "advertisers",
|
|
12617
12551
|
description: `Find domains competing for a keyword in Google SERPs.
|
|
@@ -12658,7 +12592,7 @@ Examples:
|
|
|
12658
12592
|
});
|
|
12659
12593
|
|
|
12660
12594
|
// src/commands/research/autocomplete.ts
|
|
12661
|
-
import { defineCommand as
|
|
12595
|
+
import { defineCommand as defineCommand111 } from "citty";
|
|
12662
12596
|
registerSchema({
|
|
12663
12597
|
command: "research.autocomplete",
|
|
12664
12598
|
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).",
|
|
@@ -12681,7 +12615,7 @@ registerSchema({
|
|
|
12681
12615
|
var FIELDS4 = {
|
|
12682
12616
|
suggestion: "Autocomplete suggestion from Google"
|
|
12683
12617
|
};
|
|
12684
|
-
var autocompleteCommand =
|
|
12618
|
+
var autocompleteCommand = defineCommand111({
|
|
12685
12619
|
meta: {
|
|
12686
12620
|
name: "autocomplete",
|
|
12687
12621
|
description: `Get Google Autocomplete suggestions for keyword expansion.
|
|
@@ -12727,7 +12661,7 @@ Examples:
|
|
|
12727
12661
|
});
|
|
12728
12662
|
|
|
12729
12663
|
// src/commands/research/countries.ts
|
|
12730
|
-
import { defineCommand as
|
|
12664
|
+
import { defineCommand as defineCommand112 } from "citty";
|
|
12731
12665
|
registerSchema({
|
|
12732
12666
|
command: "research.countries",
|
|
12733
12667
|
description: "List all supported country codes for --location flag in research commands.",
|
|
@@ -12784,7 +12718,7 @@ var FIELDS5 = {
|
|
|
12784
12718
|
code: "Country code to pass as --location",
|
|
12785
12719
|
name: "Country name"
|
|
12786
12720
|
};
|
|
12787
|
-
var countriesCommand =
|
|
12721
|
+
var countriesCommand = defineCommand112({
|
|
12788
12722
|
meta: {
|
|
12789
12723
|
name: "countries",
|
|
12790
12724
|
description: "List all supported country codes for --location flag."
|
|
@@ -12795,7 +12729,7 @@ var countriesCommand = defineCommand117({
|
|
|
12795
12729
|
});
|
|
12796
12730
|
|
|
12797
12731
|
// src/commands/research/intent.ts
|
|
12798
|
-
import { defineCommand as
|
|
12732
|
+
import { defineCommand as defineCommand113 } from "citty";
|
|
12799
12733
|
registerSchema({
|
|
12800
12734
|
command: "research.intent",
|
|
12801
12735
|
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.",
|
|
@@ -12818,7 +12752,7 @@ var FIELDS6 = {
|
|
|
12818
12752
|
intent: "Primary Google Search intent: informational, navigational, commercial, transactional",
|
|
12819
12753
|
probability: "Confidence score 0.0-1.0"
|
|
12820
12754
|
};
|
|
12821
|
-
var intentCommand =
|
|
12755
|
+
var intentCommand = defineCommand113({
|
|
12822
12756
|
meta: {
|
|
12823
12757
|
name: "intent",
|
|
12824
12758
|
description: `Classify Google Search intent for keywords. Returns intent type and confidence.
|
|
@@ -12866,7 +12800,7 @@ Examples:
|
|
|
12866
12800
|
});
|
|
12867
12801
|
|
|
12868
12802
|
// src/commands/research/keyword-gap.ts
|
|
12869
|
-
import { defineCommand as
|
|
12803
|
+
import { defineCommand as defineCommand114 } from "citty";
|
|
12870
12804
|
registerSchema({
|
|
12871
12805
|
command: "research.keyword-gap",
|
|
12872
12806
|
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.",
|
|
@@ -12895,7 +12829,7 @@ var FIELDS7 = {
|
|
|
12895
12829
|
cpc: "Cost per click USD",
|
|
12896
12830
|
their_position: "Competitor's ranking position"
|
|
12897
12831
|
};
|
|
12898
|
-
var keywordGapCommand =
|
|
12832
|
+
var keywordGapCommand = defineCommand114({
|
|
12899
12833
|
meta: {
|
|
12900
12834
|
name: "keyword-gap",
|
|
12901
12835
|
description: `Find keywords a competitor has that you don't. Supports pagination via --offset.
|
|
@@ -12969,7 +12903,7 @@ Examples:
|
|
|
12969
12903
|
});
|
|
12970
12904
|
|
|
12971
12905
|
// src/commands/research/keywords-for-site.ts
|
|
12972
|
-
import { defineCommand as
|
|
12906
|
+
import { defineCommand as defineCommand115 } from "citty";
|
|
12973
12907
|
registerSchema({
|
|
12974
12908
|
command: "research.keywords-for-site",
|
|
12975
12909
|
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.",
|
|
@@ -13002,7 +12936,7 @@ var FIELDS8 = {
|
|
|
13002
12936
|
competition: "LOW, MEDIUM, or HIGH",
|
|
13003
12937
|
competition_index: "Competition score 0-100"
|
|
13004
12938
|
};
|
|
13005
|
-
var keywordsForSiteCommand =
|
|
12939
|
+
var keywordsForSiteCommand = defineCommand115({
|
|
13006
12940
|
meta: {
|
|
13007
12941
|
name: "keywords-for-site",
|
|
13008
12942
|
description: `Get keywords a competitor targets in Google. Use --type to filter paid/organic.
|
|
@@ -13055,7 +12989,7 @@ Examples:
|
|
|
13055
12989
|
});
|
|
13056
12990
|
|
|
13057
12991
|
// src/commands/research/languages.ts
|
|
13058
|
-
import { defineCommand as
|
|
12992
|
+
import { defineCommand as defineCommand116 } from "citty";
|
|
13059
12993
|
registerSchema({
|
|
13060
12994
|
command: "research.languages",
|
|
13061
12995
|
description: "List all supported language codes for --language flag in research commands.",
|
|
@@ -13085,7 +13019,7 @@ var FIELDS9 = {
|
|
|
13085
13019
|
code: "Language code to pass as --language",
|
|
13086
13020
|
name: "Language name (also accepted by --language)"
|
|
13087
13021
|
};
|
|
13088
|
-
var languagesCommand2 =
|
|
13022
|
+
var languagesCommand2 = defineCommand116({
|
|
13089
13023
|
meta: {
|
|
13090
13024
|
name: "languages",
|
|
13091
13025
|
description: "List all supported language codes for --language flag."
|
|
@@ -13096,7 +13030,7 @@ var languagesCommand2 = defineCommand121({
|
|
|
13096
13030
|
});
|
|
13097
13031
|
|
|
13098
13032
|
// src/commands/research/lighthouse.ts
|
|
13099
|
-
import { defineCommand as
|
|
13033
|
+
import { defineCommand as defineCommand117 } from "citty";
|
|
13100
13034
|
registerSchema({
|
|
13101
13035
|
command: "research.lighthouse",
|
|
13102
13036
|
description: "Landing page performance audit. Returns metrics that affect Google Ads Quality Score and CPC.",
|
|
@@ -13115,7 +13049,7 @@ var FIELDS10 = {
|
|
|
13115
13049
|
speed_index_ms: "Speed Index in ms (good: < 3400)",
|
|
13116
13050
|
interactive_ms: "Time to Interactive in ms (good: < 3800)"
|
|
13117
13051
|
};
|
|
13118
|
-
var lighthouseCommand =
|
|
13052
|
+
var lighthouseCommand = defineCommand117({
|
|
13119
13053
|
meta: {
|
|
13120
13054
|
name: "lighthouse",
|
|
13121
13055
|
description: `Landing page performance audit. Metrics affecting Google Ads Quality Score.
|
|
@@ -13153,7 +13087,7 @@ Examples:
|
|
|
13153
13087
|
});
|
|
13154
13088
|
|
|
13155
13089
|
// src/commands/research/relevant-pages.ts
|
|
13156
|
-
import { defineCommand as
|
|
13090
|
+
import { defineCommand as defineCommand118 } from "citty";
|
|
13157
13091
|
registerSchema({
|
|
13158
13092
|
command: "research.relevant-pages",
|
|
13159
13093
|
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).",
|
|
@@ -13179,7 +13113,7 @@ var FIELDS11 = {
|
|
|
13179
13113
|
keywords: "Total organic keywords the page ranks for",
|
|
13180
13114
|
top_10: "Keywords in positions 1-10"
|
|
13181
13115
|
};
|
|
13182
|
-
var relevantPagesCommand =
|
|
13116
|
+
var relevantPagesCommand = defineCommand118({
|
|
13183
13117
|
meta: {
|
|
13184
13118
|
name: "relevant-pages",
|
|
13185
13119
|
description: `Get the top pages of a competitor domain with traffic data.
|
|
@@ -13225,7 +13159,7 @@ Examples:
|
|
|
13225
13159
|
});
|
|
13226
13160
|
|
|
13227
13161
|
// src/commands/research/web.ts
|
|
13228
|
-
import { defineCommand as
|
|
13162
|
+
import { defineCommand as defineCommand119 } from "citty";
|
|
13229
13163
|
registerSchema({
|
|
13230
13164
|
command: "research.web",
|
|
13231
13165
|
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).",
|
|
@@ -13276,7 +13210,7 @@ async function runDeepResearch(question) {
|
|
|
13276
13210
|
}
|
|
13277
13211
|
throw new Error("Deep research timed out");
|
|
13278
13212
|
}
|
|
13279
|
-
var webCommand =
|
|
13213
|
+
var webCommand = defineCommand119({
|
|
13280
13214
|
meta: {
|
|
13281
13215
|
name: "web",
|
|
13282
13216
|
description: `Search the web with AI to answer any open-ended marketing question. Uses live internet data via Google Search.
|
|
@@ -13336,7 +13270,7 @@ Examples:
|
|
|
13336
13270
|
});
|
|
13337
13271
|
|
|
13338
13272
|
// src/commands/research/index.ts
|
|
13339
|
-
var researchCommand =
|
|
13273
|
+
var researchCommand = defineCommand120({
|
|
13340
13274
|
meta: {
|
|
13341
13275
|
name: "research",
|
|
13342
13276
|
description: `Competitive intelligence and AI-powered research commands.
|
|
@@ -13376,10 +13310,10 @@ Examples:
|
|
|
13376
13310
|
});
|
|
13377
13311
|
|
|
13378
13312
|
// src/commands/scheduled-actions/index.ts
|
|
13379
|
-
import { defineCommand as
|
|
13313
|
+
import { defineCommand as defineCommand127 } from "citty";
|
|
13380
13314
|
|
|
13381
13315
|
// src/commands/scheduled-actions/create.ts
|
|
13382
|
-
import { defineCommand as
|
|
13316
|
+
import { defineCommand as defineCommand121 } from "citty";
|
|
13383
13317
|
|
|
13384
13318
|
// src/commands/scheduled-actions/shared.ts
|
|
13385
13319
|
var TEMP_SCHEDULED_ACTION_PREFIX = "temp_sched_";
|
|
@@ -13417,13 +13351,6 @@ function validateScheduledActionRef(ref) {
|
|
|
13417
13351
|
validateConvexId(ref);
|
|
13418
13352
|
}
|
|
13419
13353
|
}
|
|
13420
|
-
function parseTags(raw) {
|
|
13421
|
-
if (typeof raw !== "string") {
|
|
13422
|
-
return void 0;
|
|
13423
|
-
}
|
|
13424
|
-
const tags = raw.split(",").map((tag) => tag.trim()).filter(Boolean);
|
|
13425
|
-
return tags.length > 0 ? tags : void 0;
|
|
13426
|
-
}
|
|
13427
13354
|
function isNoSpawnAgentFlagSet(args) {
|
|
13428
13355
|
return args["no-spawn-agent"] === true || args.noSpawnAgent === true || args.spawnAgent === false;
|
|
13429
13356
|
}
|
|
@@ -13481,7 +13408,6 @@ registerSchema({
|
|
|
13481
13408
|
required: false
|
|
13482
13409
|
},
|
|
13483
13410
|
timezone: { type: "string", description: "IANA timezone override; defaults to Company Timezone", required: false },
|
|
13484
|
-
tag: { type: "string", description: "Tag slugs (comma-separated)", required: false },
|
|
13485
13411
|
disabled: { type: "boolean", description: "Create disabled", required: false, default: false },
|
|
13486
13412
|
"no-spawn-agent": {
|
|
13487
13413
|
type: "boolean",
|
|
@@ -13492,7 +13418,7 @@ registerSchema({
|
|
|
13492
13418
|
prompt: { type: "string", description: "Additional prompt instructions for the spawned agent", required: false }
|
|
13493
13419
|
}
|
|
13494
13420
|
});
|
|
13495
|
-
var
|
|
13421
|
+
var createCommand2 = defineCommand121({
|
|
13496
13422
|
meta: {
|
|
13497
13423
|
name: "create",
|
|
13498
13424
|
description: 'Stage a scheduled action. Example: baker scheduled-actions create --name "Weekly report" --description "..." --cron "0 9 * * MON"'
|
|
@@ -13503,7 +13429,6 @@ var createCommand3 = defineCommand126({
|
|
|
13503
13429
|
cron: { type: "string", description: "5-field cron expression", required: false },
|
|
13504
13430
|
"run-at": { type: "string", description: "ISO UTC timestamp ending in Z", required: false },
|
|
13505
13431
|
timezone: { type: "string", description: "IANA timezone override", required: false },
|
|
13506
|
-
tag: { type: "string", description: "Tag slugs (comma-separated)", required: false },
|
|
13507
13432
|
disabled: { type: "boolean", description: "Create disabled", required: false, default: false },
|
|
13508
13433
|
"no-spawn-agent": { type: "boolean", description: "Disable agent spawning", required: false, default: false },
|
|
13509
13434
|
prompt: { type: "string", description: "Additional spawned-agent instructions", required: false }
|
|
@@ -13529,10 +13454,6 @@ var createCommand3 = defineCommand126({
|
|
|
13529
13454
|
spawnAgent: !noSpawnAgent,
|
|
13530
13455
|
...schedule
|
|
13531
13456
|
};
|
|
13532
|
-
const tagSlugs = parseTags(args.tag);
|
|
13533
|
-
if (tagSlugs) {
|
|
13534
|
-
body.tagSlugs = tagSlugs;
|
|
13535
|
-
}
|
|
13536
13457
|
if (typeof args.prompt === "string") {
|
|
13537
13458
|
body.agentPrompt = args.prompt;
|
|
13538
13459
|
}
|
|
@@ -13545,7 +13466,7 @@ var createCommand3 = defineCommand126({
|
|
|
13545
13466
|
});
|
|
13546
13467
|
|
|
13547
13468
|
// src/commands/scheduled-actions/delete.ts
|
|
13548
|
-
import { defineCommand as
|
|
13469
|
+
import { defineCommand as defineCommand122 } from "citty";
|
|
13549
13470
|
registerSchema({
|
|
13550
13471
|
command: "scheduled-actions.delete",
|
|
13551
13472
|
description: "Stage deletion of a published scheduled action or cancellation of a temp_sched_* draft creation.",
|
|
@@ -13553,7 +13474,7 @@ registerSchema({
|
|
|
13553
13474
|
id: { type: "string", description: "Published scheduled action ID or temp_sched_* draft ID", required: true }
|
|
13554
13475
|
}
|
|
13555
13476
|
});
|
|
13556
|
-
var
|
|
13477
|
+
var deleteCommand2 = defineCommand122({
|
|
13557
13478
|
meta: {
|
|
13558
13479
|
name: "delete",
|
|
13559
13480
|
description: "Stage scheduled action deletion. Example: baker scheduled-actions delete <id-or-temp_sched_id>"
|
|
@@ -13582,7 +13503,7 @@ var deleteCommand3 = defineCommand127({
|
|
|
13582
13503
|
});
|
|
13583
13504
|
|
|
13584
13505
|
// src/commands/scheduled-actions/get.ts
|
|
13585
|
-
import { defineCommand as
|
|
13506
|
+
import { defineCommand as defineCommand123 } from "citty";
|
|
13586
13507
|
registerSchema({
|
|
13587
13508
|
command: "scheduled-actions.get",
|
|
13588
13509
|
description: "Get a published scheduled action or a temp_sched_* draft-created scheduled action.",
|
|
@@ -13590,7 +13511,7 @@ registerSchema({
|
|
|
13590
13511
|
id: { type: "string", description: "Published scheduled action ID or temp_sched_* draft ID", required: true }
|
|
13591
13512
|
}
|
|
13592
13513
|
});
|
|
13593
|
-
var getCommand3 =
|
|
13514
|
+
var getCommand3 = defineCommand123({
|
|
13594
13515
|
meta: {
|
|
13595
13516
|
name: "get",
|
|
13596
13517
|
description: "Get a scheduled action. Example: baker scheduled-actions get <id-or-temp_sched_id>"
|
|
@@ -13627,13 +13548,13 @@ var getCommand3 = defineCommand128({
|
|
|
13627
13548
|
});
|
|
13628
13549
|
|
|
13629
13550
|
// src/commands/scheduled-actions/list.ts
|
|
13630
|
-
import { defineCommand as
|
|
13551
|
+
import { defineCommand as defineCommand124 } from "citty";
|
|
13631
13552
|
registerSchema({
|
|
13632
13553
|
command: "scheduled-actions.list",
|
|
13633
13554
|
description: "List published scheduled actions. Includes draft state when BAKER_CHAT_ID is set.",
|
|
13634
13555
|
args: {}
|
|
13635
13556
|
});
|
|
13636
|
-
var
|
|
13557
|
+
var listCommand2 = defineCommand124({
|
|
13637
13558
|
meta: {
|
|
13638
13559
|
name: "list",
|
|
13639
13560
|
description: "List scheduled actions. Includes staged draft ops when BAKER_CHAT_ID is set."
|
|
@@ -13654,7 +13575,7 @@ var listCommand3 = defineCommand129({
|
|
|
13654
13575
|
});
|
|
13655
13576
|
|
|
13656
13577
|
// src/commands/scheduled-actions/trigger.ts
|
|
13657
|
-
import { defineCommand as
|
|
13578
|
+
import { defineCommand as defineCommand125 } from "citty";
|
|
13658
13579
|
registerSchema({
|
|
13659
13580
|
command: "scheduled-actions.trigger",
|
|
13660
13581
|
description: "Immediately trigger a published scheduled action. Does not require BAKER_CHAT_ID and rejects temp_sched_* IDs.",
|
|
@@ -13662,7 +13583,7 @@ registerSchema({
|
|
|
13662
13583
|
id: { type: "string", description: "Published scheduled action ID", required: true }
|
|
13663
13584
|
}
|
|
13664
13585
|
});
|
|
13665
|
-
var triggerCommand =
|
|
13586
|
+
var triggerCommand = defineCommand125({
|
|
13666
13587
|
meta: {
|
|
13667
13588
|
name: "trigger",
|
|
13668
13589
|
description: "Immediately trigger a published scheduled action. Example: baker scheduled-actions trigger <id>"
|
|
@@ -13699,7 +13620,7 @@ var triggerCommand = defineCommand130({
|
|
|
13699
13620
|
});
|
|
13700
13621
|
|
|
13701
13622
|
// src/commands/scheduled-actions/update.ts
|
|
13702
|
-
import { defineCommand as
|
|
13623
|
+
import { defineCommand as defineCommand126 } from "citty";
|
|
13703
13624
|
registerSchema({
|
|
13704
13625
|
command: "scheduled-actions.update",
|
|
13705
13626
|
description: "Stage an update to a published scheduled action or temp_sched_* draft-created scheduled action.",
|
|
@@ -13714,7 +13635,6 @@ registerSchema({
|
|
|
13714
13635
|
required: false
|
|
13715
13636
|
},
|
|
13716
13637
|
timezone: { type: "string", description: "IANA timezone override", required: false },
|
|
13717
|
-
tag: { type: "string", description: "Replacement tag slugs (comma-separated)", required: false },
|
|
13718
13638
|
enabled: { type: "string", description: "Replacement enabled state", required: false, enum: ["true", "false"] },
|
|
13719
13639
|
"spawn-agent": {
|
|
13720
13640
|
type: "string",
|
|
@@ -13725,7 +13645,7 @@ registerSchema({
|
|
|
13725
13645
|
prompt: { type: "string", description: "Replacement additional spawned-agent instructions", required: false }
|
|
13726
13646
|
}
|
|
13727
13647
|
});
|
|
13728
|
-
var
|
|
13648
|
+
var updateCommand2 = defineCommand126({
|
|
13729
13649
|
meta: {
|
|
13730
13650
|
name: "update",
|
|
13731
13651
|
description: "Stage a scheduled action update. Example: baker scheduled-actions update <id> --enabled false"
|
|
@@ -13742,7 +13662,6 @@ var updateCommand3 = defineCommand131({
|
|
|
13742
13662
|
cron: { type: "string", description: "5-field cron expression", required: false },
|
|
13743
13663
|
"run-at": { type: "string", description: "ISO UTC timestamp ending in Z", required: false },
|
|
13744
13664
|
timezone: { type: "string", description: "IANA timezone override", required: false },
|
|
13745
|
-
tag: { type: "string", description: "Replacement tag slugs (comma-separated)", required: false },
|
|
13746
13665
|
enabled: { type: "string", description: "true|false", required: false },
|
|
13747
13666
|
"spawn-agent": { type: "string", description: "true|false", required: false },
|
|
13748
13667
|
prompt: { type: "string", description: "Replacement additional spawned-agent instructions", required: false }
|
|
@@ -13767,14 +13686,6 @@ var updateCommand3 = defineCommand131({
|
|
|
13767
13686
|
Object.assign(body, schedule);
|
|
13768
13687
|
hasPatch = true;
|
|
13769
13688
|
}
|
|
13770
|
-
const tagSlugs = parseTags(args.tag);
|
|
13771
|
-
if (tagSlugs) {
|
|
13772
|
-
body.tagSlugs = tagSlugs;
|
|
13773
|
-
hasPatch = true;
|
|
13774
|
-
} else if (typeof args.tag === "string") {
|
|
13775
|
-
body.tagSlugs = [];
|
|
13776
|
-
hasPatch = true;
|
|
13777
|
-
}
|
|
13778
13689
|
const enabled = parseBooleanFlag(args.enabled, "--enabled");
|
|
13779
13690
|
if (enabled !== void 0) {
|
|
13780
13691
|
body.enabled = enabled;
|
|
@@ -13791,7 +13702,7 @@ var updateCommand3 = defineCommand131({
|
|
|
13791
13702
|
}
|
|
13792
13703
|
if (!hasPatch) {
|
|
13793
13704
|
failValidation2(
|
|
13794
|
-
"Provide at least one of --name, --description, --cron, --run-at, --timezone, --
|
|
13705
|
+
"Provide at least one of --name, --description, --cron, --run-at, --timezone, --enabled, --spawn-agent, --prompt."
|
|
13795
13706
|
);
|
|
13796
13707
|
}
|
|
13797
13708
|
body.chatId = requireChatId();
|
|
@@ -13804,7 +13715,7 @@ var updateCommand3 = defineCommand131({
|
|
|
13804
13715
|
});
|
|
13805
13716
|
|
|
13806
13717
|
// src/commands/scheduled-actions/index.ts
|
|
13807
|
-
var scheduledActionsCommand =
|
|
13718
|
+
var scheduledActionsCommand = defineCommand127({
|
|
13808
13719
|
meta: {
|
|
13809
13720
|
name: "scheduled-actions",
|
|
13810
13721
|
description: `Manage Scheduled Actions. Subcommands: list, get, create, update, delete, trigger.
|
|
@@ -13820,18 +13731,18 @@ Examples:
|
|
|
13820
13731
|
baker scheduled-actions trigger <id>`
|
|
13821
13732
|
},
|
|
13822
13733
|
subCommands: {
|
|
13823
|
-
list:
|
|
13734
|
+
list: listCommand2,
|
|
13824
13735
|
get: getCommand3,
|
|
13825
|
-
create:
|
|
13826
|
-
update:
|
|
13827
|
-
delete:
|
|
13736
|
+
create: createCommand2,
|
|
13737
|
+
update: updateCommand2,
|
|
13738
|
+
delete: deleteCommand2,
|
|
13828
13739
|
trigger: triggerCommand
|
|
13829
13740
|
}
|
|
13830
13741
|
});
|
|
13831
13742
|
|
|
13832
13743
|
// src/commands/schema.ts
|
|
13833
|
-
import { defineCommand as
|
|
13834
|
-
var schemaCommand =
|
|
13744
|
+
import { defineCommand as defineCommand128 } from "citty";
|
|
13745
|
+
var schemaCommand = defineCommand128({
|
|
13835
13746
|
meta: {
|
|
13836
13747
|
name: "schema",
|
|
13837
13748
|
description: "Inspect command argument schemas (for AI agent introspection). Lists all commands if no argument given. Example: baker schema images.search"
|
|
@@ -13867,10 +13778,10 @@ var schemaCommand = defineCommand133({
|
|
|
13867
13778
|
});
|
|
13868
13779
|
|
|
13869
13780
|
// src/commands/testimonials/index.ts
|
|
13870
|
-
import { defineCommand as
|
|
13781
|
+
import { defineCommand as defineCommand132 } from "citty";
|
|
13871
13782
|
|
|
13872
13783
|
// src/commands/testimonials/get.ts
|
|
13873
|
-
import { defineCommand as
|
|
13784
|
+
import { defineCommand as defineCommand129 } from "citty";
|
|
13874
13785
|
registerSchema({
|
|
13875
13786
|
command: "testimonials.get",
|
|
13876
13787
|
description: "Get a single testimonial by ID",
|
|
@@ -13878,7 +13789,7 @@ registerSchema({
|
|
|
13878
13789
|
id: { type: "string", description: "Testimonial ID", required: true }
|
|
13879
13790
|
}
|
|
13880
13791
|
});
|
|
13881
|
-
var getCommand4 =
|
|
13792
|
+
var getCommand4 = defineCommand129({
|
|
13882
13793
|
meta: { name: "get", description: "Get a single testimonial by ID. Example: baker testimonials get j571abc123" },
|
|
13883
13794
|
args: {
|
|
13884
13795
|
id: { type: "positional", description: "Testimonial ID", required: false },
|
|
@@ -13915,7 +13826,7 @@ var getCommand4 = defineCommand134({
|
|
|
13915
13826
|
});
|
|
13916
13827
|
|
|
13917
13828
|
// src/commands/testimonials/list.ts
|
|
13918
|
-
import { defineCommand as
|
|
13829
|
+
import { defineCommand as defineCommand130 } from "citty";
|
|
13919
13830
|
registerSchema({
|
|
13920
13831
|
command: "testimonials.list",
|
|
13921
13832
|
description: "List testimonials with optional filters.",
|
|
@@ -13945,7 +13856,7 @@ registerSchema({
|
|
|
13945
13856
|
limit: { type: "number", description: "Max results (default 50)", required: false, default: 50 }
|
|
13946
13857
|
}
|
|
13947
13858
|
});
|
|
13948
|
-
var
|
|
13859
|
+
var listCommand3 = defineCommand130({
|
|
13949
13860
|
meta: {
|
|
13950
13861
|
name: "list",
|
|
13951
13862
|
description: "List testimonials with optional filters. Example: baker testimonials list --source google --sentiment positive"
|
|
@@ -13994,7 +13905,7 @@ var listCommand4 = defineCommand135({
|
|
|
13994
13905
|
});
|
|
13995
13906
|
|
|
13996
13907
|
// src/commands/testimonials/search.ts
|
|
13997
|
-
import { defineCommand as
|
|
13908
|
+
import { defineCommand as defineCommand131 } from "citty";
|
|
13998
13909
|
registerSchema({
|
|
13999
13910
|
command: "testimonials.search",
|
|
14000
13911
|
description: "Search testimonials by text query. Uses hybrid BM25 + vector + reranking.",
|
|
@@ -14025,7 +13936,7 @@ registerSchema({
|
|
|
14025
13936
|
tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
|
|
14026
13937
|
}
|
|
14027
13938
|
});
|
|
14028
|
-
var searchCommand2 =
|
|
13939
|
+
var searchCommand2 = defineCommand131({
|
|
14029
13940
|
meta: {
|
|
14030
13941
|
name: "search",
|
|
14031
13942
|
description: "Semantic search testimonials by text query. Uses hybrid BM25 + vector + reranking. Example: baker testimonials search 'great service' --rating-min 4"
|
|
@@ -14096,7 +14007,7 @@ var searchCommand2 = defineCommand136({
|
|
|
14096
14007
|
});
|
|
14097
14008
|
|
|
14098
14009
|
// src/commands/testimonials/index.ts
|
|
14099
|
-
var testimonialsCommand =
|
|
14010
|
+
var testimonialsCommand = defineCommand132({
|
|
14100
14011
|
meta: {
|
|
14101
14012
|
name: "testimonials",
|
|
14102
14013
|
description: `Find and browse testimonials in Baker. Subcommands: search, get, list.
|
|
@@ -14110,15 +14021,15 @@ Examples:
|
|
|
14110
14021
|
subCommands: {
|
|
14111
14022
|
get: getCommand4,
|
|
14112
14023
|
search: searchCommand2,
|
|
14113
|
-
list:
|
|
14024
|
+
list: listCommand3
|
|
14114
14025
|
}
|
|
14115
14026
|
});
|
|
14116
14027
|
|
|
14117
14028
|
// src/commands/videos/index.ts
|
|
14118
|
-
import { defineCommand as
|
|
14029
|
+
import { defineCommand as defineCommand137 } from "citty";
|
|
14119
14030
|
|
|
14120
14031
|
// src/commands/videos/delete.ts
|
|
14121
|
-
import { defineCommand as
|
|
14032
|
+
import { defineCommand as defineCommand133 } from "citty";
|
|
14122
14033
|
registerSchema({
|
|
14123
14034
|
command: "videos.delete",
|
|
14124
14035
|
description: "Delete a video by ID",
|
|
@@ -14132,7 +14043,7 @@ registerSchema({
|
|
|
14132
14043
|
}
|
|
14133
14044
|
}
|
|
14134
14045
|
});
|
|
14135
|
-
var
|
|
14046
|
+
var deleteCommand3 = defineCommand133({
|
|
14136
14047
|
meta: {
|
|
14137
14048
|
name: "delete",
|
|
14138
14049
|
description: "Delete a video by ID. Use --dry-run to preview. Example: baker videos delete j571abc123 --dry-run"
|
|
@@ -14173,7 +14084,7 @@ var deleteCommand4 = defineCommand138({
|
|
|
14173
14084
|
});
|
|
14174
14085
|
|
|
14175
14086
|
// src/commands/videos/get.ts
|
|
14176
|
-
import { defineCommand as
|
|
14087
|
+
import { defineCommand as defineCommand134 } from "citty";
|
|
14177
14088
|
registerSchema({
|
|
14178
14089
|
command: "videos.get",
|
|
14179
14090
|
description: "Get a single video by ID",
|
|
@@ -14181,7 +14092,7 @@ registerSchema({
|
|
|
14181
14092
|
id: { type: "string", description: "Video ID", required: true }
|
|
14182
14093
|
}
|
|
14183
14094
|
});
|
|
14184
|
-
var getCommand5 =
|
|
14095
|
+
var getCommand5 = defineCommand134({
|
|
14185
14096
|
meta: { name: "get", description: "Get a single video by ID. Example: baker videos get j571abc123" },
|
|
14186
14097
|
args: {
|
|
14187
14098
|
id: { type: "positional", description: "Video ID", required: false },
|
|
@@ -14218,7 +14129,7 @@ var getCommand5 = defineCommand139({
|
|
|
14218
14129
|
});
|
|
14219
14130
|
|
|
14220
14131
|
// src/commands/videos/search.ts
|
|
14221
|
-
import { defineCommand as
|
|
14132
|
+
import { defineCommand as defineCommand135 } from "citty";
|
|
14222
14133
|
registerSchema({
|
|
14223
14134
|
command: "videos.search",
|
|
14224
14135
|
description: "Search videos by text query. Only returns ready videos.",
|
|
@@ -14228,7 +14139,7 @@ registerSchema({
|
|
|
14228
14139
|
tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
|
|
14229
14140
|
}
|
|
14230
14141
|
});
|
|
14231
|
-
var searchCommand3 =
|
|
14142
|
+
var searchCommand3 = defineCommand135({
|
|
14232
14143
|
meta: {
|
|
14233
14144
|
name: "search",
|
|
14234
14145
|
description: "Semantic search videos by text query. Uses hybrid BM25 + vector + reranking. Example: baker videos search 'product demo' --tags tutorial"
|
|
@@ -14275,9 +14186,9 @@ var searchCommand3 = defineCommand140({
|
|
|
14275
14186
|
});
|
|
14276
14187
|
|
|
14277
14188
|
// src/commands/videos/upload.ts
|
|
14278
|
-
import { readFile as
|
|
14189
|
+
import { readFile as readFile9, stat as stat3 } from "fs/promises";
|
|
14279
14190
|
import { extname as extname3 } from "path";
|
|
14280
|
-
import { defineCommand as
|
|
14191
|
+
import { defineCommand as defineCommand136 } from "citty";
|
|
14281
14192
|
var MIME_MAP2 = {
|
|
14282
14193
|
".mp4": "video/mp4",
|
|
14283
14194
|
".mov": "video/quicktime",
|
|
@@ -14311,7 +14222,7 @@ function detectContentType2(filePath) {
|
|
|
14311
14222
|
}
|
|
14312
14223
|
return mime;
|
|
14313
14224
|
}
|
|
14314
|
-
var uploadCommand2 =
|
|
14225
|
+
var uploadCommand2 = defineCommand136({
|
|
14315
14226
|
meta: {
|
|
14316
14227
|
name: "upload",
|
|
14317
14228
|
description: "Upload a video file to Baker via Mux direct upload. Auto-detects content type. Example: baker videos upload ./demo.mp4"
|
|
@@ -14340,7 +14251,7 @@ var uploadCommand2 = defineCommand141({
|
|
|
14340
14251
|
return;
|
|
14341
14252
|
}
|
|
14342
14253
|
const { uploadUrl, videoId } = await apiPost("/api/videos/upload", {});
|
|
14343
|
-
const fileBuffer = await
|
|
14254
|
+
const fileBuffer = await readFile9(filePath);
|
|
14344
14255
|
const uploadResponse = await fetch(uploadUrl, {
|
|
14345
14256
|
method: "PUT",
|
|
14346
14257
|
headers: { "Content-Type": contentType },
|
|
@@ -14365,7 +14276,7 @@ var uploadCommand2 = defineCommand141({
|
|
|
14365
14276
|
});
|
|
14366
14277
|
|
|
14367
14278
|
// src/commands/videos/index.ts
|
|
14368
|
-
var videosCommand =
|
|
14279
|
+
var videosCommand = defineCommand137({
|
|
14369
14280
|
meta: {
|
|
14370
14281
|
name: "videos",
|
|
14371
14282
|
description: `Find and manage videos in Baker. Subcommands: search, get, upload, delete.
|
|
@@ -14381,7 +14292,7 @@ Examples:
|
|
|
14381
14292
|
get: getCommand5,
|
|
14382
14293
|
search: searchCommand3,
|
|
14383
14294
|
upload: uploadCommand2,
|
|
14384
|
-
delete:
|
|
14295
|
+
delete: deleteCommand3
|
|
14385
14296
|
}
|
|
14386
14297
|
});
|
|
14387
14298
|
|
|
@@ -14402,7 +14313,7 @@ function getCliVersion() {
|
|
|
14402
14313
|
}
|
|
14403
14314
|
|
|
14404
14315
|
// src/cli.ts
|
|
14405
|
-
var main =
|
|
14316
|
+
var main = defineCommand138({
|
|
14406
14317
|
meta: {
|
|
14407
14318
|
name: "baker",
|
|
14408
14319
|
version: getCliVersion(),
|