@koda-sl/baker-cli 0.367.0-dev.a5b15aee3 → 0.367.0-dev.e105093e4
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 +2 -2
- package/dist/cli.js +191 -150
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -705,7 +705,7 @@ Command groups: `budgets`, `campaigns`, `ad-groups`, `keywords` (add/update/remo
|
|
|
705
705
|
|
|
706
706
|
**Amending a staged op** — `draft amend <ref> (--file patch.json | --patch '<json>')` merges a JSON patch into an already-staged op's payload (objects deep-merge, `null` deletes a key, arrays/scalars replace) and re-validates it in full. Always prefer this over removing and re-staging — it preserves the op's ref (so dependents don't break) and its position in the draft. `draft show <ref>` prints the full staged payload (including warnings/annotations) so you can verify a change looks right before publish.
|
|
707
707
|
|
|
708
|
-
**Reading an earlier chat's changes** — `draft list` and `draft show` take `--chat <chat-id>` to read another chat in the same company instead of the current one. Every staged-draft family accepts it: `ads google|meta|linkedin draft list|show`, `tag-manager draft list|show`, `actions draft`, `tags draft`, and `scheduled-agents list|get
|
|
708
|
+
**Reading an earlier chat's changes** — `draft list` and `draft show` take `--chat <chat-id>` to read another chat in the same company instead of the current one. Every staged-draft family accepts it: `ads google|meta|linkedin draft list|show`, `tag-manager draft list|show`, `actions draft`, `tags draft`, and `scheduled-agents list|get` (`list` leaves briefs out; `get <id>` or `list --full` returns them). A published draft is kept in full, so this returns what that chat actually wrote — every headline, bid and target — plus each op's outcome and error. Use it when asked to redo or reapply earlier work rather than reconstructing copy from a summary. Read-only: staging, `amend`, `remove` and `clear` stay bound to `BAKER_CHAT_ID`, so one chat can never edit another's draft. To re-run only the changes a publish failed to land, use the chat's **Retry** control in the dashboard — it re-sends exactly those and leaves the ones that applied untouched.
|
|
709
709
|
|
|
710
710
|
**Already-satisfied writes aren't staged** — an update or pause/resume whose every field already holds the requested value on the live account is dropped instead of staged: the envelope returns `"staged": false, "noop": true` with a `reason` ("this ad is already Paused on Google Ads"), plus a hint. This is a success, not an error — there is nothing to publish. Only a positively-read live snapshot can trigger it; a failed or empty read always stages. Batch responses list the dropped ops under `skipped`, and `count` reflects what actually entered the draft.
|
|
711
711
|
|
|
@@ -3293,7 +3293,7 @@ A Scheduled agent is a **trigger** and a **prompt**. When the trigger fires, a S
|
|
|
3293
3293
|
|
|
3294
3294
|
```bash
|
|
3295
3295
|
baker scheduled-agents triggers # every trigger there is
|
|
3296
|
-
baker scheduled-agents list
|
|
3296
|
+
baker scheduled-agents list # id, name, trigger, status; briefs left out (--full for everything)
|
|
3297
3297
|
baker scheduled-agents get <id-or-temp_agent_id>
|
|
3298
3298
|
|
|
3299
3299
|
baker scheduled-agents create --name "Weekly report" --description "Prepare report" --prompt "Review last week's spend." --cron "0 9 * * MON" --timezone Europe/Madrid
|
package/dist/cli.js
CHANGED
|
@@ -977,14 +977,6 @@ var OBJECTIVE_CAMPAIGN_TYPES = {
|
|
|
977
977
|
LEAD_GENERATION: ["SPONSORED_UPDATES", "SPONSORED_INMAILS"],
|
|
978
978
|
ENGAGEMENT: ["SPONSORED_UPDATES", "DYNAMIC"]
|
|
979
979
|
};
|
|
980
|
-
var ENTITY_STATUSES = ["ACTIVE", "PAUSED", "ARCHIVED", "CANCELED", "DRAFT", "COMPLETED"];
|
|
981
|
-
var CAMPAIGN_GROUP_STATUSES = [
|
|
982
|
-
"ACTIVE",
|
|
983
|
-
"PAUSED",
|
|
984
|
-
"ARCHIVED",
|
|
985
|
-
"CANCELED",
|
|
986
|
-
"DRAFT"
|
|
987
|
-
];
|
|
988
980
|
var STAGEABLE_CREATE_STATUSES = ["DRAFT", "ACTIVE", "PAUSED"];
|
|
989
981
|
var CREATIVE_INTENDED_STATUSES = ["ACTIVE", "PAUSED", "DRAFT"];
|
|
990
982
|
var CTA_TYPES = [
|
|
@@ -1112,7 +1104,7 @@ var targetingCriteriaSchema = z3.object({
|
|
|
1112
1104
|
}).optional()
|
|
1113
1105
|
});
|
|
1114
1106
|
var stageableStatusSchema = z3.enum(STAGEABLE_CREATE_STATUSES);
|
|
1115
|
-
var entityStatusSchema = z3.enum(
|
|
1107
|
+
var entityStatusSchema = z3.enum(["ACTIVE", "PAUSED", "ARCHIVED", "CANCELED", "DRAFT", "COMPLETED"]);
|
|
1116
1108
|
function currencyMinimums(currencyCode) {
|
|
1117
1109
|
return CURRENCY_MINIMUMS[currencyCode] ?? DEFAULT_CURRENCY_MINIMUM;
|
|
1118
1110
|
}
|
|
@@ -1126,7 +1118,7 @@ var campaignGroupUpdateSchema = z3.object({
|
|
|
1126
1118
|
name: z3.string().min(1).max(LINKEDIN_LIMITS.campaignGroup.nameMax).optional(),
|
|
1127
1119
|
runSchedule: runScheduleSchema.optional(),
|
|
1128
1120
|
totalBudget: moneySchema.optional(),
|
|
1129
|
-
status:
|
|
1121
|
+
status: entityStatusSchema.optional()
|
|
1130
1122
|
}).refine((p) => Object.values(p).some((val) => val !== void 0), "update needs at least one field");
|
|
1131
1123
|
var campaignFields = {
|
|
1132
1124
|
name: z3.string().min(1).max(LINKEDIN_LIMITS.campaign.nameMax),
|
|
@@ -1827,18 +1819,6 @@ var linkedinDraftOpInputSchema = z3.discriminatedUnion("kind", [
|
|
|
1827
1819
|
updateOp("leadForm.update", leadFormUpdateSchema)
|
|
1828
1820
|
]);
|
|
1829
1821
|
|
|
1830
|
-
// ../api/src/ads-linkedin/transitions.ts
|
|
1831
|
-
var CAMPAIGN_GROUP_TRANSITIONS = {
|
|
1832
|
-
DRAFT: ["ACTIVE", "PAUSED", "CANCELED", "ARCHIVED"],
|
|
1833
|
-
ACTIVE: ["PAUSED", "CANCELED", "ARCHIVED"],
|
|
1834
|
-
PAUSED: ["ACTIVE", "CANCELED", "ARCHIVED"],
|
|
1835
|
-
ARCHIVED: ["ACTIVE", "PAUSED"]
|
|
1836
|
-
};
|
|
1837
|
-
var CAMPAIGN_TRANSITIONS = {
|
|
1838
|
-
...CAMPAIGN_GROUP_TRANSITIONS,
|
|
1839
|
-
ACTIVE: ["PAUSED", "CANCELED", "ARCHIVED", "COMPLETED"]
|
|
1840
|
-
};
|
|
1841
|
-
|
|
1842
1822
|
// ../api/src/ads-linkedin/wire.ts
|
|
1843
1823
|
import { z as z7 } from "zod";
|
|
1844
1824
|
|
|
@@ -7178,34 +7158,10 @@ function parseConditionsExpression(expression) {
|
|
|
7178
7158
|
}
|
|
7179
7159
|
|
|
7180
7160
|
// ../api/src/scheduledAgents.ts
|
|
7181
|
-
import { z as
|
|
7182
|
-
var scheduledAgentRunsAsSchema = z24.object({
|
|
7183
|
-
/** The person each run acts as; null when nobody owns it, so only the company's tools load. */
|
|
7184
|
-
name: z24.string().nullable(),
|
|
7185
|
-
/** That person's own connected tools. */
|
|
7186
|
-
personalTools: z24.array(z24.string()),
|
|
7187
|
-
/** The company's and organization's tools, and the platforms Baker connects to directly. */
|
|
7188
|
-
companyTools: z24.array(z24.string()),
|
|
7189
|
-
/** Set up, but nobody has signed in to them, so a run gets nothing from them. */
|
|
7190
|
-
notSignedIn: z24.array(z24.string()).optional(),
|
|
7191
|
-
/** The company switched connected tools off: only the platforms load. */
|
|
7192
|
-
toolsOff: z24.literal(true).optional()
|
|
7193
|
-
});
|
|
7194
|
-
var AUTO_PUBLISH_REFUSAL = 'Publishing every run unreviewed is a standing authorization only the user can grant, on the item itself, so it is recorded against their name. Stage the item without it, and once this chat is published ask the user to switch on "Publish its work on its own" (under "When a run finishes") on the item in Scheduled agents.';
|
|
7195
|
-
var scheduledAgentsUnstageRequestSchema = z24.object({
|
|
7196
|
-
chatId: z24.string().min(1),
|
|
7197
|
-
/** The item: a published id or a temp_agent_* id this chat staged. */
|
|
7198
|
-
ref: z24.string().min(1),
|
|
7199
|
-
/** One change of it, by its `index` in `list`'s draft. Left out, every change staged on it. */
|
|
7200
|
-
index: z24.number().int().min(0).optional()
|
|
7201
|
-
});
|
|
7202
|
-
var scheduledAgentsUnstageResponseSchema = z24.object({
|
|
7203
|
-
ok: z24.literal(true),
|
|
7204
|
-
data: z24.object({ ref: z24.string(), removed: z24.number().int().min(1) })
|
|
7205
|
-
});
|
|
7161
|
+
import { z as z25 } from "zod";
|
|
7206
7162
|
|
|
7207
7163
|
// ../api/src/scheduledAgentTriggers.ts
|
|
7208
|
-
import { z as
|
|
7164
|
+
import { z as z24 } from "zod";
|
|
7209
7165
|
var TRIGGER_GROUPS = {
|
|
7210
7166
|
time: { label: "Time", blurb: "On a clock you set." },
|
|
7211
7167
|
incoming: { label: "Incoming", blurb: "Another tool or your site calls in." },
|
|
@@ -7571,151 +7527,231 @@ var TRIGGER_TARGETS = {
|
|
|
7571
7527
|
"review.received": [target("sourceId", { open: false })],
|
|
7572
7528
|
"advertiser.new_ads": [target("advertiserId", { open: false })]
|
|
7573
7529
|
};
|
|
7574
|
-
var triggerTargetOptionSchema =
|
|
7575
|
-
value:
|
|
7576
|
-
label:
|
|
7530
|
+
var triggerTargetOptionSchema = z24.object({
|
|
7531
|
+
value: z24.string(),
|
|
7532
|
+
label: z24.string(),
|
|
7577
7533
|
/** A second line: a status, a tag list, where it comes from. */
|
|
7578
|
-
detail:
|
|
7534
|
+
detail: z24.string().optional(),
|
|
7579
7535
|
/** A mark: a path under the dashboard's `/logos/`, or an absolute image URL. */
|
|
7580
|
-
logo:
|
|
7536
|
+
logo: z24.string().optional()
|
|
7581
7537
|
});
|
|
7582
|
-
var scheduledAgentTriggerSchema =
|
|
7583
|
-
|
|
7584
|
-
kind:
|
|
7538
|
+
var scheduledAgentTriggerSchema = z24.discriminatedUnion("kind", [
|
|
7539
|
+
z24.object({
|
|
7540
|
+
kind: z24.literal("time.once"),
|
|
7585
7541
|
/** Epoch ms. Must still be in the future when the item is written. */
|
|
7586
|
-
runAt:
|
|
7542
|
+
runAt: z24.number(),
|
|
7587
7543
|
/** IANA zone. Defaults to the company's. */
|
|
7588
|
-
tz:
|
|
7544
|
+
tz: z24.string()
|
|
7589
7545
|
}),
|
|
7590
|
-
|
|
7591
|
-
kind:
|
|
7546
|
+
z24.object({
|
|
7547
|
+
kind: z24.literal("time.cron"),
|
|
7592
7548
|
/** Five-field cron expression. */
|
|
7593
|
-
cronspec:
|
|
7594
|
-
tz:
|
|
7549
|
+
cronspec: z24.string(),
|
|
7550
|
+
tz: z24.string()
|
|
7595
7551
|
}),
|
|
7596
|
-
|
|
7597
|
-
|
|
7598
|
-
kind:
|
|
7552
|
+
z24.object({ kind: z24.literal("webhook.received") }),
|
|
7553
|
+
z24.object({
|
|
7554
|
+
kind: z24.literal("app.event"),
|
|
7599
7555
|
/** The connected tool, by its toolkit slug: `gmail`, `slack`. */
|
|
7600
|
-
toolkit:
|
|
7556
|
+
toolkit: z24.string(),
|
|
7601
7557
|
/** What happens in it, by the tool's own trigger id: `GMAIL_NEW_GMAIL_MESSAGE`. */
|
|
7602
|
-
appEvent:
|
|
7558
|
+
appEvent: z24.string(),
|
|
7603
7559
|
/** Which connected account — a tool can be connected more than once. */
|
|
7604
|
-
account:
|
|
7560
|
+
account: z24.string(),
|
|
7605
7561
|
/** The tool's own settings for the event (a label, a channel, a repository), as JSON text. */
|
|
7606
|
-
configJson:
|
|
7562
|
+
configJson: z24.string().optional()
|
|
7607
7563
|
}),
|
|
7608
|
-
|
|
7609
|
-
kind:
|
|
7564
|
+
z24.object({
|
|
7565
|
+
kind: z24.literal("event.received"),
|
|
7610
7566
|
/** Absent = any event. */
|
|
7611
|
-
eventName:
|
|
7567
|
+
eventName: z24.string().optional()
|
|
7612
7568
|
}),
|
|
7613
|
-
|
|
7614
|
-
kind:
|
|
7569
|
+
z24.object({
|
|
7570
|
+
kind: z24.literal("connection.created"),
|
|
7615
7571
|
/** Absent = any tool. An OAuth provider type, or a Composio toolkit slug. */
|
|
7616
|
-
provider:
|
|
7572
|
+
provider: z24.string().optional()
|
|
7617
7573
|
}),
|
|
7618
|
-
|
|
7619
|
-
kind:
|
|
7620
|
-
provider:
|
|
7574
|
+
z24.object({
|
|
7575
|
+
kind: z24.literal("connection.removed"),
|
|
7576
|
+
provider: z24.string().optional()
|
|
7621
7577
|
}),
|
|
7622
|
-
|
|
7623
|
-
kind:
|
|
7578
|
+
z24.object({
|
|
7579
|
+
kind: z24.literal("form.submitted"),
|
|
7624
7580
|
/** Absent = any Form. */
|
|
7625
|
-
flowId:
|
|
7581
|
+
flowId: z24.string().optional()
|
|
7626
7582
|
}),
|
|
7627
|
-
|
|
7628
|
-
kind:
|
|
7629
|
-
flowId:
|
|
7630
|
-
stepId:
|
|
7583
|
+
z24.object({
|
|
7584
|
+
kind: z24.literal("flow.step.submitted"),
|
|
7585
|
+
flowId: z24.string(),
|
|
7586
|
+
stepId: z24.string()
|
|
7631
7587
|
}),
|
|
7632
|
-
|
|
7633
|
-
kind:
|
|
7588
|
+
z24.object({
|
|
7589
|
+
kind: z24.literal("landing.created"),
|
|
7634
7590
|
/** Absent = any page. A page's slug. */
|
|
7635
|
-
page:
|
|
7591
|
+
page: z24.string().optional(),
|
|
7636
7592
|
/** Absent = any tag. */
|
|
7637
|
-
tag:
|
|
7593
|
+
tag: z24.string().optional()
|
|
7638
7594
|
}),
|
|
7639
|
-
|
|
7640
|
-
kind:
|
|
7641
|
-
page:
|
|
7642
|
-
tag:
|
|
7595
|
+
z24.object({
|
|
7596
|
+
kind: z24.literal("landing.published"),
|
|
7597
|
+
page: z24.string().optional(),
|
|
7598
|
+
tag: z24.string().optional()
|
|
7643
7599
|
}),
|
|
7644
|
-
|
|
7645
|
-
kind:
|
|
7600
|
+
z24.object({
|
|
7601
|
+
kind: z24.literal("experiment.started"),
|
|
7646
7602
|
/** Absent = any test. */
|
|
7647
|
-
experimentId:
|
|
7603
|
+
experimentId: z24.string().optional()
|
|
7648
7604
|
}),
|
|
7649
|
-
|
|
7650
|
-
kind:
|
|
7651
|
-
experimentId:
|
|
7605
|
+
z24.object({
|
|
7606
|
+
kind: z24.literal("experiment.decided"),
|
|
7607
|
+
experimentId: z24.string().optional()
|
|
7652
7608
|
}),
|
|
7653
|
-
|
|
7654
|
-
kind:
|
|
7655
|
-
experimentId:
|
|
7609
|
+
z24.object({
|
|
7610
|
+
kind: z24.literal("experiment.ended"),
|
|
7611
|
+
experimentId: z24.string().optional()
|
|
7656
7612
|
}),
|
|
7657
|
-
|
|
7658
|
-
kind:
|
|
7659
|
-
experimentId:
|
|
7613
|
+
z24.object({
|
|
7614
|
+
kind: z24.literal("experiment.concluded"),
|
|
7615
|
+
experimentId: z24.string().optional()
|
|
7660
7616
|
}),
|
|
7661
|
-
|
|
7662
|
-
kind:
|
|
7617
|
+
z24.object({
|
|
7618
|
+
kind: z24.literal("task.created"),
|
|
7663
7619
|
/** Absent = any Task. */
|
|
7664
|
-
tag:
|
|
7620
|
+
tag: z24.string().optional()
|
|
7665
7621
|
}),
|
|
7666
|
-
|
|
7667
|
-
kind:
|
|
7622
|
+
z24.object({
|
|
7623
|
+
kind: z24.literal("task.claimed"),
|
|
7668
7624
|
/** Absent = any Task. One Task, by id. */
|
|
7669
|
-
taskId:
|
|
7670
|
-
tag:
|
|
7625
|
+
taskId: z24.string().optional(),
|
|
7626
|
+
tag: z24.string().optional()
|
|
7671
7627
|
}),
|
|
7672
|
-
|
|
7673
|
-
kind:
|
|
7674
|
-
taskId:
|
|
7675
|
-
tag:
|
|
7628
|
+
z24.object({
|
|
7629
|
+
kind: z24.literal("task.completed"),
|
|
7630
|
+
taskId: z24.string().optional(),
|
|
7631
|
+
tag: z24.string().optional()
|
|
7676
7632
|
}),
|
|
7677
|
-
|
|
7678
|
-
kind:
|
|
7633
|
+
z24.object({
|
|
7634
|
+
kind: z24.literal("session.published"),
|
|
7679
7635
|
/** Absent = any agent. Only the runs of this Scheduled agent. */
|
|
7680
|
-
agentId:
|
|
7636
|
+
agentId: z24.string().optional()
|
|
7681
7637
|
}),
|
|
7682
|
-
|
|
7683
|
-
kind:
|
|
7684
|
-
agentId:
|
|
7638
|
+
z24.object({
|
|
7639
|
+
kind: z24.literal("session.publish_failed"),
|
|
7640
|
+
agentId: z24.string().optional()
|
|
7685
7641
|
}),
|
|
7686
|
-
|
|
7687
|
-
kind:
|
|
7642
|
+
z24.object({
|
|
7643
|
+
kind: z24.literal("knowledge.updated"),
|
|
7688
7644
|
/** Absent = any collection. */
|
|
7689
|
-
collection:
|
|
7645
|
+
collection: z24.string().optional()
|
|
7690
7646
|
}),
|
|
7691
|
-
|
|
7692
|
-
|
|
7693
|
-
|
|
7694
|
-
kind:
|
|
7695
|
-
provider:
|
|
7647
|
+
z24.object({ kind: z24.literal("brand.updated") }),
|
|
7648
|
+
z24.object({ kind: z24.literal("creative.created") }),
|
|
7649
|
+
z24.object({
|
|
7650
|
+
kind: z24.literal("connection.needs_reconnect"),
|
|
7651
|
+
provider: z24.string().optional()
|
|
7696
7652
|
}),
|
|
7697
|
-
|
|
7698
|
-
kind:
|
|
7653
|
+
z24.object({
|
|
7654
|
+
kind: z24.literal("session.publish_incomplete"),
|
|
7699
7655
|
/** Absent = any platform. One of `PUBLISH_PLATFORMS`. */
|
|
7700
|
-
platform:
|
|
7701
|
-
agentId:
|
|
7656
|
+
platform: z24.string().optional(),
|
|
7657
|
+
agentId: z24.string().optional()
|
|
7702
7658
|
}),
|
|
7703
|
-
|
|
7704
|
-
kind:
|
|
7659
|
+
z24.object({
|
|
7660
|
+
kind: z24.literal("review.received"),
|
|
7705
7661
|
/** Absent = any review source. */
|
|
7706
|
-
sourceId:
|
|
7662
|
+
sourceId: z24.string().optional()
|
|
7707
7663
|
}),
|
|
7708
|
-
|
|
7709
|
-
kind:
|
|
7664
|
+
z24.object({
|
|
7665
|
+
kind: z24.literal("advertiser.new_ads"),
|
|
7710
7666
|
/** Absent = any followed advertiser. */
|
|
7711
|
-
advertiserId:
|
|
7667
|
+
advertiserId: z24.string().optional()
|
|
7712
7668
|
})
|
|
7713
7669
|
]);
|
|
7714
|
-
var occurrencesSchema =
|
|
7670
|
+
var occurrencesSchema = z24.array(z24.number().int().positive()).max(32);
|
|
7715
7671
|
function firstTimes(count2) {
|
|
7716
7672
|
return Array.from({ length: Math.max(0, Math.floor(count2)) }, (_, index) => index + 1);
|
|
7717
7673
|
}
|
|
7718
7674
|
|
|
7675
|
+
// ../api/src/scheduledAgents.ts
|
|
7676
|
+
var scheduledAgentRunsAsSchema = z25.object({
|
|
7677
|
+
/** The person each run acts as; null when nobody owns it, so only the company's tools load. */
|
|
7678
|
+
name: z25.string().nullable(),
|
|
7679
|
+
/** That person's own connected tools. */
|
|
7680
|
+
personalTools: z25.array(z25.string()),
|
|
7681
|
+
/** The company's and organization's tools, and the platforms Baker connects to directly. */
|
|
7682
|
+
companyTools: z25.array(z25.string()),
|
|
7683
|
+
/** Set up, but nobody has signed in to them, so a run gets nothing from them. */
|
|
7684
|
+
notSignedIn: z25.array(z25.string()).optional(),
|
|
7685
|
+
/** The company switched connected tools off: only the platforms load. */
|
|
7686
|
+
toolsOff: z25.literal(true).optional()
|
|
7687
|
+
});
|
|
7688
|
+
var AUTO_PUBLISH_REFUSAL = 'Publishing every run unreviewed is a standing authorization only the user can grant, on the item itself, so it is recorded against their name. Stage the item without it, and once this chat is published ask the user to switch on "Publish its work on its own" (under "When a run finishes") on the item in Scheduled agents.';
|
|
7689
|
+
var scheduledAgentsUnstageRequestSchema = z25.object({
|
|
7690
|
+
chatId: z25.string().min(1),
|
|
7691
|
+
/** The item: a published id or a temp_agent_* id this chat staged. */
|
|
7692
|
+
ref: z25.string().min(1),
|
|
7693
|
+
/** One change of it, by its `index` in `list`'s draft. Left out, every change staged on it. */
|
|
7694
|
+
index: z25.number().int().min(0).optional()
|
|
7695
|
+
});
|
|
7696
|
+
var scheduledAgentsUnstageResponseSchema = z25.object({
|
|
7697
|
+
ok: z25.literal(true),
|
|
7698
|
+
data: z25.object({ ref: z25.string(), removed: z25.number().int().min(1) })
|
|
7699
|
+
});
|
|
7700
|
+
var scheduledAgentsListRequestSchema = z25.object({
|
|
7701
|
+
/** Also return what this chat staged. */
|
|
7702
|
+
chatId: z25.string().min(1).optional(),
|
|
7703
|
+
/** Every item and staged change as stored, briefs included. Left out, the compact view below. */
|
|
7704
|
+
full: z25.boolean().optional()
|
|
7705
|
+
});
|
|
7706
|
+
var scheduledAgentListItemSchema = z25.object({
|
|
7707
|
+
id: z25.string(),
|
|
7708
|
+
name: z25.string(),
|
|
7709
|
+
description: z25.string(),
|
|
7710
|
+
enabled: z25.boolean(),
|
|
7711
|
+
trigger: scheduledAgentTriggerSchema,
|
|
7712
|
+
occurrences: occurrencesSchema.optional(),
|
|
7713
|
+
conditions: conditionsSchema.optional(),
|
|
7714
|
+
cooldownMinutes: z25.number().optional(),
|
|
7715
|
+
/** ISO. Only a one-off knows its next moment. */
|
|
7716
|
+
nextRunAt: z25.string().optional(),
|
|
7717
|
+
/** ISO. */
|
|
7718
|
+
lastRunAt: z25.string().optional(),
|
|
7719
|
+
firedCount: z25.number(),
|
|
7720
|
+
totalRuns: z25.number(),
|
|
7721
|
+
templateName: z25.string().optional(),
|
|
7722
|
+
publishesOwnWork: z25.literal(true).optional(),
|
|
7723
|
+
/** Whether the connected tool is reporting to an `app.event` item. */
|
|
7724
|
+
listening: z25.object({ status: z25.string(), reason: z25.string().optional() }).optional()
|
|
7725
|
+
});
|
|
7726
|
+
var scheduledAgentStagedChangeSchema = z25.object({
|
|
7727
|
+
index: z25.number().int().min(0),
|
|
7728
|
+
kind: z25.enum(["create", "update", "delete"]),
|
|
7729
|
+
/** The published id, or the temp_agent_* id a create returned. */
|
|
7730
|
+
ref: z25.string(),
|
|
7731
|
+
name: z25.string(),
|
|
7732
|
+
description: z25.string().optional(),
|
|
7733
|
+
trigger: scheduledAgentTriggerSchema.optional(),
|
|
7734
|
+
enabled: z25.boolean().optional(),
|
|
7735
|
+
/** For an update: the fields it changes. */
|
|
7736
|
+
changes: z25.array(z25.string()).optional(),
|
|
7737
|
+
result: z25.object({
|
|
7738
|
+
status: z25.enum(["applied", "skipped", "failed"]),
|
|
7739
|
+
reason: z25.string().optional(),
|
|
7740
|
+
scheduledAgentId: z25.string().optional()
|
|
7741
|
+
}).optional()
|
|
7742
|
+
});
|
|
7743
|
+
var scheduledAgentsListResponseSchema = z25.object({
|
|
7744
|
+
ok: z25.literal(true),
|
|
7745
|
+
data: z25.object({
|
|
7746
|
+
published: z25.array(scheduledAgentListItemSchema),
|
|
7747
|
+
draft: z25.object({
|
|
7748
|
+
status: z25.enum(["active", "publishing", "discarded", "applied"]).nullable(),
|
|
7749
|
+
ops: z25.array(scheduledAgentStagedChangeSchema)
|
|
7750
|
+
}).nullable()
|
|
7751
|
+
}),
|
|
7752
|
+
hints: z25.array(z25.string()).optional()
|
|
7753
|
+
});
|
|
7754
|
+
|
|
7719
7755
|
// ../api/src/studio.ts
|
|
7720
7756
|
import { z as z26 } from "zod";
|
|
7721
7757
|
var studioGenerationStatusSchema = z26.enum(["running", "completed", "partial", "failed"]);
|
|
@@ -21090,7 +21126,7 @@ Example: baker ads linkedin campaign-groups update 635137195 --total-budget 8000
|
|
|
21090
21126
|
end: { type: "string", description: "New run schedule end" },
|
|
21091
21127
|
"total-budget": { type: "string", description: TOTAL_BUDGET_HELP },
|
|
21092
21128
|
currency: { type: "string", description: "3-letter currency code (defaults to the ad account currency)" },
|
|
21093
|
-
status: { type: "string", description: "ACTIVE|PAUSED|ARCHIVED
|
|
21129
|
+
status: { type: "string", description: "ACTIVE|PAUSED|ARCHIVED|\u2026" },
|
|
21094
21130
|
file: { type: "string", description: "JSON file with fields to change" }
|
|
21095
21131
|
},
|
|
21096
21132
|
run: async ({ args: args5 }) => {
|
|
@@ -63970,27 +64006,32 @@ var getCommand4 = defineCommand199({
|
|
|
63970
64006
|
|
|
63971
64007
|
// src/commands/scheduled-agents/list.ts
|
|
63972
64008
|
import { defineCommand as defineCommand200 } from "citty";
|
|
64009
|
+
var FULL_DESCRIPTION = "Return every item and staged change as stored, briefs included (tens of KB). Prefer `get <id>` for one item.";
|
|
63973
64010
|
registerSchema({
|
|
63974
64011
|
command: "scheduled-agents.list",
|
|
63975
|
-
description: "List published
|
|
64012
|
+
description: "List scheduled agents compactly: each published item's id, name, trigger, enabled and run counts, and each change this chat staged (index, kind, ref, name, trigger). Briefs are left out \u2014 `get <id>` returns one item in full, --full returns everything as stored. Includes draft state when BAKER_CHAT_ID is set, or --chat <id> to read an earlier chat's staged items instead.",
|
|
63976
64013
|
args: {
|
|
63977
|
-
chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
|
|
64014
|
+
chat: { type: "string", description: CHAT_READ_ARG.description, required: false },
|
|
64015
|
+
full: { type: "boolean", description: FULL_DESCRIPTION, required: false }
|
|
63978
64016
|
}
|
|
63979
64017
|
});
|
|
63980
64018
|
var listCommand17 = defineCommand200({
|
|
63981
64019
|
meta: {
|
|
63982
64020
|
name: "list",
|
|
63983
|
-
description: "List scheduled agents
|
|
64021
|
+
description: "List scheduled agents: id, name, trigger and status for each, plus this chat's staged changes when BAKER_CHAT_ID is set (or --chat <id> for an earlier chat's). Briefs are left out. Start here: baker scheduled-agents list; then baker scheduled-agents get <id> for one item's brief."
|
|
64022
|
+
},
|
|
64023
|
+
args: {
|
|
64024
|
+
chat: CHAT_READ_ARG,
|
|
64025
|
+
full: { type: "boolean", description: FULL_DESCRIPTION, required: false, default: false }
|
|
63984
64026
|
},
|
|
63985
|
-
args: { chat: CHAT_READ_ARG },
|
|
63986
64027
|
run: async ({ args: args5 }) => {
|
|
63987
64028
|
try {
|
|
63988
64029
|
const env = getEnv();
|
|
63989
|
-
const body = {};
|
|
63990
64030
|
const chatId = typeof args5.chat === "string" && args5.chat.length > 0 ? args5.chat : env.BAKER_CHAT_ID;
|
|
63991
|
-
|
|
63992
|
-
|
|
63993
|
-
|
|
64031
|
+
const body = {
|
|
64032
|
+
...chatId ? { chatId } : {},
|
|
64033
|
+
...args5.full === true ? { full: true } : {}
|
|
64034
|
+
};
|
|
63994
64035
|
const response = await apiPost("/api/scheduled-agents/list", body);
|
|
63995
64036
|
writeJson(response);
|
|
63996
64037
|
} catch (err) {
|