@sellable/mcp 0.1.468 → 0.1.470

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.
@@ -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"; 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, post the full sender/campaign/action approval packet in normal chat as Markdown first, then ask request_user_input/AskUserQuestion with exactly Accept and Decline and a compact body that refers back to the posted packet; do not duplicate the campaign table or full operator packet inside the structured question. The chat packet 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 projected coverage (actual sent plus 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 actual sent coverage, future scheduled rows, 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. Maintain a horizon saturation ledger per selected sender with selected send days, gross capacity, actual sent counts, future scheduler-owned scheduled counts, projected coverage, ready-to-schedule buffer, remaining projected gap, paid-InMail threshold feasibility, and the next MCP primitive. 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, recompute the horizon saturation ledger, and keep going until projected coverage (sent + scheduled) fills the requested horizon or a concrete blocker/timeout is proven. Ready-to-schedule rows are buffer, not completion; if ready covers the projected gap but scheduled cells do not, run a bounded scheduler-settle loop and report awaiting_scheduler_after_ready_buffer as not complete when timeout is reached. Paid-InMail threshold changes and connection-campaign creation are explicit continuation options, never --yolo side effects. 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 and paid-InMail threshold 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. Before prep, inspect get_campaign_refill_state.preparationFrontier. If hasLaterPreparedIsland:true or earliestUnpreparedRow exists before later successful enrichment, use rowSelector:{type:"needsEnrichment"} with columnRole:"enrich" in table-position order or start_campaign_message_preparation adaptive defaults; do not use the UI Jump anchor or needsGeneratedMessage as the refill cursor. 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 inspect reviewBatch only as diagnostics unless the approved packet explicitly prioritizes the just-copied split and earlier needsEnrichment rows are exhausted, dependency-blocked, or excluded. For approval diagnostics use rowSelector:{type:"needsApproval"} after current generated messages exist; mutating Approved cells still requires approvalMode:approve and exact bounded approval. 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 contribute to projected coverage, and never call them complete unless a final re-read proves projected coverage fills the requested horizon. 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 projected coverage does not fill the horizon, report prepared/approved/ready - awaiting scheduler instead of success. Do not call start_campaign as part of fill/schedule horizon. 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.`,
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, post the full sender/campaign/action approval packet in normal chat as Markdown first, then ask request_user_input/AskUserQuestion with exactly Accept and Decline and a compact body that refers back to the posted packet; do not duplicate the campaign table or full operator packet inside the structured question. The chat packet 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 target is the scheduler-forward 48-hour target window: sender-local send days whose configured sending windows overlap the rolling target window, 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 projected coverage (actual sent plus 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 actual sent coverage, future scheduled rows, 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. Maintain a target-window saturation ledger per selected sender with selected send days, gross capacity, actual sent counts, future scheduler-owned scheduled counts, projected coverage, ready-to-schedule buffer, remaining projected gap, paid-InMail threshold feasibility, and the next MCP primitive. 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, recompute the target-window saturation ledger, and keep going until projected coverage (sent + scheduled) fills the scheduler-forward target window or a concrete non-scheduler blocker is proven. Ready-to-schedule rows are buffer, not completion; if ready covers the projected gap but scheduled cells do not, report loaded, awaiting scheduler and run a persistent read-only scheduler wait/reread loop and keep the run open while awaiting_scheduler_after_ready_buffer is the only remaining state. Paid-InMail threshold changes and connection-campaign creation are explicit continuation options, never --yolo side effects. When no safe in-packet action remains return concrete continuation options with campaign names, exact ids, and which options require a new approval packet; do not return final completion for scheduler wait unless Christian explicitly asks for status or stops the run. 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 and paid-InMail threshold 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. Before prep, inspect get_campaign_refill_state.preparationFrontier. If hasLaterPreparedIsland:true or earliestUnpreparedRow exists before later successful enrichment, use rowSelector:{type:"needsEnrichment"} with columnRole:"enrich" in table-position order or start_campaign_message_preparation adaptive defaults; do not use the UI Jump anchor or needsGeneratedMessage as the refill cursor. 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 inspect reviewBatch only as diagnostics unless the approved packet explicitly prioritizes the just-copied split and earlier needsEnrichment rows are exhausted, dependency-blocked, or excluded. For approval diagnostics use rowSelector:{type:"needsApproval"} after current generated messages exist; mutating Approved cells still requires approvalMode:approve and exact bounded approval. 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 contribute to projected coverage, and never call them complete unless a final re-read proves projected coverage fills the scheduler-forward target window. 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 projected coverage does not fill the horizon, keep polling when ready buffer covers the gap and report only interim prepared/approved/ready - awaiting scheduler status if Christian asks. Do not call start_campaign as part of fill/schedule horizon. 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
  }
