@sellable/mcp 0.1.435 → 0.1.437
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/dist/index-dev.js +0 -0
- package/dist/index.js +0 -0
- package/dist/tools/campaign-fill-routing.js +1 -1
- package/dist/tools/prompts.js +1 -1
- package/dist/tools/refill-sends.js +6 -3
- package/package.json +1 -1
- package/skills/refill-sends/SKILL.md +26 -5
- package/skills/refill-sends-workflow/SKILL.md +100 -24
- package/skills/research/config.json +0 -9
package/dist/index-dev.js
CHANGED
|
File without changes
|
package/dist/index.js
CHANGED
|
File without changes
|
|
@@ -6,7 +6,7 @@ async function postCampaignFillRoute(body) {
|
|
|
6
6
|
export const campaignFillRoutingToolDefinitions = [
|
|
7
7
|
{
|
|
8
8
|
name: "resolve_campaign_fill_route",
|
|
9
|
-
description: 'Audit-only resolver to call before interpreting plain "fill campaigns", "load everyone up", or similar fill requests. It decides whether the workspace has evergreen/horizon targets,
|
|
9
|
+
description: 'Audit-only resolver to call before interpreting plain "fill campaigns", "load everyone up", or similar fill requests. It decides whether the workspace has evergreen/horizon targets, current dashboard-active campaign-backed sequence targets, start-eligible PAUSED targets, or no targets so the agent must ask what to create. It does not create, append, prepare, approve, schedule, launch, archive, delete, send, or call lower-level fill tools. Only call fill_campaign_horizon when this resolver returns route "evergreen_horizon" and the selected returned target is eligible; use start_campaign only for exact returned startEligible PAUSED targets after the refill workflow approval/reread packet proves starting is needed. Exact target narrowing uses campaignId or tableId only; never fuzzy campaign names.',
|
|
10
10
|
inputSchema: {
|
|
11
11
|
type: "object",
|
|
12
12
|
properties: {
|
package/dist/tools/prompts.js
CHANGED
|
@@ -373,7 +373,7 @@ export function getPostFindLeadsScoutRegistry() {
|
|
|
373
373
|
codex: 'After confirm_lead_list copies source rows and the initial campaign-table execution slice exists, ask the filter-choice question immediately. Do not spawn anything before that question. After the answer, launch only Message Drafting. The filter-choice answer is the post-import user gate for this single worker; do not ask another question about starting it in step-wise or YOLO mode. The registry lookup is not a launch: after get_post_find_leads_scout_registry, immediately invoke Task/spawn_agent or the host background-agent mechanism before loading filter-leads.md, before saving rubrics, and before treating skip-filters as ready for message review. Both choices route through this kickoff; do not let filters_skipped jump straight from filter-choice to message-generation. If filters are chosen, the parent stays on Filter Rules and drafts/saves rubrics with MCP tools while Message Drafting runs in the background. If filters are skipped, move to Messages/message review only after Message Drafting has started or is ready; update_campaign(currentStep=messages) is not proof of launch. If the named Message Drafting custom agent is unavailable, spawn a generic gpt-5.5 xhigh Message Drafting background agent with the same lean campaign/table basis. When the background worker starts, persist workerDetails.messageDraftBuilder with statusSource "branch", status "branch-running", runId, startedAt, updatedAt, basisToken when known, and basis containing campaignId, selectedLeadListId, workflowTableId, filterChoice, and reviewBatchRowHash or reviewBatchRowIds; workerStatuses.messageDraftBuilder may be "running" as a simple badge only. Never put rich proof under workerStatuses and never use workerStatuses.messageDrafting. If no background-agent tool is callable, start the same full message branch inline before filter drafting or before skip-filter message review, record workerDetails.messageDraftBuilder with statusSource "parent-thread-fallback" and status "fallback-active", and require the same live context, prompt, assets, and validation gate before message review; do not wait until filters are saved and then call the registry.',
|
|
374
374
|
claude: "After confirm_lead_list copies source rows and the initial campaign-table execution slice exists, ask the filter-choice question immediately. Do not invoke any Task/Agent before that question. After the answer, invoke only Message Drafting. If filters are chosen, parent drafts/saves rubrics with MCP tools while Message Drafting runs, asks filter approval, then joins Message Drafting. If filters are skipped, invoke only Message Drafting and move to Messages/message review.",
|
|
375
375
|
parentThreadRule: 'Named agents are optional acceleration, but message drafting is not optional. The only normal background worker is Message Drafting. The filter-choice answer is the campaign-scoped go-ahead for this single post-import worker; do not ask another question to start it in step-wise or YOLO mode. If a named agent is unavailable, use a generic gpt-5.5 xhigh Message Drafting background agent. source work and filter work stay in the parent thread with MCP tools. If post-find-leads-message-scout is available, run it as the background Message Draft Builder after the filter-choice answer. The registry lookup is not a launch: get_post_find_leads_scout_registry only identifies the worker, and Message Drafting counts as started only after Task/spawn_agent or the host background-agent tool is invoked, or after the parent begins the same full message branch inline because no background-agent tool is callable. This launch must happen before loading filter-leads.md, save_rubrics, filter approval, or skip-filter message review; currentStep=messages is not proof of launch. If post-find-leads-message-scout is absent, do not customer-surface install status. Do not silently treat message drafting as started; the main thread must either launch the background worker or execute the same message branch from CampaignOffer state, selected source state, workflowTableId, and initial campaign-table execution slice rows. For a spawned worker, record workerDetails.messageDraftBuilder with statusSource branch / status branch-running, runId, startedAt, updatedAt, and basis containing campaignId, selectedLeadListId, workflowTableId, filterChoice, and reviewBatchRowHash or reviewBatchRowIds. workerStatuses.messageDraftBuilder is optional simple badge text only ("running", "ready", "blocked", "idle"); never put runId/statusSource/basis under workerStatuses and never use workerStatuses.messageDrafting. If no background-agent tool is callable, start that same full message branch inline before filter drafting or before skip-filter message review, record workerDetails.messageDraftBuilder with statusSource parent-thread-fallback / status fallback-active then ready, and require the same live context, prompt, assets, and validation gate before message review; do not report that as a background worker failure. If neither branch nor inline fallback can run, return blocked/retry-needed; do not wait until filters are saved and then call the registry. The Message Drafting handoff must be lean. Do not paste copied row counts, brief hashes, review-batch hashes, full reviewBatchRowIds, broad row data, or local debug artifacts into the spawn prompt. Local markdown/json files are not normal-path inputs. The filter-choice question is the first post-import user gate; do not load post-lead registries or filter references before it. Message drafting starts after the filter-choice answer, must load get_subskill_prompt({ subskillName: "generate-messages" }), and must load every required message asset named by generate-messages Mode 0 through get_subskill_asset before drafting. Reference Asset Loading means loading the required pre-draft reference pack before drafting; return blocked/retry-needed if required assets cannot be loaded; load ai-tells.md because it is never optional. The branch or parent-thread fallback loads the full generate-messages prompt and every referenced asset through get_subskill_asset. After generating/revising the candidate and before returning ready, must load get_subskill_prompt({ subskillName: "create-campaign-v2-validation" }) as the final internal validation gate, must read live campaign table state through scoped MCP/product tools, and must reject mismatched selectedLeadListId/workflowTableId/campaign/workspace input. Do not block when filters were chosen but leadScoringRubrics are not yet visible in the branch read; the parent owns save_rubrics and filter approval in parallel, so Message Drafting should return status ready with basisStatus usable_initial when campaign/list/table identity and the non-empty execution slice match. Do not use any alternate, local-artifact, or examples-only message prompt. User copy feedback, message QA, or rewrite requests before approve-message must be routed back to Message Drafting with the current recommendation, lean campaign/table basis, and latest user text; the parent must not rewrite or QA the template from memory and must not call update_campaign_brief before approve-message. The worker validates internally and returns only templateRecommendation, tokenFillRules, renderedGoodSample, status, approveOrReviseRecommendation, validationStatus, outputAt, outputHash, and blocked/retry detail. Do not render renderedFallbackSample, risk notes, or a qaReceipt on the normal happy path. On the filter path, save_rubrics keeps the browser on Filter Rules after save_rubrics so the user can approve the saved criteria; after saved-filter approval, move to Filter Leads with currentStep=apply-icp-rubric whether Message Drafting is ready or still running. Wait there for message approval. Enrichment, filtering, Generate Message cells, sender setup, sequence attach, and launch wait for template approval on the Use Template path. On the skip path, move to Messages/message review after Message Drafting has started or is ready and wait for message approval before enrichment or Settings. Do not render message review from checklist or shortcut instructions; message review requires a messageDraftRecommendation whose basis proves the generate-messages prompt, required message assets, and validation gate ran for the current campaign/table execution slice. Do not automatically rerun Message Drafting after filters/enrichment finish; show the initial draft by default and offer an enriched rewrite only with explicit user opt-in. Handoff and recommendation output are Markdown with labeled fields, not raw JSON.',
|
|
376
|
-
prepareMessagesRule: `Default create-campaign stays on the existing reviewBatchLimit:15 first campaign-table execution slice. For plain post-mint fill/load/refill requests, load get_subskill_prompt({ subskillName: "refill-sends-workflow" }), then call resolve_campaign_fill_route({ intent:"plain" }), list_senders, and get_campaign_refill_state for enough candidate campaigns to identify the campaign that most recently had scheduler-owned sends for the relevant sender set before any mutation. Route outcomes are route:"evergreen_horizon", route:"active_campaigns", and route:"ask_create"; stay in the same campaignOfferId/campaignId context after minting. Plain fill is not an alias for fill_campaign_horizon or campaign creation. fill_campaign_horizon is evergreen-only and is not the generic regular-campaign fill path. Campaign creation is allowed only after route:"ask_create" and explicit user selection; it is never the default response to plain fill. Treat "fill up/load sends" as capacity-fill preparation, and treat "refill senders", "fill senders", "max out senders", and "load everyone up" as sender-scoped capacity-fill preparation. For sender-scoped requests with no named senders, --yolo means all eligible healthy senders enrolled in active campaign-backed sequence campaigns in the active workspace; without --yolo, ask which eligible enrolled senders to refill before choosing campaigns or mutating. In non-yolo interactive Codex or Claude Code sessions, the sender/campaign/action approval packet must be asked through request_user_input/AskUserQuestion with exactly Accept and Decline; do not use plain chat approval. The approval question body must show workspace, sender scope, a campaign-by-campaign table, exact ids/caps/dates, side effects, forbidden actions, and stop condition before mutation. Default --yolo horizon is a two-send-day horizon: two sender-local send days, skipping no-send-hour days. For campaign-scoped fill/refill, select the best recent-send campaign and calculate the bounded gap from healthy sender daily capacity minus future scheduler-owned scheduled sends and ready-to-schedule rows, then prepare only that gap. For sender-scoped fill/refill, calculate the bounded gap per eligible sender across active enrolled campaigns, counting future scheduled and ready-to-schedule rows across those campaigns, then choose the best same-sender campaign to fill each sender gap: prefer recent/future scheduler-owned sends for that sender, then strongest recent result evidence, then source health. Do not stop after filling only one sender when the request was sender-scoped. Use the refill workflow to decide whether to enrich/prep more rows in that same recent-send/best-result campaign, add/import more rows to that same campaign/source path, use a different existing campaign only when the selected same-sender lane is blocked/exhausted/already loaded while the sender still has a gap, or ask what to create. Do not create warm-post-engager side campaigns. Surface sender-health blockers separately from prepared/approved/scheduled counts. User-facing refill decisions must be campaign-name-first and sender-name-first, with ids as proof/execution targets only. For already-running regular campaigns that need Signal Discovery source replenishment, use the guarded currentStep clear with clearCurrentStepIfMatches:"running", campaign-scoped provider prompt/search/select, and import_leads with the existing sourceLeadListId when a newly approved selected-post scrape would otherwise return reusedExistingSourceList. After confirm_lead_list copies rows into an existing table, avoid fixed maxRowsToCheck:100; if confirm_lead_list returns USER_ADDED_ROWS_LIMIT_EXCEEDED, create a bounded same-source split from selectedLeadListId with get_rows_minimal/load_csv_linkedin_leads, confirm that smaller source list into the same campaign, and operate on the reviewBatch first; inspect reviewBatch/table selectors or use adaptive/wider bounded prep so appended rows are included. Do not interpret checkedRows as enriched rows; it is only the table cursor. Prepared, approved, and ready_to_schedule rows are intermediate states; never call them scheduled unless a re-read proves scheduler-owned scheduled cells with non-null scheduledFor. Before source import, prep, or
|
|
376
|
+
prepareMessagesRule: `Default create-campaign stays on the existing reviewBatchLimit:15 first campaign-table execution slice. For plain post-mint fill/load/refill requests, load get_subskill_prompt({ subskillName: "refill-sends-workflow" }), then call resolve_campaign_fill_route({ intent:"plain" }), list_senders, and get_campaign_refill_state for enough candidate campaigns to identify the campaign that most recently had scheduler-owned sends for the relevant sender set before any mutation. Route outcomes are route:"evergreen_horizon", route:"active_campaigns", and route:"ask_create"; if a plain managed-waterfall route has archived/completed skipped slots or does not cover the named sender set, immediately refetch with resolve_campaign_fill_route({ intent:"active" }) and inspect current dashboard-active ACTIVE/PAUSED campaign-backed sequence campaigns before declaring a sender blocked; stay in the same campaignOfferId/campaignId context after minting. Plain fill is not an alias for fill_campaign_horizon or campaign creation. fill_campaign_horizon is evergreen-only and is not the generic regular-campaign fill path. Campaign creation is allowed only after route:"ask_create" and explicit user selection; it is never the default response to plain fill. Treat "fill up/load sends" as capacity-fill preparation, and treat "refill senders", "fill senders", "max out senders", and "load everyone up" as sender-scoped capacity-fill preparation. For sender-scoped requests with no named senders, --yolo means all eligible healthy senders enrolled in active campaign-backed sequence campaigns in the active workspace; without --yolo, ask which eligible enrolled senders to refill before choosing campaigns or mutating. In non-yolo interactive Codex or Claude Code sessions, the sender/campaign/action approval packet must be asked through request_user_input/AskUserQuestion with exactly Accept and Decline; do not use plain chat approval. The approval question body must show workspace, sender scope, a campaign-by-campaign table, exact ids/caps/dates, side effects, forbidden actions, and stop condition before mutation. Default --yolo horizon is a two-send-day horizon: two sender-local send days, skipping no-send-hour days. For campaign-scoped fill/refill, select the best recent-send campaign and calculate the bounded gap from healthy sender daily capacity minus future scheduler-owned scheduled sends and ready-to-schedule rows, then prepare only that gap. For sender-scoped fill/refill, calculate the bounded gap per eligible sender across active enrolled campaigns, counting future scheduled and ready-to-schedule rows across those campaigns, then choose the best same-sender campaign to fill each sender gap: prefer recent/future scheduler-owned sends for that sender, then strongest recent result evidence, then source health. Do not stop after filling only one sender when the request was sender-scoped. In --yolo, continue through every safe selected sender/campaign action covered by the rendered packet, reread after each terminal apply/prep/start result, and when no safe in-packet action remains return concrete continuation options with campaign names, exact ids, and which options require a new approval packet. Use the refill workflow to decide whether to enrich/prep more rows in that same recent-send/best-result campaign, add/import more rows to that same campaign/source path, use a different existing campaign only when the selected same-sender lane is blocked/exhausted/already loaded while the sender still has a gap, or ask what to create. Do not create warm-post-engager side campaigns. Surface sender-health blockers separately from prepared/approved/scheduled counts. User-facing refill decisions must be campaign-name-first and sender-name-first, with ids as proof/execution targets only. For already-running regular campaigns that need Signal Discovery source replenishment, use the guarded currentStep clear with clearCurrentStepIfMatches:"running", campaign-scoped provider prompt/search/select, and import_leads with the existing sourceLeadListId when a newly approved selected-post scrape would otherwise return reusedExistingSourceList. After confirm_lead_list copies rows into an existing table, avoid fixed maxRowsToCheck:100; if confirm_lead_list returns USER_ADDED_ROWS_LIMIT_EXCEEDED, create a bounded same-source split from selectedLeadListId with get_rows_minimal/load_csv_linkedin_leads, confirm that smaller source list into the same campaign, and operate on the reviewBatch first; inspect reviewBatch/table selectors or use adaptive/wider bounded prep so appended rows are included. Do not interpret checkedRows as enriched rows; it is only the table cursor. Prepared, approved, and ready_to_schedule rows are intermediate states; never call them scheduled unless a re-read proves scheduler-owned scheduled cells with non-null scheduledFor. Before source import, prep, approval, or selected paused campaign start, require exact visible approval or --yolo packet auto-accept and a fresh get_campaign_refill_state reread; stop if freshness.stateHash or exact ids changed. For "approve X messages", use approvalMode:approve only when explicitly requested. For "schedule X sends" or "fill sender sends", approve only when explicitly requested, then re-read campaign/table scheduled counts; if scheduler-owned scheduledFor cells are not present, report prepared/approved/ready - awaiting scheduler instead of success. start_campaign is allowed in refill only for exact selected PAUSED, dashboard-active, campaign-backed sequence targets named in the bounded packet, and the packet must state that starting can let the product scheduler schedule/send approved eligible sequence actions. Never start unrelated, archived, completed, draft, direct, or non-selected campaigns, never broad approve-all, and never use direct scheduler writes. campaignId is CampaignOffer.id. If the user asks to stop preparation, the target is wrong, or status shows the wrong campaign/table, use cancel_campaign_message_preparation only for the exact active job. Low-level selectors are diagnostics and recovery only for this lane.`,
|
|
377
377
|
},
|
|
378
378
|
};
|
|
379
379
|
}
|
|
@@ -143,21 +143,24 @@ export function refillSendsCommand(input = {}) {
|
|
|
143
143
|
firstOperationalSteps: [
|
|
144
144
|
'Load get_subskill_prompt({ subskillName: "refill-sends-workflow" }) before any product operation.',
|
|
145
145
|
`Resolve route with resolve_campaign_fill_route({ intent: "${intent}"${input.campaignId ? `, campaignId: "${input.campaignId}"` : ""}${input.tableId ? `, tableId: "${input.tableId}"` : ""} }).`,
|
|
146
|
+
'If the plain route shows stale managed waterfall evidence, archived/completed shared slots, or targets that do not cover the selected sender set, immediately call resolve_campaign_fill_route({ intent: "active" }) and inspect current dashboard-active ACTIVE/PAUSED campaign-backed sequence campaigns before declaring a sender blocked.',
|
|
146
147
|
"Call list_senders and get_sender_routing, then resolve sender selectors against active enrolled campaign-backed sequence senders.",
|
|
147
148
|
untilDate
|
|
148
149
|
? `Use fill window untilDate="${untilDate}" as the inclusive sender-local through date; do not extend beyond that date without a new approval packet.`
|
|
149
150
|
: `Use the default fill window of ${horizonSendDays} sender-local send days.`,
|
|
150
151
|
"Read get_campaign_refill_state for enough exact candidate campaigns to pick the best per-sender target by recent/future scheduler-owned sends, then recent result evidence, then source health.",
|
|
152
|
+
"Treat current dashboard-active PAUSED campaign-backed sequence campaigns as start-eligible candidates: read refill state before deciding whether to prep, approve, start, or skip.",
|
|
151
153
|
"Fresh reread get_campaign_refill_state immediately before any import, prep, approval, or horizon-fill mutation.",
|
|
154
|
+
"In --yolo, continue through every safe selected sender/campaign action covered by the rendered packet; when no safe in-packet action remains, return concrete continuation options instead of silently stopping.",
|
|
152
155
|
],
|
|
153
156
|
approvalContract: yolo
|
|
154
|
-
? "Auto-accept only the rendered bounded refill packet after fresh reread. Stop if sender set, route, ids, caps, dates, blockers, or side-effect class drift."
|
|
157
|
+
? "Auto-accept only the rendered bounded refill packet after fresh reread. Continue through every safe apply/prep/start action inside that packet, including start_campaign only for exact selected PAUSED campaign-backed sequence refill targets named in the packet. If no safe in-packet action remains, return concrete continuation options and stop. Stop immediately if sender set, route, ids, caps, dates, blockers, or side-effect class drift."
|
|
155
158
|
: hasSenderSelectors
|
|
156
159
|
? "Ask the final Accept/Decline structured approval question before mutation, including workspace, sender scope, campaign table, exact ids, caps/dates, side effects, forbidden actions, and stop condition."
|
|
157
160
|
: "Ask which eligible enrolled senders to refill first, then ask the final Accept/Decline structured approval question before mutation.",
|
|
158
161
|
forbiddenActions: [
|
|
159
|
-
"start_campaign",
|
|
160
|
-
"launch or
|
|
162
|
+
"start_campaign outside an exact selected PAUSED campaign-backed refill packet",
|
|
163
|
+
"manual launch/send or direct sending outside product scheduler side effects",
|
|
161
164
|
"archive or delete cleanup",
|
|
162
165
|
"direct scheduler writes",
|
|
163
166
|
"sender reassignment",
|
package/package.json
CHANGED
|
@@ -24,6 +24,7 @@ allowed-tools:
|
|
|
24
24
|
- mcp__sellable__get_provider_prompt
|
|
25
25
|
- mcp__sellable__get_campaign_message_preparation_status
|
|
26
26
|
- mcp__sellable__start_campaign_message_preparation
|
|
27
|
+
- mcp__sellable__start_campaign
|
|
27
28
|
- mcp__sellable__cancel_campaign_message_preparation
|
|
28
29
|
- mcp__sellable__import_leads
|
|
29
30
|
- mcp__sellable__wait_for_lead_list_ready
|
|
@@ -107,6 +108,13 @@ step using campaign names first, and stop before mutation unless the user has
|
|
|
107
108
|
explicitly approved the exact workspace, campaign/table/source ids, caps/dates,
|
|
108
109
|
approval mode, expected side effects, and stop/rollback condition.
|
|
109
110
|
|
|
111
|
+
If the plain route's managed waterfall targets are stale, for example skipped
|
|
112
|
+
targets show archived/completed shared slots or the returned targets do not cover
|
|
113
|
+
the named sender, immediately run the active route refetch before declaring a
|
|
114
|
+
sender blocked. Current dashboard-active `PAUSED` campaign-backed sequence
|
|
115
|
+
campaigns are start-eligible refill candidates; read refill state before deciding
|
|
116
|
+
whether to prep, approve, start, or skip. Do not treat them as archived inventory.
|
|
117
|
+
|
|
110
118
|
For interactive Codex or Claude Code sessions, that approval must use the
|
|
111
119
|
host-native structured question gate, not plain chat:
|
|
112
120
|
|
|
@@ -130,11 +138,24 @@ the active workspace. Without `--yolo`, if Christian did not name senders, ask
|
|
|
130
138
|
which eligible enrolled senders to refill before choosing campaigns or mutating.
|
|
131
139
|
|
|
132
140
|
`--yolo` only covers the exact sender set, per-sender target campaigns, caps,
|
|
133
|
-
approval mode, and side effects in the packet. It
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
141
|
+
approval mode, and side effects in the packet. It may authorize `start_campaign`
|
|
142
|
+
only for selected `PAUSED`, dashboard-active, campaign-backed sequence refill
|
|
143
|
+
targets when the rendered packet names the exact campaign ids and start side
|
|
144
|
+
effect. Starting a paused campaign can let the product scheduler schedule/send
|
|
145
|
+
approved eligible sequence actions, so include that expected side effect in the
|
|
146
|
+
packet. It does not authorize starting unrelated, archived, completed, draft, or
|
|
147
|
+
direct campaigns, separate launch/send actions, archive or delete cleanup,
|
|
148
|
+
direct scheduler writes, sender reassignment, or campaigns outside those
|
|
149
|
+
selected for the eligible sender set. Stop and re-plan if the route, sender set,
|
|
150
|
+
ids, caps, blockers, or side-effect class drift before mutation.
|
|
151
|
+
|
|
152
|
+
In `--yolo`, continue as far as the rendered packet safely allows. After each
|
|
153
|
+
apply/prep/start result, reread state, settle processing when needed, and move to
|
|
154
|
+
the next selected sender or start-eligible same-packet campaign instead of
|
|
155
|
+
stopping after the first partial result. If no in-packet safe action remains,
|
|
156
|
+
return concrete continuation options with campaign names, exact ids, which option
|
|
157
|
+
is already covered by the current packet, and which option needs a new approval
|
|
158
|
+
packet.
|
|
138
159
|
|
|
139
160
|
In `--yolo`, the default two-day fill horizon is two send days unless
|
|
140
161
|
`--until`/`untilDate` is provided. If an until date is provided, compute bounded
|
|
@@ -15,6 +15,7 @@ allowed-tools:
|
|
|
15
15
|
- mcp__sellable__get_provider_prompt
|
|
16
16
|
- mcp__sellable__get_campaign_message_preparation_status
|
|
17
17
|
- mcp__sellable__start_campaign_message_preparation
|
|
18
|
+
- mcp__sellable__start_campaign
|
|
18
19
|
- mcp__sellable__cancel_campaign_message_preparation
|
|
19
20
|
- mcp__sellable__import_leads
|
|
20
21
|
- mcp__sellable__wait_for_lead_list_ready
|
|
@@ -59,8 +60,16 @@ campaign.
|
|
|
59
60
|
|
|
60
61
|
1. Call `resolve_campaign_fill_route` first. Use `intent:"plain"` for generic
|
|
61
62
|
fill/load language, `intent:"active"` only when the user explicitly narrowed
|
|
62
|
-
to active regular campaigns
|
|
63
|
-
|
|
63
|
+
to active regular campaigns or when the plain route has stale managed
|
|
64
|
+
waterfall evidence, and `intent:"evergreen"` only when the user explicitly
|
|
65
|
+
asked for evergreen or horizon work. The resolver must refetch current
|
|
66
|
+
dashboard-active campaigns as well as managed waterfall state. If the plain
|
|
67
|
+
route returns managed waterfall targets but skipped targets include
|
|
68
|
+
archived/completed waterfall slots, or if the returned targets do not cover a
|
|
69
|
+
named sender, immediately call `resolve_campaign_fill_route({ intent:"active" })`
|
|
70
|
+
and inspect current dashboard-active `ACTIVE` and `PAUSED` campaign-backed
|
|
71
|
+
sequence campaigns before declaring a sender blocked.
|
|
72
|
+
Short form: stale waterfall bindings do not overrule current dashboard-active campaigns.
|
|
64
73
|
2. Resolve sender context before choosing a target. Call `list_senders`; when a
|
|
65
74
|
managed program is involved, also call `get_campaign_waterfall`, and call
|
|
66
75
|
`get_sender_routing` when territory rules may constrain sender eligibility.
|
|
@@ -75,12 +84,18 @@ campaign.
|
|
|
75
84
|
refill-state readbacks and report that inference.
|
|
76
85
|
Short form: `--yolo refill senders` means all eligible enrolled senders; non-yolo asks which enrolled senders.
|
|
77
86
|
3. Read `get_campaign_refill_state` for candidate campaigns from the resolver
|
|
78
|
-
result
|
|
79
|
-
|
|
80
|
-
|
|
87
|
+
result and from the required active-route refetch when managed waterfall
|
|
88
|
+
evidence looks stale. For a broad `active_campaigns` route, inspect enough
|
|
89
|
+
candidates to identify the campaign or small campaign set that most recently
|
|
90
|
+
had scheduler-owned sends for the relevant sender set. Do not stop after the
|
|
81
91
|
first resolver target unless it is also the most recent sender-relevant send
|
|
82
|
-
lane.
|
|
92
|
+
lane. A current dashboard-active `PAUSED` campaign-backed sequence campaign is
|
|
93
|
+
a start-eligible refill candidate, not an archived blocker; read its refill
|
|
94
|
+
state first, then include a bounded `start_campaign` packet only when the
|
|
95
|
+
state proves healthy senders, sequence, source/list, ready/preparable rows,
|
|
96
|
+
and starting is needed for the product scheduler to schedule/send.
|
|
83
97
|
Short form: Do not stop after the first resolver target unless recent-send evidence supports it.
|
|
98
|
+
Short form: `PAUSED` dashboard-active campaigns are start-eligible candidates, not skipped archived inventory.
|
|
84
99
|
In `--yolo` sender-scoped mode, selecting every active campaign is still a
|
|
85
100
|
scope error, but selecting one best refill campaign per eligible sender is
|
|
86
101
|
expected. Pick the single highest-ranked recent-send or best-result campaign
|
|
@@ -102,7 +117,8 @@ campaign.
|
|
|
102
117
|
Use the refill-state response as the current facts receipt:
|
|
103
118
|
|
|
104
119
|
- campaign status/current step, workflow table id, table config type, and public
|
|
105
|
-
type
|
|
120
|
+
type, including whether the route target is dashboard-active `PAUSED` and
|
|
121
|
+
start-eligible;
|
|
106
122
|
- selected source list/provider identity, source id, target prospect gap,
|
|
107
123
|
cursor/inventory state, dedupe/DNC/provider exclusions, good-prospect yield,
|
|
108
124
|
scan/import caps, and proof;
|
|
@@ -118,9 +134,10 @@ Use the refill-state response as the current facts receipt:
|
|
|
118
134
|
- `freshness.stateHash` and exact campaign/table/workspace ids.
|
|
119
135
|
|
|
120
136
|
Empty or unsafe states stop with the blocker: no fillable target, missing or deleted campaign,
|
|
121
|
-
missing table,
|
|
122
|
-
|
|
123
|
-
|
|
137
|
+
missing table, archived/completed campaign, paused campaign without an explicit
|
|
138
|
+
selected-start packet, zero sender capacity, zero source candidates, zero viable
|
|
139
|
+
rows, no approved/preparable rows, active prep job, awaiting scheduler, or
|
|
140
|
+
unsupported direct campaign type.
|
|
124
141
|
|
|
125
142
|
## Regular Campaign Decision
|
|
126
143
|
|
|
@@ -132,6 +149,13 @@ was actually sending most recently for the relevant available senders", not
|
|
|
132
149
|
"fill every eligible target sender from the best enrolled active campaign for
|
|
133
150
|
that sender", not "fill only the first/best campaign globally".
|
|
134
151
|
|
|
152
|
+
When managed waterfall bindings point at archived/completed campaigns but the
|
|
153
|
+
dashboard has current unarchived `ACTIVE` or `PAUSED` campaigns for the same
|
|
154
|
+
sender/shared lane, prefer the current dashboard-active campaign for target
|
|
155
|
+
discovery. The stale waterfall slot remains diagnostic proof, not a reason to
|
|
156
|
+
skip a visible paused shared campaign that can be started through a bounded
|
|
157
|
+
packet.
|
|
158
|
+
|
|
135
159
|
Default `--yolo` horizon is two send days when the user asks to fill, refill,
|
|
136
160
|
load, or max sends without naming a different horizon. Send days are sender-local
|
|
137
161
|
days with configured sending hours; do not treat weekends or other no-send-hour
|
|
@@ -300,7 +324,30 @@ Approval mode:
|
|
|
300
324
|
- default is `approvalMode:"mark_ready"`, not approve;
|
|
301
325
|
- use `approvalMode:"approve"` only when the user explicitly asks to approve
|
|
302
326
|
messages or schedule sends and has approved the exact bounded cohort;
|
|
303
|
-
-
|
|
327
|
+
- `start_campaign` is allowed only as a bounded start/resume step for a
|
|
328
|
+
selected `PAUSED`, dashboard-active, campaign-backed sequence refill target;
|
|
329
|
+
- never launch/start unrelated, archived, completed, draft, direct, or
|
|
330
|
+
non-selected campaigns from refill.
|
|
331
|
+
|
|
332
|
+
Paused campaign start discipline:
|
|
333
|
+
|
|
334
|
+
- `PAUSED`, dashboard-active campaign-backed sequence campaigns are existing
|
|
335
|
+
refill targets, not archived inventory.
|
|
336
|
+
- If the route or active-campaign refetch marks a target as start-eligible, read
|
|
337
|
+
`get_campaign_refill_state` for that campaign/table before deciding whether to
|
|
338
|
+
start, prep, or skip it.
|
|
339
|
+
- If the selected refill target is `PAUSED` and has healthy senders, sequence,
|
|
340
|
+
source/list, and ready/preparable rows or a bounded source/prep packet, the
|
|
341
|
+
final packet may include `start_campaign` when starting is needed for the
|
|
342
|
+
scheduler to schedule/send approved eligible rows.
|
|
343
|
+
- In non-yolo mode, the `Accept` choice must say that starting the paused
|
|
344
|
+
campaign can let the product scheduler schedule/send approved eligible
|
|
345
|
+
sequence actions.
|
|
346
|
+
- In `--yolo`, `start_campaign` is auto-accepted only for the exact selected
|
|
347
|
+
paused campaign ids, sender scope, caps, approval mode, and start side effect
|
|
348
|
+
named in the packet after the final reread.
|
|
349
|
+
- Do not start if the campaign is archived, completed, draft, direct, lacks a
|
|
350
|
+
sequence/senders/source, has no viable row path, or state drifts.
|
|
304
351
|
|
|
305
352
|
Before prep or approval mutation, reread `get_campaign_refill_state` and compare
|
|
306
353
|
`freshness.stateHash`, campaign id, table id, workspace id, source id, and caps.
|
|
@@ -344,15 +391,38 @@ same refill request, do not ask the `Accept` / `Decline` question. Instead:
|
|
|
344
391
|
3. verify the route, workspace id, campaign id, table id, source/action ids,
|
|
345
392
|
caps/dates, approval mode, blockers, and side-effect class still match the
|
|
346
393
|
packet;
|
|
347
|
-
4. execute only the exact packet
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
394
|
+
4. execute only the exact packet;
|
|
395
|
+
5. after each terminal apply/prep/start result, reread state, settle processing
|
|
396
|
+
when needed, and continue with the next smallest safe action inside the same
|
|
397
|
+
bounded packet until every selected sender is loaded/awaiting scheduler,
|
|
398
|
+
scheduled, or blocked by evidence.
|
|
399
|
+
|
|
400
|
+
In `--yolo`, do not stop after the first selected campaign if the request was
|
|
401
|
+
sender-scoped and more selected senders or same-packet start-eligible campaigns
|
|
402
|
+
remain. If the first candidate is duplicate-only, already loaded, awaiting
|
|
403
|
+
scheduler, source-exhausted, or otherwise blocked, continue to the next
|
|
404
|
+
same-sender candidate that was already in the rendered packet and still matches
|
|
405
|
+
the fresh route/refill-state evidence. If no in-packet safe action remains, stop
|
|
406
|
+
before mutation and return continuation options instead of guessing.
|
|
407
|
+
|
|
408
|
+
Continuation options must be campaign-name-first and concrete. For each blocked
|
|
409
|
+
sender/campaign, list the next viable options with exact ids and the approval
|
|
410
|
+
boundary, for example: start an already selected start-eligible paused campaign,
|
|
411
|
+
repair stale waterfall bindings, replenish the current source, expand Signal
|
|
412
|
+
Discovery post selection, use the next same-sender campaign, or run evergreen
|
|
413
|
+
setup/repair. Mark which options are covered by the current `--yolo` packet and
|
|
414
|
+
which require a new approval packet.
|
|
415
|
+
Short form: in `--yolo`, go as far as the packet safely allows, then give exact continuation options.
|
|
416
|
+
|
|
417
|
+
`--yolo` authorizes `start_campaign` only for selected `PAUSED` refill targets
|
|
418
|
+
named in the exact packet. It never authorizes starting unrelated, archived,
|
|
419
|
+
completed, draft, or direct campaigns, separate launch/send actions,
|
|
420
|
+
archive/delete cleanup, raw scheduler writes, sender reassignment, extra senders
|
|
421
|
+
beyond the eligible sender set, or higher caps than the packet named. In
|
|
422
|
+
sender-scoped `--yolo`, a bounded packet containing all eligible enrolled
|
|
423
|
+
senders and at most one best campaign per sender is covered; arbitrary expanded
|
|
424
|
+
campaign sets are not. If any state or scope drifts, stop and re-plan instead of
|
|
425
|
+
auto-accepting the changed action.
|
|
356
426
|
Short form: all eligible enrolled senders are covered by sender-scoped `--yolo`; arbitrary expanded campaign sets are not.
|
|
357
427
|
Short form: direct scheduler writes are not covered by `--yolo`.
|
|
358
428
|
Short form: stop and re-plan instead of auto-accepting the changed action.
|
|
@@ -413,7 +483,9 @@ the current source or ask for more research instead of walking the ladder.
|
|
|
413
483
|
|
|
414
484
|
## Hard Safety Rules
|
|
415
485
|
|
|
416
|
-
- Never call start
|
|
486
|
+
- Never call launch/start tools except `start_campaign` for an exact selected
|
|
487
|
+
`PAUSED`, dashboard-active, campaign-backed sequence refill target in the
|
|
488
|
+
rendered packet.
|
|
417
489
|
- Never raw-write `scheduledFor`, `scheduledAt`, scheduled status, or sender
|
|
418
490
|
assignment fields.
|
|
419
491
|
- Never expose internal direct campaign types as an operator refill path.
|
|
@@ -425,8 +497,8 @@ the current source or ask for more research instead of walking the ladder.
|
|
|
425
497
|
- In interactive Codex or Claude Code, that explicit approval must be collected
|
|
426
498
|
through the host-native `Accept` / `Decline` question gate.
|
|
427
499
|
- `--yolo` in the current refill request is explicit auto-accept for the
|
|
428
|
-
rendered bounded refill packet only; it does not loosen the
|
|
429
|
-
scheduler-write, archive/delete, or drift rules above.
|
|
500
|
+
rendered bounded refill packet only; it does not loosen the unrelated-campaign
|
|
501
|
+
start/send, scheduler-write, archive/delete, or drift rules above.
|
|
430
502
|
|
|
431
503
|
## Report
|
|
432
504
|
|
|
@@ -440,6 +512,10 @@ Report in campaign-name-first language:
|
|
|
440
512
|
create;
|
|
441
513
|
- source state, blockers, exact next primitive, approval required, and the
|
|
442
514
|
freshness hash used.
|
|
515
|
+
- for `--yolo`, how far the run continued automatically, which selected senders
|
|
516
|
+
are loaded/scheduled/awaiting scheduler, and the exact continuation options for
|
|
517
|
+
any sender/campaign that remains blocked.
|
|
443
518
|
|
|
444
519
|
Keep ids visible but secondary: show them under "Exact target" or "Proof", not
|
|
445
|
-
as the main decision text. Say explicitly
|
|
520
|
+
as the main decision text. Say explicitly whether a selected paused campaign was
|
|
521
|
+
started; otherwise say nothing was started and nothing was sent.
|