@koda-sl/baker-cli 0.852.0-dev.65f932cdf → 0.852.0-dev.d40dfecc3

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.
Files changed (64) hide show
  1. package/README.md +5 -1
  2. package/dist/{accounts-FGWJDM52.js → accounts-5ZMP7KU7.js} +1 -1
  3. package/dist/{analytics-KA3THH3F.js → analytics-RIZ4RJ6O.js} +4 -4
  4. package/dist/changes-6UGDHAZW.js +539 -0
  5. package/dist/changes-6UGDHAZW.js.map +1 -0
  6. package/dist/{chunk-YL7XIJ43.js → chunk-A6B45KSH.js} +2 -1
  7. package/dist/{chunk-YL7XIJ43.js.map → chunk-A6B45KSH.js.map} +1 -1
  8. package/dist/{chunk-EHDZONE6.js → chunk-QSZRATGC.js} +2 -2
  9. package/dist/{chunk-H3CYVM4E.js → chunk-TWSIY2FS.js} +3 -7
  10. package/dist/chunk-TWSIY2FS.js.map +1 -0
  11. package/dist/{chunk-ZWANN4QQ.js → chunk-WYBX53EI.js} +2 -1
  12. package/dist/cli.js +10 -10
  13. package/dist/{create-KGRQQ7WA.js → create-NR4WX6PS.js} +3 -3
  14. package/dist/{delete-XAVEVESN.js → delete-5P6K4EOJ.js} +3 -3
  15. package/dist/{draft-BO5QGZBG.js → draft-4DFLYVL6.js} +2 -2
  16. package/dist/{get-H5CUQP7G.js → get-I77O6MRD.js} +3 -3
  17. package/dist/{history-AGCS2TKY.js → history-DD3UWZZ4.js} +3 -3
  18. package/dist/{hubspot-NG2KTQDY.js → hubspot-W5LYFWTH.js} +2 -2
  19. package/dist/{list-DBZ3AGW2.js → list-VQNYW5R4.js} +3 -3
  20. package/dist/{media-sources-NI6U2YWV.js → media-sources-ZY7S74U2.js} +1 -1
  21. package/dist/{plan-LVTD6FZI.js → plan-YP5D6JXM.js} +2 -2
  22. package/dist/{posts-GX6MUVUG.js → posts-B5DGAKAC.js} +1 -1
  23. package/dist/{read-T7HYDHSS.js → read-OMNUPQ77.js} +2 -2
  24. package/dist/{run-HCYK5ZAX.js → run-TPAZDCY2.js} +3 -3
  25. package/dist/{scheduled-agents-YHZUPS2I.js → scheduled-agents-NODIHKKM.js} +11 -11
  26. package/dist/{schema-NIYT4JHM.js → schema-JCAV2D44.js} +2 -2
  27. package/dist/{sources-DVNWHBF5.js → sources-G7QWYL2J.js} +4 -10
  28. package/dist/sources-G7QWYL2J.js.map +1 -0
  29. package/dist/{tag-manager-SL6FDPER.js → tag-manager-YUUNKP7Q.js} +11 -9
  30. package/dist/tag-manager-YUUNKP7Q.js.map +1 -0
  31. package/dist/{targets-5A5SOQJM.js → targets-BVAFNU4K.js} +3 -3
  32. package/dist/{triggers-PH33IQLK.js → triggers-AALSXPLW.js} +3 -3
  33. package/dist/{unstage-52VGCJWF.js → unstage-BVNREABR.js} +3 -3
  34. package/dist/{update-RD27CPMN.js → update-HYZXKLZ7.js} +3 -3
  35. package/dist/{winning-ads-274QKPKB.js → winning-ads-QRBI3TLN.js} +1 -1
  36. package/dist/{write-commands-M2CV6P4R.js → write-commands-YECHEWMG.js} +2 -2
  37. package/package.json +1 -1
  38. package/dist/chunk-H3CYVM4E.js.map +0 -1
  39. package/dist/sources-DVNWHBF5.js.map +0 -1
  40. package/dist/tag-manager-SL6FDPER.js.map +0 -1
  41. /package/dist/{accounts-FGWJDM52.js.map → accounts-5ZMP7KU7.js.map} +0 -0
  42. /package/dist/{analytics-KA3THH3F.js.map → analytics-RIZ4RJ6O.js.map} +0 -0
  43. /package/dist/{chunk-EHDZONE6.js.map → chunk-QSZRATGC.js.map} +0 -0
  44. /package/dist/{chunk-ZWANN4QQ.js.map → chunk-WYBX53EI.js.map} +0 -0
  45. /package/dist/{create-KGRQQ7WA.js.map → create-NR4WX6PS.js.map} +0 -0
  46. /package/dist/{delete-XAVEVESN.js.map → delete-5P6K4EOJ.js.map} +0 -0
  47. /package/dist/{draft-BO5QGZBG.js.map → draft-4DFLYVL6.js.map} +0 -0
  48. /package/dist/{get-H5CUQP7G.js.map → get-I77O6MRD.js.map} +0 -0
  49. /package/dist/{history-AGCS2TKY.js.map → history-DD3UWZZ4.js.map} +0 -0
  50. /package/dist/{hubspot-NG2KTQDY.js.map → hubspot-W5LYFWTH.js.map} +0 -0
  51. /package/dist/{list-DBZ3AGW2.js.map → list-VQNYW5R4.js.map} +0 -0
  52. /package/dist/{media-sources-NI6U2YWV.js.map → media-sources-ZY7S74U2.js.map} +0 -0
  53. /package/dist/{plan-LVTD6FZI.js.map → plan-YP5D6JXM.js.map} +0 -0
  54. /package/dist/{posts-GX6MUVUG.js.map → posts-B5DGAKAC.js.map} +0 -0
  55. /package/dist/{read-T7HYDHSS.js.map → read-OMNUPQ77.js.map} +0 -0
  56. /package/dist/{run-HCYK5ZAX.js.map → run-TPAZDCY2.js.map} +0 -0
  57. /package/dist/{scheduled-agents-YHZUPS2I.js.map → scheduled-agents-NODIHKKM.js.map} +0 -0
  58. /package/dist/{schema-NIYT4JHM.js.map → schema-JCAV2D44.js.map} +0 -0
  59. /package/dist/{targets-5A5SOQJM.js.map → targets-BVAFNU4K.js.map} +0 -0
  60. /package/dist/{triggers-PH33IQLK.js.map → triggers-AALSXPLW.js.map} +0 -0
  61. /package/dist/{unstage-52VGCJWF.js.map → unstage-BVNREABR.js.map} +0 -0
  62. /package/dist/{update-RD27CPMN.js.map → update-HYZXKLZ7.js.map} +0 -0
  63. /package/dist/{winning-ads-274QKPKB.js.map → winning-ads-QRBI3TLN.js.map} +0 -0
  64. /package/dist/{write-commands-M2CV6P4R.js.map → write-commands-YECHEWMG.js.map} +0 -0
package/dist/cli.js CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  agentProfile,
15
15
  applyAgentProfile,
16
16
  loadCommands
17
- } from "./chunk-YL7XIJ43.js";
17
+ } from "./chunk-A6B45KSH.js";
18
18
  import {
19
19
  setOpenRouterCommand
20
20
  } from "./chunk-4BRNQDYX.js";
@@ -693,10 +693,10 @@ Introspection: Run 'baker schema <command>' to inspect argument schemas.`
693
693
  subCommands: {
694
694
  capabilities: () => import("./capabilities-U53QPNBQ.js").then((m) => m.capabilitiesCommand),
695
695
  actions: () => import("./actions-Q7DDN427.js").then((m) => m.actionsCommand),
696
- "scheduled-agents": () => import("./scheduled-agents-YHZUPS2I.js").then((m) => m.scheduledAgentsCommand),
696
+ "scheduled-agents": () => import("./scheduled-agents-NODIHKKM.js").then((m) => m.scheduledAgentsCommand),
697
697
  ads: () => import("./ads-BYETTX2Y.js").then((m) => m.adsCommand),
698
698
  brand: () => import("./brand-SDDWXOOT.js").then((m) => m.brandCommand),
699
- analytics: () => import("./analytics-KA3THH3F.js").then((m) => m.analyticsCommand),
699
+ analytics: () => import("./analytics-RIZ4RJ6O.js").then((m) => m.analyticsCommand),
700
700
  experiment: () => import("./experiment-WEWASTVO.js").then((m) => m.experimentCommand),
701
701
  ga4: () => import("./ga4-XVCLJG6R.js").then((m) => m.ga4Command),
702
702
  gsc: () => import("./gsc-WR65MURL.js").then((m) => m.gscCommand),
@@ -717,18 +717,18 @@ Introspection: Run 'baker schema <command>' to inspect argument schemas.`
717
717
  testimonials: () => import("./testimonials-RIL2ARX7.js").then((m) => m.testimonialsCommand),
718
718
  canvas: () => import("./canvas-6CWER4CP.js").then((m) => m.canvasCommand),
719
719
  tags: () => import("./tags-M57YBWGW.js").then((m) => m.tagsCommand),
720
- "tag-manager": () => import("./tag-manager-SL6FDPER.js").then((m) => m.tagManagerCommand),
720
+ "tag-manager": () => import("./tag-manager-YUUNKP7Q.js").then((m) => m.tagManagerCommand),
721
721
  chats: () => import("./chats-QVGXEYT6.js").then((m) => m.chatsCommand),
722
722
  history: () => import("./history-M6VLA7TD.js").then((m) => m.historyCommand),
723
723
  credentials: () => import("./credentials-T7F2PFNY.js").then((m) => m.credentialsCommand),