@@ -91,9 +91,11 @@ export declare function refillSendsCommand(input?: RefillSendsCommandInput): {
91
91
  untilDate: string;
92
92
  description: string;
93
93
  horizonSendDays?: undefined;
94
+ horizonHours?: undefined;
94
95
  } | {
95
96
  mode: string;
96
97
  horizonSendDays: number | null;
98
+ horizonHours: number | null;
97
99
  description: string;
98
100
  untilDate?: undefined;
99
101
  };
@@ -1,4 +1,4 @@
1
- const DEFAULT_HORIZON_SEND_DAYS = 2;
1
+ const DEFAULT_SCHEDULER_FORWARD_HOURS = 48;
2
2
  function normalizeStrings(values) {
3
3
  if (!Array.isArray(values))
4
4
  return [];
@@ -9,9 +9,10 @@ function normalizeStrings(values) {
9
9
  ];
10
10
  }
11
11
  function normalizeHorizonSendDays(value) {
12
- if (typeof value !== "number" || !Number.isFinite(value)) {
13
- return DEFAULT_HORIZON_SEND_DAYS;
14
- }
12
+ if (value === undefined || value === null)
13
+ return null;
14
+ if (typeof value !== "number" || !Number.isFinite(value))
15
+ return null;
15
16
  return Math.max(1, Math.min(7, Math.floor(value)));
16
17
  }