724
- hubspot: () => import("./hubspot-NG2KTQDY.js").then((m) => m.hubspotCommand),
724
+ hubspot: () => import("./hubspot-W5LYFWTH.js").then((m) => m.hubspotCommand),
725
725
  activecampaign: () => import("./activecampaign-BAWTDTSA.js").then((m) => m.activecampaignCommand),
726
726
  pipedrive: () => import("./pipedrive-7AA7ZD7M.js").then((m) => m.pipedriveCommand),
727
- accounts: () => import("./accounts-FGWJDM52.js").then((m) => m.accountsCommand),
727
+ accounts: () => import("./accounts-5ZMP7KU7.js").then((m) => m.accountsCommand),
728
728
  shopify: () => import("./shopify-ZQFONX3R.js").then((m) => m.shopifyCommand),
729
- "winning-ads": () => import("./winning-ads-274QKPKB.js").then((m) => m.winningAdsCommand),
730
- "media-sources": () => import("./media-sources-NI6U2YWV.js").then((m) => m.mediaSourcesCommand),
731
- posts: () => import("./posts-GX6MUVUG.js").then((m) => m.postsCommand),
729
+ "winning-ads": () => import("./winning-ads-QRBI3TLN.js").then((m) => m.winningAdsCommand),
730
+ "media-sources": () => import("./media-sources-ZY7S74U2.js").then((m) => m.mediaSourcesCommand),
731
+ posts: () => import("./posts-B5DGAKAC.js").then((m) => m.postsCommand),
732
732
  site: () => import("./site-X43NFWHL.js").then((m) => m.siteCommand),
733
733
  "lead-routes": () => import("./lead-routes-LKWVY645.js").then((m) => m.leadRoutesCommand),
734
734
  mcp: () => import("./mcp-FIBT4HAH.js").then((m) => m.mcpCommand),
@@ -736,7 +736,7 @@ Introspection: Run 'baker schema <command>' to inspect argument schemas.`
736
736
  feedback: () => import("./feedback-FZTJATY7.js").then((m) => m.feedbackCommand),
737
737
  visuals: () => import("./visuals-L73TEVWN.js").then((m) => m.visualsCommand),
738
738
  organization: () => import("./organization-RTJDOJEV.js").then((m) => m.organizationCommand),
739
- schema: () => import("./schema-NIYT4JHM.js").then((m) => m.schemaCommand)
739
+ schema: () => import("./schema-JCAV2D44.js").then((m) => m.schemaCommand)
740
740
  }
741
741
  });
742
742
 
@@ -18,11 +18,11 @@ import {
18
18
  promptFromArgs,
19
19
  reactionBody,
20
20
  refuseAutoPublish
21
- } from "./chunk-EHDZONE6.js";
21
+ } from "./chunk-QSZRATGC.js";
22
22
  import "./chunk-NYUWPJ4K.js";
23
23
  import "./chunk-NKQWDEB7.js";
24
24
  import "./chunk-KLO3TPTS.js";
25
- import "./chunk-YL7XIJ43.js";
25
+ import "./chunk-A6B45KSH.js";
26
26
  import "./chunk-624DWMDW.js";
27
27
  import "./chunk-RJHGIRU2.js";
28
28
  import "./chunk-WCU362Z6.js";
@@ -187,4 +187,4 @@ Every flag in full: baker schema scheduled-agents.create`
187
187
  export {
188
188
  createCommand
189
189
  };
190
- //# sourceMappingURL=create-KGRQQ7WA.js.map
190
+ //# sourceMappingURL=create-NR4WX6PS.js.map
@@ -3,11 +3,11 @@ import {
3
3
  failValidation,
4
4
  validateScheduledAgentRef,
5
5
  writeOk
6
- } from "./chunk-EHDZONE6.js";
6
+ } from "./chunk-QSZRATGC.js";
7
7
  import "./chunk-NYUWPJ4K.js";
8
8
  import "./chunk-NKQWDEB7.js";
9
9
  import "./chunk-KLO3TPTS.js";
10
- import "./chunk-YL7XIJ43.js";
10
+ import "./chunk-A6B45KSH.js";
11
11
  import "./chunk-624DWMDW.js";
12
12
  import "./chunk-RJHGIRU2.js";
13
13
  import "./chunk-WCU362Z6.js";