17
18
  function normalizeUntilDate(value) {
@@ -63,12 +64,12 @@ export const refillSendsToolDefinitions = [
63
64
  type: "number",
64
65
  minimum: 1,
65
66
  maximum: 7,
66
- description: "Number of sender-local send days to fill. Defaults to 2 when untilDate is not provided.",
67
+ description: "Compatibility override for an explicit sender-local send-day horizon. Omit for the default scheduler-forward 48-hour target window.",
67
68
  },
68
69
  untilDate: {
69
70
  type: "string",
70
71
  pattern: "^\\d{4}-\\d{2}-\\d{2}$",
71
- description: "Optional sender-local YYYY-MM-DD date to fill through, inclusive. Overrides the default two send-day horizon.",
72
+ description: "Optional sender-local YYYY-MM-DD date to fill through, inclusive. Overrides the default scheduler-forward 48-hour target window.",
72
73
  },
73
74
  campaignId: {
74
75
  type: "string",
@@ -127,9 +128,14 @@ export function refillSendsCommand(input = {}) {
127
128
  description: "Fill through this sender-local date inclusive, skipping no-send days and never extending beyond the date without a new packet.",
128
129
  }
129
130
  : {
130
- mode: "horizon_send_days",
131
+ mode: horizonSendDays === null
132
+ ? "scheduler_forward_48h"
133
+ : "horizon_send_days",
131
134
  horizonSendDays,
132
- description: "Fill the default bounded horizon by sender-local send days.",
135
+ horizonHours: horizonSendDays === null ? DEFAULT_SCHEDULER_FORWARD_HOURS : null,
136
+ description: horizonSendDays === null
137
+ ? "Fill the default scheduler-forward 48-hour target window."
138
+ : "Fill the explicit compatibility horizon by sender-local send days.",
133
139
  },
134
140
  approvalMode,
135
141
  campaignId: input.campaignId ?? null,
@@ -142,34 +148,39 @@ export function refillSendsCommand(input = {}) {
142
148
  },
143
149
  firstOperationalSteps: [
144
150
  'Load get_subskill_prompt({ subskillName: "refill-sends-workflow" }) before any product operation.',
151
+ "A skill cannot create or invoke /goal by itself. If this refill is already running inside an active Codex goal, keep that goal open until every selected sender lane is horizon-filled by projected coverage (sent + scheduled), Christian explicitly stops/statuses the run, or a concrete non-scheduler blocker appears.",
145
152
  `Call get_refill_target_plan({ intent: "${intent}"${input.campaignId ? `, campaignId: "${input.campaignId}"` : ""}${input.tableId ? `, tableId: "${input.tableId}"` : ""}${senderIds.length > 0
146
153
  ? `, senderIds: ${JSON.stringify(senderIds)}`
147
154
  : ""}${senderNames.length > 0
148
155
  ? `, senderNames: ${JSON.stringify(senderNames)}`
149
156
  : ""}${senders.length > 0 ? `, senders: ${JSON.stringify(senders)}` : ""}${untilDate
150
157
  ? `, untilDate: "${untilDate}"`
151
- : `, horizonSendDays: ${horizonSendDays}`}, approvalMode: "${approvalMode}" }) before any import, prep, approval, start, or schedule-affecting action.`,
158
+ : horizonSendDays === null
159
+ ? ""
160
+ : `, horizonSendDays: ${horizonSendDays}`}, approvalMode: "${approvalMode}" }) before any import, prep, approval, start, or schedule-affecting action.`,
152
161
  "If get_refill_target_plan returns status complete, report eligible sender ledger, gross target, selected days, sent count, scheduled count, projected count, campaign ids, targetShapeRevision, and no-op proof without asking for approval.",
153
162
  "Refill target lanes are only connection invites (send_invite) or paid InMails (send_inmail_closed). Do not count send_dm or send_inmail_open as horizon target capacity; they may exist in sequences, but the planner must pick the refill lane from the most recent active campaign-backed send evidence for each sender.",
154
- "If remainingReadyOrProjectedGap is 0 but remainingProjectedGap is positive, run only a bounded read-only scheduler settle/reread loop; do not ask for prep/import/approval.",
163
+ "If remainingReadyOrProjectedGap is 0 but remainingProjectedGap is positive, run only a persistent read-only scheduler wait/reread loop; do not ask for prep/import/approval and do not close out while scheduler pickup is the only remaining state.",
155
164
  `Resolve route with resolve_campaign_fill_route({ intent: "${intent}"${input.campaignId ? `, campaignId: "${input.campaignId}"` : ""}${input.tableId ? `, tableId: "${input.tableId}"` : ""} }).`,
156
165
  '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.',
157
166
  "Call list_senders and get_sender_routing, then resolve sender selectors against active enrolled campaign-backed sequence senders.",
158
167
  untilDate
159
168
  ? `Use fill window untilDate="${untilDate}" as the inclusive sender-local through date; do not extend beyond that date without a new approval packet.`
160
- : `Use the default fill window of ${horizonSendDays} sender-local send days.`,
169
+ : horizonSendDays === null
170
+ ? "Use the default scheduler-forward 48-hour target window from get_refill_target_plan; do not reinterpret it as two calendar days from today."
171
+ : `Use the explicit compatibility fill window of ${horizonSendDays} sender-local send days.`,
161
172
  "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.",
162
173
  "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.",
163
174
  "Fresh reread get_campaign_refill_state immediately before any import, prep, approval, or horizon-fill mutation.",
164
- "Maintain a target-led horizon saturation ledger per selected sender from get_refill_target_plan: selected days, gross capacity, actual sent counts, future scheduler-owned scheduled counts, projected counts, ready-to-schedule buffer, remaining projected gap, paid InMail threshold feasibility, targetShapeRevision, stateRevision, and next MCP primitive.",
175
+ "Maintain a target-window saturation ledger per selected sender from get_refill_target_plan: selected days, gross capacity, actual sent counts, future scheduler-owned scheduled counts, projected counts, ready-to-schedule buffer, remaining projected gap, paid InMail threshold feasibility, targetShapeRevision, stateRevision, and next MCP primitive.",
165
176
  "If paid InMail feasibility is below threshold, stale, or missing, report the exact sender/campaign/table/column threshold action or connection fallback; --yolo must not lower paid InMail thresholds or create campaigns.",
166
177
  "In --yolo or after one Accept, continue through every safe selected sender/campaign action covered by the rendered target packet; sent/scheduled-count progress changes stateRevision and should continue while targetShapeRevision is stable.",
167
- "Do not complete a fill/schedule request until a final get_refill_target_plan or refill-state reread proves projected coverage (sent + scheduled) fills the horizon, or report a concrete blocker such as awaiting_scheduler_after_ready_buffer or paid_inmail_below_threshold.",
178
+ "Do not complete a fill/schedule request until a final get_refill_target_plan or refill-state reread proves projected coverage (sent + scheduled) fills the scheduler-forward target window. Treat awaiting_scheduler_after_ready_buffer as loaded, awaiting scheduler when ready buffer covers the gap; do not import/prep more rows in that state, and keep polling unless Christian stops/statuses the run or a concrete non-scheduler blocker such as paid_inmail_below_threshold appears.",
168
179
  ],
169
180
  approvalContract: yolo
170
- ? "Auto-accept only the rendered bounded refill target packet after get_refill_target_plan and 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. After each action, rerun get_refill_target_plan; keep going while targetShapeRevision is stable and projected coverage (sent + scheduled) progresses toward the target, even though stateRevision changes. Ready-to-schedule rows are buffer, not completion. If ready buffer covers the projected gap, use only read-only scheduler settle/reread. Stop immediately if targetShapeRevision changes because sender set, route, ids, caps, dates, blockers, action class, paid InMail threshold feasibility, or side-effect class drifts. --yolo does not authorize lowering paid InMail thresholds or creating connection campaigns."
181
+ ? "Auto-accept only the rendered bounded refill target packet after get_refill_target_plan and 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. After each action, rerun get_refill_target_plan; keep going while targetShapeRevision is stable and projected coverage (sent + scheduled) progresses toward the target, even though stateRevision changes. Ready-to-schedule rows are buffer, not completion. If ready buffer covers the projected gap, use only persistent read-only scheduler wait/reread and keep the run open until projected coverage fills or Christian stops/statuses it. Stop immediately if targetShapeRevision changes because sender set, route, ids, caps, dates, blockers, action class, paid InMail threshold feasibility, or side-effect class drifts. --yolo does not authorize lowering paid InMail thresholds or creating connection campaigns."
171
182
  : hasSenderSelectors
172
- ? "Before mutation, post the full bounded refill packet in normal chat as Markdown, including workspace, sender scope, campaign table, exact ids, caps/dates, gross target, sent count, scheduled count, projected count, ready buffer, remaining projected gap, paid InMail threshold feasibility, targetShapeRevision/stateRevision, side effects, forbidden actions, and stop condition. Then ask the final Accept/Decline structured approval question with a compact body that refers back to the posted packet instead of duplicating it. Only ask when get_refill_target_plan reports a positive remaining projected/ready gap. If target is complete by projected coverage, no-op without approval. If ready buffer covers the projected gap, run only read-only scheduler settle/reread. Threshold changes and campaign creation need separate explicit approval."
183
+ ? "Before mutation, post the full bounded refill packet in normal chat as Markdown, including workspace, sender scope, campaign table, exact ids, caps/dates, gross target, sent count, scheduled count, projected count, ready buffer, remaining projected gap, paid InMail threshold feasibility, targetShapeRevision/stateRevision, side effects, forbidden actions, and stop condition. Then ask the final Accept/Decline structured approval question with a compact body that refers back to the posted packet instead of duplicating it. Only ask when get_refill_target_plan reports a positive remaining projected/ready gap. If target is complete by projected coverage, no-op without approval. If ready buffer covers the projected gap, run only persistent read-only scheduler wait/reread and keep the run open until projected coverage fills or Christian stops/statuses it. Threshold changes and campaign creation need separate explicit approval."
173
184
  : "Ask which eligible enrolled senders to refill first, then, before mutation, post the full bounded refill packet in normal chat as Markdown and ask the final Accept/Decline structured approval question with a compact body that refers back to the posted packet.",
174
185
  forbiddenActions: [
175
186
  "start_campaign outside an exact selected PAUSED campaign-backed refill packet",
@@ -89,7 +89,7 @@ function sanitizeActionCandidates(candidates, selectedKeys, status, remainingRea
89
89
  !filtered.some((item) => item.type === "wait_for_scheduler")) {
90
90
  filtered.push({
91
91
  type: "wait_for_scheduler",
92
- reason: "ready buffer covers the projected target gap but scheduledFor coverage is still short",
92
+ reason: "loaded, awaiting scheduler: ready buffer covers the projected target gap but scheduledFor coverage is still short",
93
93
  });
94
94
  }
95
95
  return filtered;
@@ -232,7 +232,7 @@ function sanitizeRefillTargetPlanResult(result) {
232
232
  export const refillTargetPlanToolDefinitions = [
233
233
  {
234
234
  name: "get_refill_target_plan",
235
- description: "read-only refill target planner to call before any refill mutation. It identifies eligible senders and infers one implicit refill lane per sender: connection invites or paid InMails, chosen from future scheduled, recent scheduled, and ready-to-schedule evidence in active campaign-backed sequence campaigns before falling back to campaign sequences. DMs and open-profile InMails are follow-up sequence actions, not refill target lanes. The planner computes selected sender-local days, gross target, actual sent coverage, scheduler-owned scheduled coverage, projected coverage (sent + scheduled), ready buffer, remaining projected gap, paid InMail credit/threshold feasibility, bounded action candidates, and targetRevision drift proof. This tool does not create rows, import leads, prepare messages, approve messages, does not schedule sends, start campaigns, lower paid InMail thresholds, create campaigns, launch, spend InMail credits, or write scheduler fields. Complete projected targets no-op without approval; incomplete targets must be followed by a bounded approval packet.",
235
+ description: "read-only refill target planner to call before any refill mutation. It identifies eligible senders and infers one implicit refill lane per sender: connection invites or paid InMails, chosen from future scheduled, recent scheduled, and ready-to-schedule evidence in active campaign-backed sequence campaigns before falling back to campaign sequences. DMs and open-profile InMails are follow-up sequence actions, not refill target lanes. By default the planner computes the scheduler-forward 48-hour target window, selected sender-local days whose sending windows overlap that window, gross target, actual sent coverage, scheduler-owned scheduled coverage, projected coverage (sent + scheduled), ready buffer, remaining projected gap, paid InMail credit/threshold feasibility, bounded action candidates, and targetRevision drift proof. This tool does not create rows, import leads, prepare messages, approve messages, does not schedule sends, start campaigns, lower paid InMail thresholds, create campaigns, launch, spend InMail credits, or write scheduler fields. Complete projected targets no-op without approval; loaded, awaiting scheduler targets use read-only wait/reread until projected coverage fills.",
236
236
  inputSchema: {
237
237
  type: "object",
238
238
  properties: {
@@ -245,12 +245,12 @@ export const refillTargetPlanToolDefinitions = [
245
245
  type: "number",
246
246
  minimum: 1,
247
247
  maximum: 7,
248
- description: "Calendar-day refill horizon to inspect from the sender-local current day. Defaults to 2 when untilDate is not provided; no-send days contribute zero target.",
248
+ description: "Compatibility override for explicit sender-local send-day horizon planning. Omit for the default scheduler-forward 48-hour target window; no-send days contribute zero target.",
249
249
  },
250
250
  untilDate: {
251
251
  type: "string",
252
252
  pattern: "^\\d{4}-\\d{2}-\\d{2}$",
253
- description: "Optional sender-local YYYY-MM-DD date to inspect through, inclusive.",
253
+ description: "Optional sender-local YYYY-MM-DD date to inspect through, inclusive. Overrides the default scheduler-forward 48-hour target window.",
254
254
  },
255
255
  campaignId: {
256
256
  type: "string",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sellable/mcp",
3
- "version": "0.1.468",
3
+ "version": "0.1.470",
4
4
  "type": "module",
5
5
  "description": "Sellable MCP server for Claude Code and Codex campaign workflows",
6
6
  "main": "dist/index.js",
@@ -138,10 +138,10 @@ explicit user selection; it is never the default response to plain fill. When
138
138
  choosing among active targets, use refill-state scheduled-count evidence to
139
139
  continue the campaign that most recently had scheduler-owned sends for the
140
140
  relevant sender set; do not treat every active campaign as a refill candidate.
141
- In `--yolo` fill/refill mode, default to one best recent-send campaign and a
142
- two-send-day horizon: subtract future scheduler-owned scheduled sends and
143
- ready-to-schedule rows from healthy sender daily capacity, then prepare only
144
- that bounded gap.
141
+ In `--yolo` fill/refill mode, default to one best recent-send campaign and the
142
+ scheduler-forward 48-hour target window: subtract future scheduler-owned
143
+ scheduled sends and ready-to-schedule rows from healthy sender daily capacity,
144
+ then prepare only that bounded gap.
145
145
  When more leads are needed, the refill workflow must recommend same-campaign
146
146
  source-ladder replenishment first; do not create warm-post-engager side
147
147
  campaigns, on-demand campaigns, or unrelated campaigns. If same-source copy hits
@@ -70,7 +70,7 @@ Accepted invocation flags in the same user request:
70
70
  - `--sender <name-or-id>`: scope to a specific sender; repeat for multiple
71
71
  senders.
72
72
  - `--until <YYYY-MM-DD>`: fill through that sender-local date, inclusive,
73
- instead of the default two send-day horizon.
73
+ instead of the default scheduler-forward 48-hour target window.
74
74
  - `senderIds: <id>, <id>` or `senderNames: <name>, <name>`: explicit selector
75
75
  alternatives when the host preserves natural-language arguments better than
76
76
  shell-style flags.
@@ -97,6 +97,14 @@ senders" as sender-scoped requests. The target set is senders enrolled in active
97
97
  campaign-backed sequence campaigns, not the first active campaign returned by a
98
98
  resolver.
99
99
 
100
+ Goal-mode continuation: a skill cannot create or invoke `/goal` by itself. When
101
+ this command is already running inside an active Codex goal, keep that goal open
102
+ until every selected sender lane is filled by projected coverage
103
+ (`sent + scheduled`) for the scheduler-forward target window, Christian
104
+ explicitly stops/statuses the run, or a concrete non-scheduler blocker appears.
105
+ Do not call the goal complete or blocked only because the current state is
106
+ `awaiting_scheduler_after_ready_buffer`; treat it as loaded, awaiting scheduler.
107
+
100
108
  Load the internal workflow prompt before taking any operational step:
101
109
 
102
110
  ```text
@@ -131,9 +139,13 @@ Short form: trust the target plan's inferred lane only when it is a
131
139
  connection-invite or paid-InMail refill lane.
132
140
  If the target plan is complete by projected coverage, report that the selected
133
141
  target is already filled and no-op without asking for approval. If the ready
134
- buffer covers the projected gap but scheduled coverage is still short, run only
135
- a bounded read-only scheduler settle/reread loop and report
136
- `awaiting_scheduler_after_ready_buffer` if it does not settle.
142
+ buffer covers the projected gap but scheduled coverage is still short, keep the
143
+ run open in a persistent read-only scheduler wait loop. Poll
144
+ `get_refill_target_plan` every 60-120 seconds, or on the host's next continuation
145
+ interval, until projected coverage fills the target, a concrete non-scheduler
146
+ blocker appears, or Christian explicitly asks to stop or only receive a status
147
+ report. Treat `awaiting_scheduler_after_ready_buffer` as an in-progress wait
148
+ state, not a close-out condition.
137
149
  If paid InMail credit facts are stale or missing and the target plan returns a
138
150
  `refresh_paid_inmail_credits` action candidate, include the exact sender id,
139
151
  campaign/table/column proof, expected sender-credit-cache writes, and rerun plan
@@ -199,30 +211,33 @@ return concrete continuation options with campaign names, exact ids, which optio
199
211
  is already covered by the current packet, and which option needs a new approval