@@ -68,4 +68,4 @@ var deleteCommand = defineCommand({
68
68
  export {
69
69
  deleteCommand
70
70
  };
71
- //# sourceMappingURL=delete-XAVEVESN.js.map
71
+ //# sourceMappingURL=delete-5P6K4EOJ.js.map
@@ -3,7 +3,7 @@ import {
3
3
  draftList,
4
4
  loadJsonArg,
5
5
  requireTarget
6
- } from "./chunk-ZWANN4QQ.js";
6
+ } from "./chunk-WYBX53EI.js";
7
7
  import {
8
8
  amendDraftRefs,
9
9
  draftRefs,
@@ -150,4 +150,4 @@ var draftCommand = defineCommand({
150
150
  export {
151
151
  draftCommand
152
152
  };
153
- //# sourceMappingURL=draft-BO5QGZBG.js.map
153
+ //# sourceMappingURL=draft-4DFLYVL6.js.map
@@ -3,7 +3,7 @@ import {
3
3
  failValidation,
4
4
  isTempScheduledAgentId,
5
5
  validateScheduledAgentRef
6
- } from "./chunk-EHDZONE6.js";
6
+ } from "./chunk-QSZRATGC.js";
7
7
  import "./chunk-NYUWPJ4K.js";
8
8
  import "./chunk-NKQWDEB7.js";
9
9
  import "./chunk-KLO3TPTS.js";
@@ -15,7 +15,7 @@ import {
15
15
  positionalTargets,
16
16
  writeTargetRows
17
17
  } from "./chunk-VDZD56G6.js";
18
- import "./chunk-YL7XIJ43.js";
18
+ import "./chunk-A6B45KSH.js";
19
19
  import "./chunk-624DWMDW.js";
20
20
  import "./chunk-RJHGIRU2.js";
21
21
  import "./chunk-WCU362Z6.js";
@@ -111,4 +111,4 @@ var getCommand = defineCommand({
111
111
  export {
112
112
  getCommand
113
113
  };
114
- //# sourceMappingURL=get-H5CUQP7G.js.map
114
+ //# sourceMappingURL=get-I77O6MRD.js.map
@@ -2,11 +2,11 @@ import {
2
2
  failApi,
3
3
  failValidation,
4
4
  validateScheduledAgentRef
5
- } from "./chunk-EHDZONE6.js";
5
+ } from "./chunk-QSZRATGC.js";
6
6
  import "./chunk-NYUWPJ4K.js";
7
7
  import "./chunk-NKQWDEB7.js";
8
8
  import "./chunk-KLO3TPTS.js";
9
- import "./chunk-YL7XIJ43.js";
9
+ import "./chunk-A6B45KSH.js";
10
10
  import "./chunk-624DWMDW.js";
11
11
  import "./chunk-RJHGIRU2.js";
12
12
  import "./chunk-WCU362Z6.js";
@@ -105,4 +105,4 @@ function historyOnly(raw) {
105
105
  export {
106
106
  historyCommand
107
107
  };
108
- //# sourceMappingURL=history-AGCS2TKY.js.map
108
+ //# sourceMappingURL=history-DD3UWZZ4.js.map
@@ -1,4 +1,4 @@
1
- import "./chunk-H3CYVM4E.js";
1
+ import "./chunk-TWSIY2FS.js";
2
2
  import {
3
3
  failNotConnected
4
4
  } from "./chunk-YBSRIW5S.js";
@@ -850,4 +850,4 @@ export {
850
850
  hubspotCommand,
851
851
  workflowViewHints
852
852
  };
853
- //# sourceMappingURL=hubspot-NG2KTQDY.js.map
853
+ //# sourceMappingURL=hubspot-W5LYFWTH.js.map
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  failApi,
3
3
  failValidation
4
- } from "./chunk-EHDZONE6.js";
4
+ } from "./chunk-QSZRATGC.js";
5
5
  import "./chunk-NYUWPJ4K.js";
6
6
  import "./chunk-NKQWDEB7.js";
7
7
  import "./chunk-KLO3TPTS.js";
8
8
  import {
9
9
  CHAT_READ_ARG
10
10
  } from "./chunk-X32MFGWW.js";
11
- import "./chunk-YL7XIJ43.js";
11
+ import "./chunk-A6B45KSH.js";
12
12
  import {
13
13
  TRIGGER_KIND_IDS,
14
14
  isTriggerKind
@@ -86,4 +86,4 @@ var listCommand = defineCommand({
86
86
  export {
87
87
  listCommand
88
88
  };
89
- //# sourceMappingURL=list-DBZ3AGW2.js.map
89
+ //# sourceMappingURL=list-VQNYW5R4.js.map
@@ -32,4 +32,4 @@ Full guide: __tooling__/docs/tools/baker/media-sources.md`
32
32
  export {
33
33
  mediaSourcesCommand
34
34
  };
35
- //# sourceMappingURL=media-sources-NI6U2YWV.js.map
35
+ //# sourceMappingURL=media-sources-ZY7S74U2.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-5YOMORZ2.js";
4
4
  import {
5
5
  TAG_MANAGER_TIMEOUT_MS
6
- } from "./chunk-ZWANN4QQ.js";
6
+ } from "./chunk-WYBX53EI.js";
7
7
  import {
8
8
  trackingPlanErrorEnvelope
9
9
  } from "./chunk-STWMK24H.js";
@@ -210,4 +210,4 @@ var planCommand = defineCommand({
210
210
  export {
211
211
  planCommand
212
212
  };
213
- //# sourceMappingURL=plan-LVTD6FZI.js.map
213
+ //# sourceMappingURL=plan-YP5D6JXM.js.map
@@ -33,4 +33,4 @@ Full guide: __tooling__/docs/tools/baker/posts.md`
33
33
  export {
34
34
  postsCommand
35
35
  };
36
- //# sourceMappingURL=posts-GX6MUVUG.js.map
36
+ //# sourceMappingURL=posts-B5DGAKAC.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  TAG_MANAGER_TIMEOUT_MS,
3
3
  handleError
4
- } from "./chunk-ZWANN4QQ.js";
4
+ } from "./chunk-WYBX53EI.js";
5
5
  import {
6
6
  connectedResourceHints
7
7
  } from "./chunk-P4NSJS54.js";
@@ -163,4 +163,4 @@ export {
163
163
  containersHints,
164
164
  readCommand
165
165
  };
166
- //# sourceMappingURL=read-T7HYDHSS.js.map
166
+ //# sourceMappingURL=read-OMNUPQ77.js.map
@@ -2,11 +2,11 @@ import {
2
2
  failApi,
3
3
  failValidation,
4
4
  isTempScheduledAgentId
5
- } from "./chunk-EHDZONE6.js";
5
+ } from "./chunk-QSZRATGC.js";
6
6
  import "./chunk-NYUWPJ4K.js";
7
7
  import "./chunk-NKQWDEB7.js";
8
8
  import "./chunk-KLO3TPTS.js";
9
- import "./chunk-YL7XIJ43.js";
9
+ import "./chunk-A6B45KSH.js";
10
10
  import "./chunk-624DWMDW.js";
11
11
  import "./chunk-RJHGIRU2.js";
12
12
  import "./chunk-WCU362Z6.js";
@@ -70,4 +70,4 @@ var runCommand = defineCommand({
70
70
  export {
71
71
  runCommand
72
72
  };
73
- //# sourceMappingURL=run-HCYK5ZAX.js.map
73
+ //# sourceMappingURL=run-TPAZDCY2.js.map
@@ -41,19 +41,19 @@ Examples:
41
41
  Full guide: __tooling__/docs/tools/baker/scheduled-agents.md`
42
42
  },
43
43
  subCommands: {
44
- list: () => import("./list-DBZ3AGW2.js").then((m) => m.listCommand),
45
- get: () => import("./get-H5CUQP7G.js").then((m) => m.getCommand),
46
- history: () => import("./history-AGCS2TKY.js").then((m) => m.historyCommand),
47
- triggers: () => import("./triggers-PH33IQLK.js").then((m) => m.triggersCommand),
48
- targets: () => import("./targets-5A5SOQJM.js").then((m) => m.targetsCommand),
49
- create: () => import("./create-KGRQQ7WA.js").then((m) => m.createCommand),
50
- update: () => import("./update-RD27CPMN.js").then((m) => m.updateCommand),
51
- delete: () => import("./delete-XAVEVESN.js").then((m) => m.deleteCommand),
52
- unstage: () => import("./unstage-52VGCJWF.js").then((m) => m.unstageCommand),
53
- run: () => import("./run-HCYK5ZAX.js").then((m) => m.runCommand)
44
+ list: () => import("./list-VQNYW5R4.js").then((m) => m.listCommand),
45
+ get: () => import("./get-I77O6MRD.js").then((m) => m.getCommand),
46
+ history: () => import("./history-DD3UWZZ4.js").then((m) => m.historyCommand),
47
+ triggers: () => import("./triggers-AALSXPLW.js").then((m) => m.triggersCommand),
48
+ targets: () => import("./targets-BVAFNU4K.js").then((m) => m.targetsCommand),
49
+ create: () => import("./create-NR4WX6PS.js").then((m) => m.createCommand),
50
+ update: () => import("./update-HYZXKLZ7.js").then((m) => m.updateCommand),
51
+ delete: () => import("./delete-5P6K4EOJ.js").then((m) => m.deleteCommand),
52
+ unstage: () => import("./unstage-BVNREABR.js").then((m) => m.unstageCommand),
53
+ run: () => import("./run-TPAZDCY2.js").then((m) => m.runCommand)
54
54
  }
55
55
  });
56
56
  export {
57
57
  scheduledAgentsCommand
58
58
  };
59
- //# sourceMappingURL=scheduled-agents-YHZUPS2I.js.map
59
+ //# sourceMappingURL=scheduled-agents-NODIHKKM.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  agentProfile,
3
3
  offers
4
- } from "./chunk-YL7XIJ43.js";
4
+ } from "./chunk-A6B45KSH.js";
5
5
  import {
6
6
  describeOpPayload,
7
7
  describeOpPayloadVariants
@@ -238,4 +238,4 @@ export {
238
238
  narrowToFamily,
239
239
  schemaCommand
240
240
  };
241
- //# sourceMappingURL=schema-NIYT4JHM.js.map
241
+ //# sourceMappingURL=schema-JCAV2D44.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  hubspotDefaultMapping,
3
3
  hubspotTriggerInputSchema
4
- } from "./chunk-H3CYVM4E.js";
4
+ } from "./chunk-TWSIY2FS.js";
5
5
  import {
6
6
  hubspotRefusal
7
7
  } from "./chunk-YBSRIW5S.js";
@@ -93,11 +93,6 @@ var args = {
93
93
  description: "Ask HubSpot what --property --operator --value would count today, and read one real contact \u2014 the one most recently there, or --contact \u2014 with the properties the --field rows mention (the defaults when none), to check every row against real data BEFORE --create-hubspot. Makes nothing",
94
94
  required: false
95
95
  },
96
- breakdown: {
97
- type: "boolean",
98
- description: "With --preview on one dropdown --property (operator `is`) and several --value: also a total for each value, as `preview.counts: [{value, total}]` \u2014 sizing every stage of a funnel in one call: `--preview --object deal --property dealstage --value appointmentscheduled --value closedwon --breakdown`. Never loop --preview over values",
99
- required: false
100
- },
101
96
  object: {
102
97
  type: "string",
103
98
  description: "With --create-hubspot or --preview: what the trigger is on \u2014 `contact` (the default), `deal` or `lead`. A deal's and a lead's event is about the contact the record is associated with: its rows read the record's own properties bare ({{amount}}, {{dealstage}}, {{hs_pipeline_stage}}) and the contact's as {{contact.<name>}} (`baker hubspot deals fields` / `baker hubspot leads fields`). A deal's amount defaults to its own amount in its currency; a lead has none, so it counts the step rather than money. Use `lead` for qualification and disqualification \u2014 HubSpot records both as a lead stage, and nothing on the contact or the deal says a lead was disqualified",
@@ -326,8 +321,7 @@ function previewArgs(raw, argv) {
326
321
  ...object === "contact" ? {} : { object },
327
322
  trigger: triggerArgs(raw, argv, "preview"),
328
323
  properties,
329
- ...contact === void 0 ? {} : { contact },
330
- ...raw.breakdown === true ? { breakdown: true } : {}
324
+ ...contact === void 0 ? {} : { contact }
331
325
  };
332
326
  }
333
327
  var VERBS = [
@@ -431,7 +425,7 @@ function handleError(err) {
431
425
  var sourcesCommand = defineCommand({
432
426
  meta: {
433
427
  name: "sources",
434
- description: 'Where events reach Baker from a server, and what each one reads. Two doors. **The client\'s own server**: `--server` prints one address for their developers \u2014 made once, the same for ever, counting at once, Baker\'s own `POST /v1/events` format (`baker analytics sending-events` has the contract, `X-Baker-Mode: test` rehearses). **HubSpot events**: HubSpot keeps each change to a watched property in a journal Baker reads every half minute \u2014 Baker\'s app subscribes the account to that one property with the condition as HubSpot\'s own filter, so an account with a million contacts costs nothing to watch \u2014 on every plan, nothing to set up in HubSpot. The trigger is *when a contact\'s* property satisfies a condition \u2014 the same conditions a Form\'s filters take: `--property lifecyclestage --value customer` (a dropdown; `--value lead --value customer` for either), `--property deal_value --operator greaterThan --value 1000`, `--property email --operator endsWith --value @acme.com`, `--property closed_at --operator isAfter --value 2026-01-01`, `--property phone --operator isEmpty`. Several conditions combine the way a Form\'s filter does \u2014 `--conditions \'{"logic":"And","conditions":[{"property":"lifecyclestage","values":["customer"]},{"property":"country","values":["Spain"]}]}\'` (AND / OR, groups one level deep, 10 conditions at most) in place of --property/--operator/--value, on --create-hubspot, --set-trigger and --preview; the event fires when a change to any named property makes the whole combination hold. `baker hubspot contacts properties` lists every property with its kind, the operators that kind takes and a dropdown\'s values; `baker hubspot contacts fields` every property a row can read. `--preview --property \u2026 [--operator \u2026] --value \u2026 [--breakdown] [--field \u2026] [--contact <id or email>]` says how many contacts satisfy it today (NOT counted \u2014 only contacts that come to satisfy it from now on are), `--breakdown` a total per --value in the same call, and reads one real contact so every row can be checked against real data; then `--create-hubspot --property \u2026 --value \u2026 --name "Deal won" --field email={{work_email}} --field value={{deal_value}} --field currency=EUR` makes the event, rows over the defaults (email, phone, the contact id, name, address, hs_google_click_id, hs_facebook_click_id). `--set-trigger --source <id> --property \u2026 --operator \u2026 --value \u2026` changes what an event watches later (rows kept, counting from now on). Every row is a template \u2014 text with {{property}} mentions, one thing per mention; `--map --source <id> --field \u2026` replaces the whole row set later, `--amount-property <number property> --currency EUR` is the short spelling for the amount rows. Each event is an ordinary event named after the source, carrying `baker_source`, listed by `feed --source <name>`, counted with `conversions` under `page:<name>`, and sent to the ad platforms with `sends`. **ActiveCampaign events**: `--create-activecampaign [--events subscribe,deal_update] [--name \u2026] [--account <id>]` stages a source that the ActiveCampaign webhook sends to once the chat is published; each arrival is an event called `activecampaign.<event>` \u2014 whatever the source is called \u2014 carrying the contact and the rest of the ActiveCampaign payload as `properties.*` (the stage of a deal, the tag, the campaign), which is what a scheduled agent on `event.received --event activecampaign.<event>` runs on. `--pause`, `--resume`, `--remove` by --source; removing an ActiveCampaign source deletes its webhook. `--create --name <tool>` still makes an address for a tool that cannot be told what to send; its first send is a masked sample counted as nothing until `--map` confirms the rows.'
428
+ description: 'Where events reach Baker from a server, and what each one reads. Two doors. **The client\'s own server**: `--server` prints one address for their developers \u2014 made once, the same for ever, counting at once, Baker\'s own `POST /v1/events` format (`baker analytics sending-events` has the contract, `X-Baker-Mode: test` rehearses). **HubSpot events**: HubSpot keeps each change to a watched property in a journal Baker reads every half minute \u2014 Baker\'s app subscribes the account to that one property with the condition as HubSpot\'s own filter, so an account with a million contacts costs nothing to watch \u2014 on every plan, nothing to set up in HubSpot. The trigger is *when a contact\'s* property satisfies a condition \u2014 the same conditions a Form\'s filters take: `--property lifecyclestage --value customer` (a dropdown; `--value lead --value customer` for either), `--property deal_value --operator greaterThan --value 1000`, `--property email --operator endsWith --value @acme.com`, `--property closed_at --operator isAfter --value 2026-01-01`, `--property phone --operator isEmpty`. Several conditions combine the way a Form\'s filter does \u2014 `--conditions \'{"logic":"And","conditions":[{"property":"lifecyclestage","values":["customer"]},{"property":"country","values":["Spain"]}]}\'` (AND / OR, groups one level deep, 10 conditions at most) in place of --property/--operator/--value, on --create-hubspot, --set-trigger and --preview; the event fires when a change to any named property makes the whole combination hold. `baker hubspot contacts properties` lists every property with its kind, the operators that kind takes and a dropdown\'s values; `baker hubspot contacts fields` every property a row can read. `--preview --property \u2026 [--operator \u2026] --value \u2026 [--field \u2026] [--contact <id or email>]` says how many contacts satisfy it today (NOT counted \u2014 only contacts that come to satisfy it from now on are) and reads one real contact so every row can be checked against real data; then `--create-hubspot --property \u2026 --value \u2026 --name "Deal won" --field email={{work_email}} --field value={{deal_value}} --field currency=EUR` makes the event, rows over the defaults (email, phone, the contact id, name, address, hs_google_click_id, hs_facebook_click_id). `--set-trigger --source <id> --property \u2026 --operator \u2026 --value \u2026` changes what an event watches later (rows kept, counting from now on). Every row is a template \u2014 text with {{property}} mentions, one thing per mention; `--map --source <id> --field \u2026` replaces the whole row set later, `--amount-property <number property> --currency EUR` is the short spelling for the amount rows. Each event is an ordinary event named after the source, carrying `baker_source`, listed by `feed --source <name>`, counted with `conversions` under `page:<name>`, and sent to the ad platforms with `sends`. **ActiveCampaign events**: `--create-activecampaign [--events subscribe,deal_update] [--name \u2026] [--account <id>]` stages a source that the ActiveCampaign webhook sends to once the chat is published; each arrival is an event called `activecampaign.<event>` \u2014 whatever the source is called \u2014 carrying the contact and the rest of the ActiveCampaign payload as `properties.*` (the stage of a deal, the tag, the campaign), which is what a scheduled agent on `event.received --event activecampaign.<event>` runs on. `--pause`, `--resume`, `--remove` by --source; removing an ActiveCampaign source deletes its webhook. `--create --name <tool>` still makes an address for a tool that cannot be told what to send; its first send is a masked sample counted as nothing until `--map` confirms the rows.'
435
429
  },
436
430
  args,
437
431
  run: async ({ args: raw }) => {
@@ -466,4 +460,4 @@ export {
466
460
  sourcesCommand,
467
461
  sourcesRequest
468
462
  };
469
- //# sourceMappingURL=sources-DVNWHBF5.js.map
463
+ //# sourceMappingURL=sources-G7QWYL2J.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/analytics/sources.ts"],"sourcesContent":["import { REJECTION_MESSAGES, validateEventName } from \"@baker/api/event-ingest\";\nimport {\n HUBSPOT_DEAL_CONTACTS,\n HUBSPOT_OBJECTS,\n type HubspotDealContacts,\n type HubspotObject,\n hubspotDefaultMapping,\n hubspotTriggerInputSchema,\n mappingRowProblem,\n readsAssociatedContact,\n SOURCE_FIELD_NAMES,\n type SourcesRequestInput,\n type SourcesResponse,\n templateMentions,\n} from \"@baker/api/event-sources\";\nimport { defineCommand } from \"citty\";\nimport { ApiError, apiPost } from \"../../client.ts\";\nimport { registerSchema } from \"../../schemas.ts\";\nimport { writeJsonEnvelope } from \"../ads/output.ts\";\nimport { hubspotRefusal } from \"../hubspot/refusal.ts\";\nimport { ConversionArgsError, onlyOnce } from \"./conversionArgs.ts\";\n\n/**\n * `baker analytics sources` — an address for each of the client's own tools to\n * send events to, and what each one's payloads are read as.\n *\n * ## Why a URL and not a key\n *\n * `POST /v1/events` needs the sender to write code to our contract. A CRM's\n * webhook, an automation platform, a billing system cannot be told what to\n * send — they post what they post, to a URL, and set nothing else. A source\n * is that URL: the token in it is the whole credential, the first send\n * teaches Baker the shape, and a person confirms once which path is the\n * email, which the amount. From then on every arrival is an ordinary event.\n *\n * ## `--field` and `--value` repeat, and citty keeps only the last\n *\n * citty hands the LAST value of a repeated flag over as a plain string, so\n * `--field email=a --field value=b` would map `value` and silently drop\n * `email`, and `--value lead --value customer` would watch `customer` alone.\n * Both are read off `process.argv` instead, the way `conversions` reads its\n * repeats.\n */\n\nconst args = {\n server: {\n type: \"boolean\",\n description:\n \"The client's own server door: one address for their developers, made once and the same for ever after, counting at once in Baker's own format (`baker analytics sending-events` has the contract). Prints it; nothing else to set\",\n required: false,\n },\n create: {\n type: \"boolean\",\n description:\n \"Make an address for a tool that cannot be told what to send (a CRM webhook, an automation step). Needs --name. Its first send is kept as a sample and counted as nothing until --map\",\n required: false,\n },\n \"create-hubspot\": {\n type: \"boolean\",\n description:\n \"Make a HubSpot event: HubSpot keeps each change to --property for Baker (Baker's app subscribes the account to that property with the condition as HubSpot's own filter, and nothing else), and every contact whose new value satisfies --operator --value is an event, counted within a minute. Needs --property (names, kinds and operators from `baker hubspot contacts properties`); --operator defaults to `is`; --value repeats for a list (`is` on a dropdown) or a between; --name is optional and defaults to the trigger's words; --field rows (names from `baker hubspot contacts fields`) replace the default rows they name. Counts from now on, never earlier contacts\",\n required: false,\n },\n \"create-activecampaign\": {\n type: \"boolean\",\n description:\n \"Make an ActiveCampaign event source: when this chat is published, ActiveCampaign's own webhook is set up on the account to send --events here, and each one counts as `activecampaign.<event>` (a contact subscribing is `activecampaign.subscribe`) from then on — a scheduled agent can run on any of them (`baker scheduled-agents create --trigger event.received --event activecampaign.deal_update`). --events defaults to subscribe,contact_tag_added,deal_add,deal_update; --name to ActiveCampaign; --account picks the connection when there are several. Removing the source takes the webhook off the account\",\n required: false,\n },\n events: {\n type: \"string\",\n description:\n \"With --create-activecampaign: ActiveCampaign's events, comma-separated — subscribe, unsubscribe, update, contact_tag_added, contact_tag_removed, subscriber_note, contact_task_add, sent, open, click, reply, forward, share, bounce, list_add, deal_add, deal_update, deal_note_add, deal_task_add, deal_task_complete, deal_pipeline_add, deal_stage_add, deal_tasktype_add, account_add, account_update, account_contact_add, account_contact_update\",\n required: false,\n },\n account: {\n type: \"string\",\n description:\n \"With --create-activecampaign: which ActiveCampaign connection, by id, when the company has more than one (the refusal lists them)\",\n required: false,\n },\n \"set-trigger\": {\n type: \"boolean\",\n description:\n \"Change what a HubSpot event watches. Needs --source and the same --property --operator --value as --create-hubspot. The rows stay; it counts from now on under the new trigger\",\n required: false,\n },\n preview: {\n type: \"boolean\",\n description:\n \"Ask HubSpot what --property --operator --value would count today, and read one real contact — the one most recently there, or --contact — with the properties the --field rows mention (the defaults when none), to check every row against real data BEFORE --create-hubspot. Makes nothing\",\n required: false,\n },\n object: {\n type: \"string\",\n description:\n \"With --create-hubspot or --preview: what the trigger is on — `contact` (the default), `deal` or `lead`. A deal's and a lead's event is about the contact the record is associated with: its rows read the record's own properties bare ({{amount}}, {{dealstage}}, {{hs_pipeline_stage}}) and the contact's as {{contact.<name>}} (`baker hubspot deals fields` / `baker hubspot leads fields`). A deal's amount defaults to its own amount in its currency; a lead has none, so it counts the step rather than money. Use `lead` for qualification and disqualification — HubSpot records both as a lead stage, and nothing on the contact or the deal says a lead was disqualified\",\n required: false,\n },\n contacts: {\n type: \"string\",\n description:\n \"With --object deal or --object lead (on --create-hubspot or --set-trigger): whose event it is — `every` (the default: every contact on the record, each its own event; on a deal each worth the deal's amount) or `first` (the record's first contact only)\",\n required: false,\n },\n property: {\n type: \"string\",\n description:\n \"With --create-hubspot, --set-trigger or --preview: the property to watch, by HubSpot's internal name (lifecyclestage, hs_lead_status, a custom one on a contact; dealstage, amount, closedate on a deal; hs_pipeline_stage, hs_lead_label on a lead) — any property, whatever its kind\",\n required: false,\n },\n operator: {\n type: \"string\",\n description:\n \"With --property: how the property has to read. By the property's kind — select: is, isNot, isEmpty, isNotEmpty · text: is, isNot, contains, doesNotContain, startsWith, endsWith, isEmpty, isNotEmpty · number: equal, notEqual, lessThan, lessThanOrEqual, greaterThan, greaterThanOrEqual, isEmpty, isNotEmpty · date: is, isBefore, isAfter, isOnOrBefore, isOnOrAfter, isBetween, isEmpty, isNotEmpty · yes/no: is, isNot. `is` when unsaid\",\n required: false,\n },\n value: {\n type: \"string\",\n description:\n \"With --property: the value, as HubSpot spells it — a dropdown's internal value (customer, QUALIFIED…), a number, a YYYY-MM-DD, true/false. Repeat it for a list (--value lead --value customer) or the two ends of isBetween; none for isEmpty / isNotEmpty\",\n required: false,\n },\n conditions: {\n type: \"string\",\n description:\n 'With --create-hubspot, --set-trigger or --preview, instead of --property/--operator/--value: several conditions combined the way a Form\\'s filter combines them, as JSON — `{\"logic\":\"And\",\"conditions\":[{\"property\":\"lifecyclestage\",\"values\":[\"customer\"]},{\"logic\":\"Or\",\"conditions\":[{\"property\":\"country\",\"values\":[\"Spain\"]},{\"property\":\"amount\",\"operator\":\"greaterThan\",\"values\":[\"1000\"]}]}]}`. `logic` is And (every row) or Or (any row); a row is a condition or a group with its own logic, one level deep; at most 10 conditions. The event fires when a change to any named property makes the whole combination hold',\n required: false,\n },\n contact: {\n type: \"string\",\n description:\n \"With --preview: the record to draw the sample from — a HubSpot id, or text to search (an email or a name for a contact, a deal's or a lead's name). The one most recently satisfying the trigger when unsaid\",\n required: false,\n },\n \"amount-property\": {\n type: \"string\",\n description:\n \"With --create-hubspot or --set-amount: a NUMBER property of the watched object to read as the event's amount (a deal value synced onto the contact; a deal's own `amount` is read by default on a deal). Needs --currency beside it\",\n required: false,\n },\n currency: {\n type: \"string\",\n description: \"With --amount-property: the three-letter currency the property is in, like EUR or USD\",\n required: false,\n },\n \"set-amount\": {\n type: \"boolean\",\n description:\n \"Change where a HubSpot-read source takes its amount from. Needs --source; with --amount-property and --currency it reads them, with neither it stops reading an amount\",\n required: false,\n },\n backfill: {\n type: \"boolean\",\n description:\n \"Count a HubSpot event's history: every moment its trigger came to hold since --since, at the instant HubSpot says it did. Needs --source and --since. Nothing is invented — a record that merely satisfies the trigger today is not an event today, and only moments HubSpot has a timestamp for are counted. Dry without --write. Reach for it when an event was made after the deals it should have counted, or after fixing one that was refusing everything it received\",\n required: false,\n },\n since: {\n type: \"string\",\n description:\n \"With --backfill: the date to count this event's history from, `2026-09-19` or an ISO instant. At most 400 days back — the store keeps no more\",\n required: false,\n },\n before: {\n type: \"string\",\n description:\n \"With --backfill: carry on from where a capped run stopped, by passing back the `reachedBack` it returned. One run reads at most 500 records, most recently changed first, so a capped run has covered the newest and the rest are the ones nearest --since — narrowing --since cannot reach them, this can. Repeat until `capped` is false; nothing is counted twice. It bounds which records are read, never which of their moments count: those are still the whole of --since to now\",\n required: false,\n },\n write: {\n type: \"boolean\",\n description:\n \"With --backfill: actually count what it found. Without it nothing is counted and the answer says what would be. Events inside the last 72 hours are uploaded to this event's ad platforms within minutes of counting, which spends real budget\",\n required: false,\n },\n name: {\n type: \"string\",\n description:\n \"The tool the source is for — HubSpot, Zapier, Stripe. It is the event's name when the payload does not say one, and every event it sends carries it as `baker_source`\",\n required: false,\n },\n map: {\n type: \"boolean\",\n description:\n \"Set what each field is read from. For an address this starts counting; needs --source, and one --field per row. With no --field the guess is used, which is right for a tool already sending Baker's own format. For a HubSpot-read source it replaces the whole mapping (the row list is on the source as `mapping`; empty means HubSpot's standard properties), so repeat every row you want kept\",\n required: false,\n },\n source: { type: \"string\", description: \"The source id, from the list\", required: false },\n field: {\n type: \"string\",\n description: `<field>=<template>, repeatable. A template is text with {{path}} mentions, one thing per mention: --field email={{contact.email}} --field currency=EUR --field first_name=\"{{who.first}} {{who.last}}\". A bare path (--field email=contact.email) is read as its mention when the sample has that path, so the short spelling still works. Fields: ${SOURCE_FIELD_NAMES.join(\", \")}. An EXTRA PROPERTY of the event — a plan, a stage, anything Measure → Events should break it down by and a send may pass on to a platform — is --field properties.<name>=<template>, e.g. --field properties.plan={{plan_tier}}. Paths come from \\`paths\\` on the source's sample; for a HubSpot event they are contact property names (\\`baker hubspot contacts fields\\`) plus \\`id\\` for the contact id`,\n required: false,\n },\n pause: {\n type: \"boolean\",\n description: \"Stop counting a source's arrivals; they are answered and dropped. Needs --source\",\n required: false,\n },\n resume: { type: \"boolean\", description: \"Count a paused source's arrivals again. Needs --source\", required: false },\n remove: {\n type: \"boolean\",\n description: \"Delete a source; its address stops working at once. Needs --source\",\n required: false,\n },\n full: {\n type: \"boolean\",\n description:\n \"Also return each source's masked sample body. The paths and the guess are always returned; the body is only for reading what a path held\",\n required: false,\n },\n} as const;\n\nregisterSchema({\n command: \"analytics.sources\",\n routes: [\"POST /api/analytics/sources\"],\n effect: \"write\",\n description:\n \"Where events reach Baker from a server: the client's own server door, HubSpot events Baker reads, and ActiveCampaign events its webhook sends — what each one watches and reads, and how it is doing\",\n args,\n});\n\n/** The value a repeated flag carries at this position, in either spelling, or nothing. */\nfunction flagValueAt(argv: readonly string[], flag: string, index: number): string | undefined {\n const arg = argv[index] ?? \"\";\n if (arg === flag) return argv[index + 1];\n return arg.startsWith(`${flag}=`) ? arg.slice(flag.length + 1) : undefined;\n}\n\n/** Every value of a repeated flag on the command line, in order. */\nexport function parseRepeated(argv: readonly string[], flag: string): string[] {\n const values: string[] = [];\n for (let index = 0; index < argv.length; index += 1) {\n const value = flagValueAt(argv, flag, index);\n if (value !== undefined) values.push(value);\n }\n return values;\n}\n\n/** Every `--field k=v` on the command line, in order, refusing a malformed one. */\nexport function parseFieldArgs(argv: readonly string[]): Record<string, string> {\n const mapping: Record<string, string> = {};\n for (const pair of parseRepeated(argv, \"--field\")) {\n const eq = pair.indexOf(\"=\");\n const field = eq === -1 ? pair : pair.slice(0, eq);\n const path = eq === -1 ? \"\" : pair.slice(eq + 1).trim();\n const problem = mappingRowProblem(field);\n if (problem !== null) throw new ConversionArgsError(problem);\n if (path === \"\") throw new ConversionArgsError(`--field ${field} needs a path: --field ${field}=<dotted.path>.`);\n mapping[field] = path;\n }\n return mapping;\n}\n\n/** The amount pair, which travels together or not at all. */\nfunction amountArgs(raw: Record<string, unknown>, argv: readonly string[]) {\n const amountProperty = onlyOnce(raw[\"amount-property\"], \"--amount-property\", argv);\n const currency = onlyOnce(raw.currency, \"--currency\", argv);\n if ((amountProperty === undefined) !== (currency === undefined)) {\n throw new ConversionArgsError(\"--amount-property and --currency go together: name both or neither.\");\n }\n return {\n ...(amountProperty === undefined ? {} : { amountProperty }),\n ...(currency === undefined ? {} : { currency }),\n };\n}\n\nconst NO_VALUE_OPERATORS = new Set([\"isEmpty\", \"isNotEmpty\"]);\n\n/**\n * The trigger every HubSpot verb needs: the property, how it has to read,\n * and the values — repeated on the command line, read off argv. Refused with\n * where the names come from; what the property's kind allows is checked\n * against the account by the backend.\n */\nfunction triggerArgs(raw: Record<string, unknown>, argv: readonly string[], verb: string): TriggerInput {\n const conditions = onlyOnce(raw.conditions, \"--conditions\", argv);\n if (conditions !== undefined) return conditionsArg(conditions, raw, verb);\n const property = onlyOnce(raw.property, \"--property\", argv);\n const operator = onlyOnce(raw.operator, \"--operator\", argv) ?? \"is\";\n // The last --value is what citty kept; every one is what was typed.\n const values = argv.length === 0 && typeof raw.value === \"string\" ? [raw.value] : parseRepeated(argv, \"--value\");\n if (property === undefined) {\n throw new ConversionArgsError(\n `--${verb} needs --property <name> [--operator <op>] --value <value>…, from \\`baker hubspot contacts properties\\`.`,\n );\n }\n if (values.length === 0 && !NO_VALUE_OPERATORS.has(operator)) {\n throw new ConversionArgsError(\n `--${verb} needs --value <value> (repeat it for a list); only --operator isEmpty / isNotEmpty take none.`,\n );\n }\n return { property, operator, values };\n}\n\ntype TriggerInput = NonNullable<SourcesRequestInput[\"createHubspot\"]>[\"trigger\"];\n\n/** `--conditions <json>`: a combination, checked for shape here so a typo is refused before the call. */\nfunction conditionsArg(text: string, raw: Record<string, unknown>, verb: string): TriggerInput {\n if (raw.property !== undefined || raw.value !== undefined || raw.operator !== undefined) {\n throw new ConversionArgsError(`--${verb} takes --conditions or --property/--operator/--value, not both.`);\n }\n let parsed: unknown;\n try {\n parsed = JSON.parse(text);\n } catch {\n throw new ConversionArgsError(\n '--conditions is JSON: {\"logic\":\"And\",\"conditions\":[{\"property\":\"lifecyclestage\",\"values\":[\"customer\"]}]}.',\n );\n }\n const checked = hubspotTriggerInputSchema.safeParse(parsed);\n if (!checked.success) {\n throw new ConversionArgsError(`--conditions: ${checked.error.issues.map((issue) => issue.message).join(\"; \")}`);\n }\n return parsed as TriggerInput;\n}\n\n/** `--object contact|deal`, spelled the two ways the wire takes and nothing else. */\nfunction objectArg(raw: Record<string, unknown>, argv: readonly string[]): HubspotObject {\n const object = onlyOnce(raw.object, \"--object\", argv) ?? \"contact\";\n if (!(HUBSPOT_OBJECTS as readonly string[]).includes(object)) {\n throw new ConversionArgsError(`--object is one of ${HUBSPOT_OBJECTS.join(\", \")}, not \"${object}\".`);\n }\n return object as HubspotObject;\n}\n\n/** `--contacts first|every`, which only means something on a deal or a lead. */\nfunction contactsArg(raw: Record<string, unknown>, argv: readonly string[]): HubspotDealContacts | undefined {\n const contacts = onlyOnce(raw.contacts, \"--contacts\", argv);\n if (contacts === undefined) return undefined;\n if (!(HUBSPOT_DEAL_CONTACTS as readonly string[]).includes(contacts)) {\n throw new ConversionArgsError(`--contacts is one of ${HUBSPOT_DEAL_CONTACTS.join(\", \")}, not \"${contacts}\".`);\n }\n return contacts as HubspotDealContacts;\n}\n\nfunction createHubspotArgs(\n raw: Record<string, unknown>,\n argv: readonly string[],\n name: string | undefined,\n): NonNullable<SourcesRequestInput[\"createHubspot\"]> {\n const mapping = parseFieldArgs(argv);\n const object = objectArg(raw, argv);\n const contacts = contactsArg(raw, argv);\n if (contacts !== undefined && !readsAssociatedContact(object)) {\n throw new ConversionArgsError(\n \"--contacts says whose event a deal's or a lead's is; it needs --object deal or --object lead.\",\n );\n }\n return {\n // A contact is the wire's default, so it is left unsaid — the way the schema reads it back.\n ...(object === \"contact\" ? {} : { object }),\n trigger: triggerArgs(raw, argv, \"create-hubspot\"),\n ...(contacts === undefined ? {} : { contacts }),\n ...(name === undefined ? {} : { name }),\n ...(Object.keys(mapping).length === 0 ? {} : { mapping }),\n ...amountArgs(raw, argv),\n };\n}\n\n/** What to read off the sample contact: whatever the rows mention, or the default rows' properties. */\nfunction previewArgs(\n raw: Record<string, unknown>,\n argv: readonly string[],\n): NonNullable<SourcesRequestInput[\"preview\"]> {\n const rows = parseFieldArgs(argv);\n const object = objectArg(raw, argv);\n const templates = Object.values(Object.keys(rows).length === 0 ? hubspotDefaultMapping(\"\", object) : rows);\n const properties = [...new Set(templates.flatMap((template) => templateMentions(template ?? \"\")))];\n const contact = onlyOnce(raw.contact, \"--contact\", argv);\n return {\n ...(object === \"contact\" ? {} : { object }),\n trigger: triggerArgs(raw, argv, \"preview\"),\n properties,\n ...(contact === undefined ? {} : { contact }),\n };\n}\n\nconst VERBS = [\n \"server\",\n \"create\",\n \"create-hubspot\",\n \"create-activecampaign\",\n \"set-trigger\",\n \"preview\",\n \"backfill\",\n \"set-amount\",\n \"map\",\n \"pause\",\n \"resume\",\n \"remove\",\n] as const;\n\n/**\n * The name, refused here when the ingest door could never accept it.\n *\n * A source's name is the `event_name` of every event it raises, so this is\n * not a label being tidied: a name outside the rule makes a source that\n * counts **nothing**, for ever, while `baker analytics sources` goes on\n * listing it as counting and the only trace is one red line per event on the\n * feed. The contract refuses it too (`sourceNameSchema`), but that comes back\n * as a wire-validation error; the agent is better served by the sentence.\n */\nfunction checkedName(raw: Record<string, unknown>, argv: readonly string[]): string | undefined {\n const name = onlyOnce(raw.name, \"--name\", argv);\n if (name === undefined || validateEventName(name) === null) return name;\n throw new ConversionArgsError(\n `\"${name}\" cannot be an event name, and the name is what every event this source raises will carry. ${REJECTION_MESSAGES.invalid_name}`,\n );\n}\n\n/** What a backfill reads back to, and whether it counts what it finds. */\nfunction backfillArgs(\n raw: Record<string, unknown>,\n argv: readonly string[],\n sourceId: string,\n): NonNullable<SourcesRequestInput[\"backfill\"]> {\n const since = onlyOnce(raw.since, \"--since\", argv);\n if (since === undefined) {\n throw new ConversionArgsError(\n \"--backfill needs --since <date>, e.g. --since 2026-09-19. Nothing before it is read.\",\n );\n }\n const before = onlyOnce(raw.before, \"--before\", argv);\n return {\n sourceId,\n since,\n ...(before === undefined ? {} : { before }),\n ...(raw.write === true ? { write: true } : {}),\n };\n}\n\nfunction createActiveCampaignArgs(\n raw: Record<string, unknown>,\n argv: readonly string[],\n name: string | undefined,\n): NonNullable<SourcesRequestInput[\"createActiveCampaign\"]> {\n const events = onlyOnce(raw.events, \"--events\", argv);\n const account = onlyOnce(raw.account, \"--account\", argv);\n return {\n ...(name === undefined ? {} : { name }),\n ...(events === undefined\n ? {}\n : {\n events: events\n .split(\",\")\n .map((item) => item.trim())\n .filter((item) => item !== \"\"),\n }),\n ...(account === undefined ? {} : { account }),\n };\n}\n\n/** The three ways to make a source: an address for a tool, a HubSpot event, ActiveCampaign events. */\nfunction createRequest(\n verb: (typeof VERBS)[number],\n raw: Record<string, unknown>,\n argv: readonly string[],\n name: string | undefined,\n): SourcesRequestInput | null {\n if (verb === \"create\") {\n if (name === undefined) throw new ConversionArgsError(\"--create needs --name <tool>.\");\n return { create: { name } };\n }\n if (verb === \"create-hubspot\") return { createHubspot: createHubspotArgs(raw, argv, name) };\n if (verb === \"create-activecampaign\") return { createActiveCampaign: createActiveCampaignArgs(raw, argv, name) };\n return null;\n}\n\nexport function sourcesRequest(raw: Record<string, unknown>, argv: readonly string[]): SourcesRequestInput {\n const name = checkedName(raw, argv);\n const source = onlyOnce(raw.source, \"--source\", argv);\n const verbs = VERBS.filter((verb) => raw[verb] === true);\n if (verbs.length > 1) throw new ConversionArgsError(`One of --${verbs.join(\", --\")} per call.`);\n const verb = verbs[0];\n if (verb === undefined) return {};\n if (verb === \"server\") return { server: {} };\n const made = createRequest(verb, raw, argv, name);\n if (made !== null) return made;\n if (verb === \"preview\") return { preview: previewArgs(raw, argv) };\n if (source === undefined) throw new ConversionArgsError(`--${verb} needs --source <id>, from the list.`);\n if (verb === \"backfill\") return { backfill: backfillArgs(raw, argv, source) };\n if (verb === \"set-trigger\") {\n const contacts = contactsArg(raw, argv);\n return {\n setTrigger: {\n sourceId: source,\n trigger: triggerArgs(raw, argv, verb),\n ...(contacts === undefined ? {} : { contacts }),\n },\n };\n }\n if (verb === \"set-amount\") return { setAmount: { sourceId: source, ...amountArgs(raw, argv) } };\n if (verb === \"map\") return { map: { sourceId: source, mapping: parseFieldArgs(argv) } };\n return { [verb]: { sourceId: source } };\n}\n\nfunction handleError(err: unknown): never {\n if (err instanceof ApiError) {\n // A HubSpot event needs HubSpot connected, and allowed to read what it watches.\n const refusal = hubspotRefusal(err.code, err.message);\n writeJsonEnvelope({\n ok: false,\n error:\n refusal === null\n ? { code: err.code, message: err.message }\n : { code: refusal.code, message: err.message, fix: refusal.fix },\n });\n process.exit(1);\n }\n writeJsonEnvelope({\n ok: false,\n error: { code: \"NETWORK_ERROR\", message: err instanceof Error ? err.message : \"Unexpected error\" },\n });\n process.exit(1);\n}\n\nexport const sourcesCommand = defineCommand({\n meta: {\n name: \"sources\",\n description:\n 'Where events reach Baker from a server, and what each one reads. Two doors. **The client\\'s own server**: `--server` prints one address for their developers — made once, the same for ever, counting at once, Baker\\'s own `POST /v1/events` format (`baker analytics sending-events` has the contract, `X-Baker-Mode: test` rehearses). **HubSpot events**: HubSpot keeps each change to a watched property in a journal Baker reads every half minute — Baker\\'s app subscribes the account to that one property with the condition as HubSpot\\'s own filter, so an account with a million contacts costs nothing to watch — on every plan, nothing to set up in HubSpot. The trigger is *when a contact\\'s* property satisfies a condition — the same conditions a Form\\'s filters take: `--property lifecyclestage --value customer` (a dropdown; `--value lead --value customer` for either), `--property deal_value --operator greaterThan --value 1000`, `--property email --operator endsWith --value @acme.com`, `--property closed_at --operator isAfter --value 2026-01-01`, `--property phone --operator isEmpty`. Several conditions combine the way a Form\\'s filter does — `--conditions \\'{\"logic\":\"And\",\"conditions\":[{\"property\":\"lifecyclestage\",\"values\":[\"customer\"]},{\"property\":\"country\",\"values\":[\"Spain\"]}]}\\'` (AND / OR, groups one level deep, 10 conditions at most) in place of --property/--operator/--value, on --create-hubspot, --set-trigger and --preview; the event fires when a change to any named property makes the whole combination hold. `baker hubspot contacts properties` lists every property with its kind, the operators that kind takes and a dropdown\\'s values; `baker hubspot contacts fields` every property a row can read. `--preview --property … [--operator …] --value … [--field …] [--contact <id or email>]` says how many contacts satisfy it today (NOT counted — only contacts that come to satisfy it from now on are) and reads one real contact so every row can be checked against real data; then `--create-hubspot --property … --value … --name \"Deal won\" --field email={{work_email}} --field value={{deal_value}} --field currency=EUR` makes the event, rows over the defaults (email, phone, the contact id, name, address, hs_google_click_id, hs_facebook_click_id). `--set-trigger --source <id> --property … --operator … --value …` changes what an event watches later (rows kept, counting from now on). Every row is a template — text with {{property}} mentions, one thing per mention; `--map --source <id> --field …` replaces the whole row set later, `--amount-property <number property> --currency EUR` is the short spelling for the amount rows. Each event is an ordinary event named after the source, carrying `baker_source`, listed by `feed --source <name>`, counted with `conversions` under `page:<name>`, and sent to the ad platforms with `sends`. **ActiveCampaign events**: `--create-activecampaign [--events subscribe,deal_update] [--name …] [--account <id>]` stages a source that the ActiveCampaign webhook sends to once the chat is published; each arrival is an event called `activecampaign.<event>` — whatever the source is called — carrying the contact and the rest of the ActiveCampaign payload as `properties.*` (the stage of a deal, the tag, the campaign), which is what a scheduled agent on `event.received --event activecampaign.<event>` runs on. `--pause`, `--resume`, `--remove` by --source; removing an ActiveCampaign source deletes its webhook. `--create --name <tool>` still makes an address for a tool that cannot be told what to send; its first send is a masked sample counted as nothing until `--map` confirms the rows.',\n },\n args,\n run: async ({ args: raw }) => {\n try {\n const request = sourcesRequest(raw as Record<string, unknown>, process.argv);\n const response = await apiPost<SourcesResponse>(\"/api/analytics/sources\", request);\n const full = raw.full === true;\n const sources = response.data.sources.map((source) => {\n const { sample, ...rest } = source;\n return full || sample === undefined ? source : { ...rest, sample: { receivedAt: sample.receivedAt } };\n });\n writeJsonEnvelope({\n ok: true,\n data: {\n sources,\n ...(response.data.preview === undefined ? {} : { preview: response.data.preview }),\n ...(response.data.staged === undefined ? {} : { staged: response.data.staged }),\n },\n ...(response.hints && response.hints.length > 0 ? { hints: response.hints } : {}),\n });\n } catch (err) {\n if (err instanceof ConversionArgsError) {\n handleError(new ApiError(\"VALIDATION_ERROR\", err.message));\n }\n handleError(err);\n }\n },\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,SAAS,qBAAqB;AA6B9B,IAAM,OAAO;AAAA,EACX,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,aACE;AAAA,IACF,UAAU;AAAA,EACZ;AAAA,EACA,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,aACE;AAAA,IACF,UAAU;AAAA,EACZ;AAAA,EACA,kBAAkB;AAAA,IAChB,MAAM;AAAA,IACN,aACE;AAAA,IACF,UAAU;AAAA,EACZ;AAAA,EACA,yBAAyB;AAAA,IACvB,MAAM;AAAA,IACN,aACE;AAAA,IACF,UAAU;AAAA,EACZ;AAAA,EACA,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,aACE;AAAA,IACF,UAAU;AAAA,EACZ;AAAA,EACA,SAAS;AAAA,IACP,MAAM;AAAA,IACN,aACE;AAAA,IACF,UAAU;AAAA,EACZ;AAAA,EACA,eAAe;AAAA,IACb,MAAM;AAAA,IACN,aACE;AAAA,IACF,UAAU;AAAA,EACZ;AAAA,EACA,SAAS;AAAA,IACP,MAAM;AAAA,IACN,aACE;AAAA,IACF,UAAU;AAAA,EACZ;AAAA,EACA,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,aACE;AAAA,IACF,UAAU;AAAA,EACZ;AAAA,EACA,UAAU;AAAA,IACR,MAAM;AAAA,IACN,aACE;AAAA,IACF,UAAU;AAAA,EACZ;AAAA,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;AAAA,IACH,SAAS,KAAK;AACZ,UAAI,eAAe,qBAAqB;AACtC,oBAAY,IAAI,SAAS,oBAAoB,IAAI,OAAO,CAAC;AAAA,MAC3D;AACA,kBAAY,GAAG;AAAA,IACjB;AAAA,EACF;AACF,CAAC;","names":["verb"]}
@@ -9,6 +9,7 @@ var tagManagerCommand = defineCommand({
9
9
 
10
10
  Start here:
11
11
  baker tag-manager read \u2014 see what the container holds today
12
+ baker tag-manager changes --since 2026-09-21 \u2014 what was created, modified or deleted since a date
12
13
 
13
14
  Then stage changes (nothing is sent to Tag Manager until publish):
14
15
  baker tag-manager trigger create --json '{"name":"Quote Submit","type":"customEvent"}'
@@ -27,17 +28,18 @@ different job \u2014 that is \`baker tags\` with the googleTagManager tag.
27
28
  Full guide: __tooling__/docs/tools/baker/tag-manager.md`
28
29
  },
29
30
  subCommands: {
30
- containers: () => import("./read-T7HYDHSS.js").then((m) => m.containersCommand),
31
- read: () => import("./read-T7HYDHSS.js").then((m) => m.readCommand),
32
- tag: () => import("./write-commands-M2CV6P4R.js").then((m) => m.tagCommand),
33
- trigger: () => import("./write-commands-M2CV6P4R.js").then((m) => m.triggerCommand),
34
- variable: () => import("./write-commands-M2CV6P4R.js").then((m) => m.variableCommand),
35
- folder: () => import("./write-commands-M2CV6P4R.js").then((m) => m.folderCommand),
36
- builtin: () => import("./write-commands-M2CV6P4R.js").then((m) => m.builtinCommand),
37
- draft: () => import("./draft-BO5QGZBG.js").then((m) => m.draftCommand)
31
+ containers: () => import("./read-OMNUPQ77.js").then((m) => m.containersCommand),
32
+ read: () => import("./read-OMNUPQ77.js").then((m) => m.readCommand),
33
+ changes: () => import("./changes-6UGDHAZW.js").then((m) => m.changesCommand),
34
+ tag: () => import("./write-commands-YECHEWMG.js").then((m) => m.tagCommand),
35
+ trigger: () => import("./write-commands-YECHEWMG.js").then((m) => m.triggerCommand),
36
+ variable: () => import("./write-commands-YECHEWMG.js").then((m) => m.variableCommand),
37
+ folder: () => import("./write-commands-YECHEWMG.js").then((m) => m.folderCommand),
38
+ builtin: () => import("./write-commands-YECHEWMG.js").then((m) => m.builtinCommand),
39
+ draft: () => import("./draft-4DFLYVL6.js").then((m) => m.draftCommand)
38
40
  }
39
41
  });
40
42
  export {
41
43
  tagManagerCommand
42
44
  };
43
- //# sourceMappingURL=tag-manager-SL6FDPER.js.map
45
+ //# sourceMappingURL=tag-manager-YUUNKP7Q.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/tag-manager/index.ts"],"sourcesContent":["import { defineCommand } from \"citty\";\n\nexport const tagManagerCommand = defineCommand({\n meta: {\n name: \"tag-manager\",\n description: `Read and change what lives inside the client's Google Tag Manager container — tags, triggers, variables, folders and built-in variables.\n\nStart here:\n baker tag-manager read — see what the container holds today\n baker tag-manager changes --since 2026-09-21 — what was created, modified or deleted since a date\n\nThen stage changes (nothing is sent to Tag Manager until publish):\n baker tag-manager trigger create --json '{\"name\":\"Quote Submit\",\"type\":\"customEvent\"}'\n baker tag-manager tag create --json '{\"name\":\"GA4 Quote\",\"type\":\"gaawe\",\"firingTriggerId\":[\"gtm_temp_trigger_...\"]}'\n baker tag-manager draft list — review everything staged\n\nOn publish, staged changes are written into the container and closed as a new Tag Manager\nversion, and a clean run PUBLISHES that version — so the changes go live on the user's site.\nSay they go live when the user publishes the chat; never that they are live already, and never\nthat someone still has to approve them inside Tag Manager. (If the publish call itself fails the\nversion stands unpublished, and \\`draft list\\` says so and what is left to do.)\n\nThis owns the CONTENTS of the container. Installing the container snippet on the site is a\ndifferent job — that is \\`baker tags\\` with the googleTagManager tag.\n\nFull guide: __tooling__/docs/tools/baker/tag-manager.md`,\n },\n subCommands: {\n containers: () => import(\"./read.ts\").then((m) => m.containersCommand),\n read: () => import(\"./read.ts\").then((m) => m.readCommand),\n changes: () => import(\"./changes.ts\").then((m) => m.changesCommand),\n tag: () => import(\"./write-commands.ts\").then((m) => m.tagCommand),\n trigger: () => import(\"./write-commands.ts\").then((m) => m.triggerCommand),\n variable: () => import(\"./write-commands.ts\").then((m) => m.variableCommand),\n folder: () => import(\"./write-commands.ts\").then((m) => m.folderCommand),\n builtin: () => import(\"./write-commands.ts\").then((m) => m.builtinCommand),\n draft: () => import(\"./draft.ts\").then((m) => m.draftCommand),\n },\n});\n"],"mappings":";;;AAAA,SAAS,qBAAqB;AAEvB,IAAM,oBAAoB,cAAc;AAAA,EAC7C,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAqBf;AAAA,EACA,aAAa;AAAA,IACX,YAAY,MAAM,OAAO,oBAAW,EAAE,KAAK,CAAC,MAAM,EAAE,iBAAiB;AAAA,IACrE,MAAM,MAAM,OAAO,oBAAW,EAAE,KAAK,CAAC,MAAM,EAAE,WAAW;AAAA,IACzD,SAAS,MAAM,OAAO,uBAAc,EAAE,KAAK,CAAC,MAAM,EAAE,cAAc;AAAA,IAClE,KAAK,MAAM,OAAO,8BAAqB,EAAE,KAAK,CAAC,MAAM,EAAE,UAAU;AAAA,IACjE,SAAS,MAAM,OAAO,8BAAqB,EAAE,KAAK,CAAC,MAAM,EAAE,cAAc;AAAA,IACzE,UAAU,MAAM,OAAO,8BAAqB,EAAE,KAAK,CAAC,MAAM,EAAE,eAAe;AAAA,IAC3E,QAAQ,MAAM,OAAO,8BAAqB,EAAE,KAAK,CAAC,MAAM,EAAE,aAAa;AAAA,IACvE,SAAS,MAAM,OAAO,8BAAqB,EAAE,KAAK,CAAC,MAAM,EAAE,cAAc;AAAA,IACzE,OAAO,MAAM,OAAO,qBAAY,EAAE,KAAK,CAAC,MAAM,EAAE,YAAY;AAAA,EAC9D;AACF,CAAC;","names":[]}
@@ -2,11 +2,11 @@ import {
2
2
  chatBody,
3
3
  failApi,
4
4
  failValidation
5
- } from "./chunk-EHDZONE6.js";
5
+ } from "./chunk-QSZRATGC.js";
6
6
  import "./chunk-NYUWPJ4K.js";
7
7
  import "./chunk-NKQWDEB7.js";
8
8
  import "./chunk-KLO3TPTS.js";
9
- import "./chunk-YL7XIJ43.js";
9
+ import "./chunk-A6B45KSH.js";
10
10
  import {
11
11
  TRIGGER_KIND_IDS,
12
12
  TRIGGER_TARGET_FIELD_IDS
@@ -107,4 +107,4 @@ Full guide: __tooling__/docs/tools/baker/scheduled-agents.md`
107
107
  export {
108
108
  targetsCommand
109
109
  };
110
- //# sourceMappingURL=targets-5A5SOQJM.js.map
110
+ //# sourceMappingURL=targets-BVAFNU4K.js.map
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  failApi
3
- } from "./chunk-EHDZONE6.js";
3
+ } from "./chunk-QSZRATGC.js";
4
4
  import "./chunk-NYUWPJ4K.js";
5
5
  import "./chunk-NKQWDEB7.js";
6
6
  import "./chunk-KLO3TPTS.js";
7
- import "./chunk-YL7XIJ43.js";
7
+ import "./chunk-A6B45KSH.js";
8
8
  import {
9
9
  triggerCatalogSchema
10
10
  } from "./chunk-624DWMDW.js";
@@ -145,4 +145,4 @@ export {
145
145
  shapeTriggerCatalog,
146
146
  triggersCommand
147
147
  };
148
- //# sourceMappingURL=triggers-PH33IQLK.js.map
148
+ //# sourceMappingURL=triggers-AALSXPLW.js.map
@@ -2,11 +2,11 @@ import {
2
2
  failApi,
3
3
  failValidation,
4
4
  validateScheduledAgentRef
5
- } from "./chunk-EHDZONE6.js";
5
+ } from "./chunk-QSZRATGC.js";
6
6
  import "./chunk-NYUWPJ4K.js";
7
7
  import "./chunk-NKQWDEB7.js";
8
8
  import "./chunk-KLO3TPTS.js";
9
- import "./chunk-YL7XIJ43.js";
9
+ import "./chunk-A6B45KSH.js";
10
10
  import "./chunk-624DWMDW.js";
11
11
  import "./chunk-RJHGIRU2.js";
12
12
  import "./chunk-WCU362Z6.js";
@@ -89,4 +89,4 @@ export {
89
89
  unstageBody,
90
90
  unstageCommand
91
91
  };
92
- //# sourceMappingURL=unstage-52VGCJWF.js.map
92
+ //# sourceMappingURL=unstage-BVNREABR.js.map
@@ -24,11 +24,11 @@ import {
24
24
  refuseAutoPublish,
25
25
  validateScheduledAgentRef,
26
26
  writeOk
27
- } from "./chunk-EHDZONE6.js";
27
+ } from "./chunk-QSZRATGC.js";
28
28
  import "./chunk-NYUWPJ4K.js";
29
29
  import "./chunk-NKQWDEB7.js";
30
30
  import "./chunk-KLO3TPTS.js";
31
- import "./chunk-YL7XIJ43.js";
31
+ import "./chunk-A6B45KSH.js";
32
32
  import "./chunk-624DWMDW.js";
33
33
  import "./chunk-RJHGIRU2.js";
34
34
  import "./chunk-WCU362Z6.js";
@@ -234,4 +234,4 @@ Every flag in full: baker schema scheduled-agents.update`
234
234
  export {
235
235
  updateCommand
236
236
  };
237
- //# sourceMappingURL=update-RD27CPMN.js.map
237
+ //# sourceMappingURL=update-HYZXKLZ7.js.map
@@ -85,4 +85,4 @@ Full guide: __tooling__/docs/tools/baker/winning-ads.md`
85
85
  export {
86
86
  winningAdsCommand
87
87
  };
88
- //# sourceMappingURL=winning-ads-274QKPKB.js.map
88
+ //# sourceMappingURL=winning-ads-QRBI3TLN.js.map
@@ -2,7 +2,7 @@ import {
2
2
  loadJsonArg,
3
3
  requireTarget,
4
4
  stageOp
5
- } from "./chunk-ZWANN4QQ.js";
5
+ } from "./chunk-WYBX53EI.js";
6
6
  import "./chunk-QB72UFAO.js";
7
7
  import "./chunk-D5FY4FAK.js";
8
8
  import "./chunk-65QWF5C5.js";
@@ -204,4 +204,4 @@ export {
204
204
  triggerCommand,
205
205
  variableCommand
206
206
  };
207
- //# sourceMappingURL=write-commands-M2CV6P4R.js.map
207
+ //# sourceMappingURL=write-commands-YECHEWMG.js.map