200
212
  packet.
201
213
 
202
- For `--yolo` fill/schedule requests, completion means projected horizon
203
- saturation (`sent + scheduled`), not merely prepared/approved/ready rows.
204
- Maintain a horizon saturation ledger per selected sender: selected send days,
205
- gross capacity, actual sent cells, future scheduler-owned scheduled cells with
206
- non-null `scheduledFor`, projected count, ready-to-schedule buffer, remaining
207
- projected gap, paid-InMail feasibility, `targetShapeRevision`,
208
- `stateRevision`, and the next MCP primitive that can reduce the gap. After every
209
- apply/prep/start result, wait for processing, reread the target plan/refill
210
- state, recompute the ledger, then keep applying safe bounded actions until
211
- projected coverage fills the horizon or a concrete blocker/timeout is proven.
214
+ For `--yolo` fill/schedule requests, completion means projected saturation
215
+ (`sent + scheduled`) for the scheduler-forward target window, not merely
216
+ prepared/approved/ready rows. Maintain a target-window saturation ledger per
217
+ selected sender: selected send days, gross capacity, actual sent cells, future
218
+ scheduler-owned scheduled cells with non-null `scheduledFor`, projected count,
219
+ ready-to-schedule buffer, remaining projected gap, paid-InMail feasibility,
220
+ `targetShapeRevision`, `stateRevision`, and the next MCP primitive that can
221
+ reduce the gap. After every apply/prep/start result, wait for processing, reread
222
+ the target plan/refill state, recompute the ledger, then keep applying safe
223
+ bounded actions until projected coverage fills the target window or a concrete
224
+ non-scheduler blocker is proven.
212
225
  If ready rows cover the projected gap but the scheduler has not picked them up
213
- yet, run a bounded scheduler settle loop and report
214
- `awaiting_scheduler_after_ready_buffer` as not complete when the timeout is
215
- reached.
216
-
217
- In `--yolo`, the default two-day fill horizon is two send days unless
218
- `--until`/`untilDate` is provided. If an until date is provided, compute bounded
219
- gaps through that sender-local date inclusive, skipping no-send days and never
220
- extending beyond that date without a new packet. For each target sender, compute
221
- the bounded gap from that sender's healthy daily capacity, existing future
222
- scheduler-owned scheduled sends, and rows already ready to schedule across
223
- active campaigns enrolled with that sender. Then pick the best same-sender
224
- campaign to fill the gap: prefer recent/future scheduler-owned sends for that
225
- sender, then strongest recent result evidence, then source health. Do not stop
226
+ yet, report loaded, awaiting scheduler and run the persistent read-only
227
+ scheduler wait loop. Do not finish the refill goal, mark it complete, or mark it
228
+ blocked only because it is still `awaiting_scheduler_after_ready_buffer`; keep
229
+ waiting unless Christian stops the run or the host cannot continue.
230
+
231
+ In `--yolo`, the default fill target is the scheduler-forward 48-hour window
232
+ unless `--until`/`untilDate` or an explicit compatibility `horizonSendDays` is
233
+ provided. If an until date is provided, compute bounded gaps through that
234
+ sender-local date inclusive, skipping no-send days and never extending beyond
235
+ that date without a new packet. For each target sender, compute the bounded gap
236
+ from that sender's healthy daily capacity, existing future scheduler-owned
237
+ scheduled sends, and rows already ready to schedule across active campaigns
238
+ enrolled with that sender. Then pick the best same-sender campaign to fill the
239
+ gap: prefer recent/future scheduler-owned sends for that sender, then strongest
240
+ recent result evidence, then source health. Do not stop
226
241
  after filling only one sender when the request was sender-scoped. If a
227
242
  same-source copy hits the campaign-table row cap, split the current source into
228
243
  a bounded LinkedIn profile source list, confirm only that smaller list into the
@@ -60,6 +60,13 @@ senders", and "load everyone up". A sender-scoped request targets senders
60
60
  enrolled in active campaign-backed sequence campaigns, not one arbitrary active
61
61
  campaign.
62
62
 
63
+ Goal-mode continuation: a skill cannot create or invoke `/goal` by itself. When
64
+ this workflow is already running inside an active Codex goal, keep that goal
65
+ open until every selected sender lane is horizon-filled by projected coverage
66
+ (`sent + scheduled`), Christian explicitly stops/statuses the run, or a concrete
67
+ non-scheduler blocker appears. `awaiting_scheduler_after_ready_buffer` is an
68
+ in-progress wait state, not a reason to mark the goal complete or blocked.
69
+
63
70
  1. Call `get_refill_target_plan` first. This read-only target plan is the
64
71
  canonical opening receipt: eligible senders, selected sender-local days,
65
72
  gross target, inferred per-sender send lane/action selections, actual sent
@@ -85,9 +92,13 @@ campaign.
85
92
  scheduled count, projected count, campaign ids, and no-op proof without
86
93
  asking for approval or mutating.
87
94
  If `remainingReadyOrProjectedGap:0` but `remainingProjectedGap>0`, run only a
88
- bounded read-only scheduler settle/reread loop; do not ask for
89
- prep/import/approval. If the scheduler still does not fill, report
90
- `awaiting_scheduler_after_ready_buffer`.
95
+ persistent read-only scheduler wait/reread loop; do not ask for
96
+ prep/import/approval. Poll `get_refill_target_plan` every 60-120 seconds, or
97
+ on the host's next continuation interval, until projected coverage fills,
98
+ a concrete non-scheduler blocker appears, or Christian explicitly asks to
99
+ stop or only receive a status report. Treat
100
+ `awaiting_scheduler_after_ready_buffer` as an in-progress wait state, not a
101
+ close-out condition.
91
102
  If paid InMail credit facts are stale or missing and the target plan returns a
92
103
  `refresh_paid_inmail_credits` action candidate, include the exact sender id,
93
104
  campaign/table/column proof, expected sender-credit-cache write, and rerun plan
@@ -160,8 +171,8 @@ Use the refill-state response as the current facts receipt:
160
171
  cursor/inventory state, dedupe/DNC/provider exclusions, good-prospect yield,
161
172
  scan/import caps, and proof;
162
173
  - sender ids, healthy senders, disconnected senders, and daily capacity;
163
- - horizon saturation ledger per target sender: sender-local send days in scope,
164
- gross horizon capacity, actual sent coverage, future scheduler-owned
174
+ - target-window saturation ledger per target sender: sender-local send days in
175
+ scope, gross target capacity, actual sent coverage, future scheduler-owned
165
176
  scheduled counts in that window, projected coverage (`sent + scheduled`),
166
177
  ready-to-schedule buffer, remaining projected gap, paid-InMail
167
178
  credit/threshold feasibility, `targetShapeRevision`, `stateRevision`, and the
@@ -201,25 +212,27 @@ discovery. The stale waterfall slot remains diagnostic proof, not a reason to
201
212
  skip a visible paused shared campaign that can be started through a bounded
202
213
  packet.
203
214
 
204
- Default `--yolo` horizon is two send days when the user asks to fill, refill,
205
- load, or max sends without naming a different horizon. Send days are sender-local
206
- days with configured sending hours; do not treat weekends or other no-send-hour
207
- days as fillable capacity. If the user explicitly names a no-send calendar date,
208
- report that date as unschedulable and continue only for the next valid send day
209
- when the packet says "send days" or the user asked to max/refill senders broadly.
215
+ Default `--yolo` target is the scheduler-forward 48-hour window when the user
216
+ asks to fill, refill, load, or max sends without naming a different horizon.
217
+ The planner selects sender-local days whose configured sending windows overlap
218
+ that rolling target window; do not treat weekends or other no-send-hour days as
219
+ fillable capacity. If the user explicitly names a no-send calendar date, report
220
+ that date as unschedulable and continue only for the next valid send day when
221
+ the packet says "send days" or the user asked to max/refill senders broadly.
210
222
 
211
223
  For campaign-scoped requests, compute the target from the selected campaign's
212
- healthy sender daily capacity for the next two send days, minus already
213
- scheduler-owned future scheduled sends for those days and minus rows already
214
- ready to schedule. For sender-scoped requests, compute that gap per target sender
215
- across all active enrolled campaigns for that sender; count future scheduled
216
- cells and ready-to-schedule cells in any active enrolled campaign toward that
217
- sender's gap before preparing more rows. If ready/scheduled rows already cover a
218
- sender's gap, do not add rows or prep for that sender; report that the sender is
219
- loaded and awaiting the scheduler. If the gap is positive, prepare only the gap
220
- in the best same-sender campaign and keep all source-copy/prep caps tied to that
221
- two-day packet.
222
- Short form: default `--yolo refill senders` target is each eligible sender's two-send-day gap.
224
+ healthy sender daily capacity in the scheduler-forward target window, minus
225
+ already scheduler-owned future scheduled sends for those days and minus rows
226
+ already ready to schedule. For sender-scoped requests, compute that gap per
227
+ target sender across all active enrolled campaigns for that sender; count future
228
+ scheduled cells and ready-to-schedule cells in any active enrolled campaign
229
+ toward that sender's gap before preparing more rows. If ready/scheduled rows
230
+ already cover a sender's gap, do not add rows or prep for that sender; report
231
+ that the sender is loaded, awaiting scheduler. If the gap is positive, prepare
232
+ only the gap in the best same-sender campaign and keep all source-copy/prep caps
233
+ tied to that target-window packet.
234
+ Short form: default `--yolo refill senders` target is each eligible sender's
235
+ scheduler-forward 48-hour gap.
223
236
 
224
237
  Lane selection must choose one refill lane per sender from current
225
238
  dashboard-active campaign-backed sequence evidence:
@@ -235,20 +248,25 @@ dashboard-active campaign-backed sequence evidence:
235
248
  `send_inmail_closed` for that sender.
236
249
 
237
250
  For `--yolo` fill/schedule requests, do not treat "ready" as completion. Build
238
- and maintain a horizon saturation ledger for every selected sender from
251
+ and maintain a target-window saturation ledger for every selected sender from
239
252
  `get_refill_target_plan`. A sender is complete only when a final target-plan or
240
253
  refill-state reread proves projected coverage (`sent + scheduled`) meets or
241
- exceeds the sender's horizon capacity for the selected send days. Put another
242
- way: complete when the same daily-limit/readback model would show no remaining
254
+ exceeds the sender's capacity for the selected target window. Put another way:
255
+ complete when the same daily-limit/readback model would show no remaining
243
256
  send-day capacity for that selected lane. Ready-to-schedule rows are only buffer
244
- for the product scheduler. If ready plus projected coverage covers the horizon
245
- but scheduled cells do not yet, run a bounded read-only scheduler settle loop:
246
- wait, reread, recompute the ledger, and continue until projected coverage is
247
- proved or the loop reaches an explicit timeout/blocker. Timeout is
248
- `awaiting_scheduler_after_ready_buffer`, not success, and it does not need a
249
- prep/import/approval packet. Short form: ready buffer is not success.
250
- Short form: use a bounded scheduler settle loop before calling it blocked.
251
- Short form: `--yolo refill senders` completes only on projected horizon saturation or a concrete blocker.
257
+ for the product scheduler. If ready plus projected coverage covers the target
258
+ window but scheduled cells do not yet, run a persistent read-only scheduler wait
259
+ loop: wait, reread, recompute the ledger, and continue until projected coverage
260
+ is proved, a concrete non-scheduler blocker appears, or Christian explicitly
261
+ stops or asks for status only. `awaiting_scheduler_after_ready_buffer` is not
262
+ success and is not a terminal blocker for an active refill goal; it is the
263
+ loaded, awaiting scheduler poll state that keeps the thread waiting. It does not
264
+ need a prep/import/approval packet.
265
+ Short form: ready buffer is not success.
266
+ Short form: keep polling the scheduler instead of closing out while ready buffer
267
+ covers the gap.
268
+ Short form: `--yolo refill senders` completes only on projected target-window
269
+ saturation or a concrete blocker.
252
270
 
253
271
  Rank candidates in this order:
254
272
 
@@ -479,12 +497,12 @@ same refill request, do not ask the `Accept` / `Decline` question. Instead:
479
497
  4. execute only the exact packet;
480
498
  5. after each terminal credit-refresh/apply/prep/start result, rerun
481
499
  `get_refill_target_plan`, reread state, settle processing when needed,
482
- recompute the horizon saturation ledger, and continue with the next smallest
500
+ recompute the target-window saturation ledger, and continue with the next smallest
483
501
  safe action inside the same bounded packet until every selected sender is
484
- saturated by projected coverage or blocked by evidence. Do not stop at
485
- "loaded" or "awaiting scheduler" unless no in-packet MCP action remains and
486
- the scheduler-settle loop times out; report that as a blocker, not a completed
487
- refill.
502
+ saturated by projected coverage or blocked by non-scheduler evidence. Do not
503
+ stop at "loaded" or "awaiting scheduler"; when no in-packet MCP mutation
504
+ remains and ready rows cover the gap, keep the run open in read-only
505
+ scheduler polling until the sender is projected-full or Christian stops it.
488
506
 
489
507
  In `--yolo`, do not stop after the first selected campaign if the request was
490
508
  sender-scoped and more selected senders or same-packet start-eligible campaigns
@@ -572,17 +590,18 @@ when generated/pass counts are still settling, then poll `get_campaign_refill_st
572
590
  remains awaiting scheduler. Do not force scheduler fields directly.
573
591
 
574
592
  For requested fill/refill completion, continue the saturation loop after each
575
- poll: recompute projected horizon coverage by sender and date, subtract it from
576
- the requested horizon capacity, and decide whether another safe prep/import/
593
+ poll: recompute projected target-window coverage by sender and date, subtract it
594
+ from the requested target capacity, and decide whether another safe prep/import/
577
595
  approval pass is required. If projected coverage is still short and ready buffer
578
596
  is also short, run the next bounded MCP primitive that can create more eligible
579
597
  rows: `fill_campaign_horizon` for the selected evergreen target, or
580
598
  `start_campaign_message_preparation`, source import/replenishment, and bounded
581
599
  approval for the selected regular target. If projected coverage is short but
582
- ready buffer covers the gap, keep polling the scheduler until it fills or the
583
- explicit scheduler-settle timeout is hit. Never mark the refill complete while a
584
- daily limit/readback equivalent would still show the selected send day below
585
- capacity.
600
+ ready buffer covers the gap, keep polling the scheduler until it fills, a
601
+ concrete non-scheduler blocker appears, or Christian explicitly stops/statuses
602
+ the run. Never mark the refill complete or blocked while a daily limit/readback
603
+ equivalent would still show the selected send day below capacity and the only
604
+ remaining state is scheduler pickup.
586
605
 
587
606
  ## Evergreen Campaign Discipline
588
607