@sellable/install 0.1.340-phase981.20260711223346 → 0.1.342

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.
@@ -58,100 +58,402 @@ allowed-tools:
58
58
 
59
59
  # Refill Sends
60
60
 
61
- This is the concise public adapter for the typed refill contract. The backend
62
- planner, durable run, flow asset, and contract asset own allocation, retries,
63
- circuit behavior, scheduler placement, and completion rules.
64
-
65
- Compatibility triggers include `fill`, `refill sends`, `max out sends`,
66
- `load everyone up`, and `fill horizon sends`. Route every one through this same
67
- typed workflow; none authorizes a broader or legacy execution path.
68
-
69
- Measure completion from canonical projected coverage (`sent + scheduled`). The
70
- workflow does not lower paid-InMail thresholds; a threshold change remains a
71
- separate operator gate.
72
-
73
- Exact zero-shot form:
74
-
75
- `$sellable:refill-sends in sellable.dev workspace --target-date YYYY-MM-DD --yolo`
76
-
77
- Claude Code uses `/sellable:refill-sends`. Optional selectors are `--sender`,
78
- `--target-date`, `--until`, and `--yolo`.
79
-
80
- ## Bootstrap and execute
81
-
82
- 1. Call `mcp__sellable__get_auth_status({})`. If authentication is incomplete,
83
- use the returned login path and stop until verified.
84
- 2. First resolve and echo the explicit workspace and date scope. In scheduled or
85
- `--yolo` mode, a missing `workspaceId` is `WORKSPACE_REQUIRED`; never change
86
- shared active-workspace state to guess. Echo `workspaceId`, workspace name,
87
- `targetDate` or other date selector, sender selectors, action selectors, and
88
- approval mode before continuing.
89
- 3. Load
90
- `mcp__sellable__get_subskill_prompt({ subskillName: "refill-sends-workflow" })`
91
- until `hasMore:false`.
92
- 4. Load
93
- `mcp__sellable__get_subskill_asset({ subskillName: "refill-sends-workflow", assetPath: "core/flow.v1.json" })`
94
- until `hasMore:false`.
95
- 5. Load
96
- `mcp__sellable__get_subskill_asset({ subskillName: "refill-sends-workflow", assetPath: "core/contract.v2.json" })`
97
- until `hasMore:false`. Validate `contractVersion`, `cacheVersion`, and
98
- `contractHash` against the flow and generated metadata. Stop with
99
- `unsupported_refill_contract_major` or `refill_contract_hash_mismatch` on
100
- incompatibility; do not emulate missing assets from repo files or memory.
101
- 6. Invoke only the public durable entrypoint:
102
- `mcp__sellable__refill_sends({ workspaceId, targetDate, untilDate, horizonSendDays, senderIds, senderNames, actionTypes, yolo, executionMode, requireWorkspace:true })`.
103
- Preserve the exact scope and approval echo returned by the tool on resume.
104
- Pass `expectedActionKey` only when the rendered first global action contains
105
- an actual non-empty `actionKey`; never infer it from `type`, `toolName`, or
106
- `actionFingerprint`.
107
-
108
- ## Operator packet
109
-
110
- Always render the normal bounded approval packet, even under `--yolo`. Yolo is
111
- bounded auto-accept of that packet; it is not broader authority. Use campaign
112
- and sender names first, with IDs secondary. Preserve these six labels exactly:
113
-
114
- - Need to prepare
115
- - Goal
116
- - Already sent
117
- - Scheduled
118
- - Ready and waiting to be scheduled
119
- - Still need
120
-
121
- Show `targetShapeRevision`, `stateRevision`, action key, exact target date,
122
- side-effect class, expected targets, placement cap, and approval expiry. The
123
- public tool runs one packet-named primitive, records its receipt, rereads
124
- authoritative state, and replans. Keep any existing Codex goal open through
125
- settling; a skill cannot create `/goal` by itself.
126
-
127
- ## Safety and terminal truth
128
-
129
- The generated contract is authoritative. Never direct-send, raw-write scheduler
130
- fields, create/archive/delete campaigns, lower thresholds, switch an unselected
131
- source family, mutate sender configuration, or start an unapproved campaign.
132
- Paused campaign start and workspace-wide scheduler placement remain separately
133
- named, product-gated side effects. Sellable MCP receipts are the proof surface;
134
- never use Prisma, SQL, direct database access, or production scripts as proof.
135
-
136
- Render typed terminal truth name-first. Success is `projected_full`. Otherwise
137
- report the concrete blocker or `deadline_reached`, `iteration_limit`, or
138
- `operator_stopped` with target-specific evidence. A ready buffer or
139
- `awaiting_scheduler_after_ready_buffer` is
140
- `ready_buffer_exists_is_not_complete`, never completion.
141
-
142
- <!-- REFILL_CONTRACT_GENERATED:START -->
143
- ## Generated refill contract metadata
144
-
145
- contractVersion: 2.0.0
146
- cacheVersion: refill-contract-v1
147
- contractHash: e54ba0f80bc534fd70fd8c10c1caab109fe9a91c205cfc423f5f6735cd53fdc1
61
+ Use this public command wrapper for plain operator requests such as "fill",
62
+ "refill sends", "max out sends", "load everyone up", or "fill horizon sends".
63
+
64
+ Host command names:
65
+
66
+ - Claude Code: `/sellable:refill-sends`
67
+ - Codex: `$sellable:refill-sends`
68
+
69
+ Accepted invocation flags in the same user request:
70
+
71
+ - `--yolo`: auto-accept the rendered bounded refill packet after the required
72
+ fresh state reread.
73
+ - `workspaceId: <id>`: required for scheduled automation and `--yolo`; pass it
74
+ through on every refill MCP tool call instead of relying on shared config
75
+ state.
76
+ - `--sender <name-or-id>`: scope to a specific sender; repeat for multiple
77
+ senders.
78
+ - `--until <YYYY-MM-DD>`: fill through that sender-local date, inclusive,
79
+ instead of the default scheduler-forward 48-hour target window.
80
+ - `--target-date <YYYY-MM-DD>`: fill only that sender-local date. This means
81
+ prepare rows for scheduler-fillable slots on that date, not every remaining
82
+ daily-limit slot and not an inclusive through-date.
83
+ - `senderIds: <id>, <id>` or `senderNames: <name>, <name>`: explicit selector
84
+ alternatives when the host preserves natural-language arguments better than
85
+ shell-style flags.
86
+ - `actionTypes: send_invite, send_inmail_closed`: optional lane selector. Omit
87
+ `actionTypes` to preserve the target planner's lane inference.
88
+ - `untilDate: YYYY-MM-DD`: explicit date selector alternative when the host
89
+ preserves natural-language arguments better than shell-style flags.
90
+ - `targetDate: YYYY-MM-DD`: exact-date selector alternative when the host
91
+ preserves natural-language arguments better than shell-style flags.
92
+
93
+ When the host can call typed MCP tools, start with:
148
94
 
149
95
  ```text
150
- scope: workspace_id, target_date, sender_selectors, campaign_selectors, approval_mode, contract_identity, installed_identity
151
- gates: approval_packet, one_primitive, fresh_reread, normalized_accounting, prep_circuit
152
- release identities (independent of semantic hash): mcpPackageVersion, installPackageVersion, codexPluginVersion
153
- forbidden: direct_send, raw_scheduler_write, campaign_create, campaign_archive_delete, threshold_lowering, unselected_source_mutation, unapproved_campaign_start, sender_config_write
154
- terminal: projected_full, concrete_blocker, deadline_reached, iteration_limit, operator_stopped, capped_by_scheduler, loaded_awaiting_scheduler, lanes_exhausted, not_an_evergreen_workspace, no_refillable_campaigns
155
- ready_buffer_exists_is_not_complete
96
+ refill_sends({ yolo?: boolean, executionMode?: "manual" | "scheduled" | "yolo", requireWorkspace?: boolean, workspaceId?: string, senders?: string[], senderIds?: string[], senderNames?: string[], actionTypes?: ("send_invite" | "send_inmail_closed")[], horizonSendDays?: number, untilDate?: "YYYY-MM-DD", targetDate?: "YYYY-MM-DD" })
156
97
  ```
157
- <!-- REFILL_CONTRACT_GENERATED:END -->
98
+
99
+ That command helper normalizes arguments and returns the execution contract. In
100
+ non-yolo mode it does not mutate. In `--yolo`, it may execute exactly one safe
101
+ bounded primitive from the fresh `target.globalActionQueue[0]`, then reread and
102
+ return the new target plan; currently safe primitives are paid-credit refresh,
103
+ existing-row message preparation, generated-message approval, receipt-proven
104
+ same-source row copy, a request-scoped exact-date product scheduler sweep, and
105
+ read-only wait rereads. Same-source copy/source
106
+ fallback is safe only after receipt-proven exhaustion:
107
+ `hasMoreFrontierRows:false`, zero `approvalCandidates`, no `stuckActiveCells`,
108
+ and no non-terminal `approvedNotDispatched` work. It does not run unbounded
109
+ approval, lower paid-InMail thresholds, switch source families, create
110
+ campaigns, launch, or send directly; it never raw-writes scheduler fields.
111
+ Continue with the workflow below for route selection, state rereads, approval
112
+ gating, source import, preparation, and bounded approval.
113
+
114
+ The approval scope is the exact `workspaceId`, `targetDate`, sender ids, action
115
+ types, campaign/table/source ids, `targetShapeRevision`, and `actionKey` in the
116
+ rendered packet. `stateRevision` and sent/scheduled/ready counts are mutable
117
+ progress, not approval-scope drift. Execute only
118
+ `target.globalActionQueue[0]`, then perform a full authoritative reread before
119
+ deciding any next action.
120
+
121
+ ## Workspace Contract
122
+
123
+ First resolve the target workspace id from the user's request, automation config,
124
+ or install-time workspace mapping. Pass `workspaceId` on every scheduled or
125
+ `--yolo` refill tool call, including setup/read calls such as
126
+ `refill_sends`, `get_refill_target_plan`, `list_senders`,
127
+ `get_sender_routing`, `resolve_campaign_fill_route`,
128
+ `get_campaign_refill_state`, `get_scheduler_fill_capacity`,
129
+ `run_scheduler_sweep`, and any later refill mutation covered by the packet.
130
+ Missing `workspaceId` in scheduled or `--yolo` mode is a blocker; stop with
131
+ `WORKSPACE_REQUIRED` instead of running against an implicit or guessed
132
+ workspace.
133
+
134
+ Do not solve scheduled or `--yolo` workspace uncertainty by changing the shared
135
+ active workspace. Manual interactive workspace switching remains a separate
136
+ diagnostic/setup flow, outside automation.
137
+
138
+ Examples:
139
+
140
+ ```text
141
+ refill_sends({ yolo:true, executionMode:"yolo", requireWorkspace:true, workspaceId:"cmlq1v8ms0000jx04ang4hi7e" })
142
+ get_refill_target_plan({ intent:"plain", approvalMode:"approve", workspaceId:"cmlq1v8ms0000jx04ang4hi7e" })
143
+ list_senders({ workspaceId:"cmlq1v8ms0000jx04ang4hi7e" })
144
+ ```
145
+
146
+ Clover scheduled automation must name the Clover workspace explicitly:
147
+
148
+ ```text
149
+ refill_sends({ yolo:false, executionMode:"scheduled", requireWorkspace:true, workspaceId:"cmlq1v8ms0000jx04ang4hi7e" })
150
+ get_refill_target_plan({ intent:"plain", approvalMode:"mark_ready", workspaceId:"cmlq1v8ms0000jx04ang4hi7e" })
151
+ ```
152
+
153
+ First call `get_auth_status({})`. If auth is not OK, follow the returned login
154
+ guidance before route resolution. Do not run refill research against an implicit
155
+ or guessed workspace.
156
+
157
+ Treat "refill senders", "fill senders", "load everyone up", and "max out
158
+ senders" as sender-scoped requests. The target set is senders enrolled in active
159
+ campaign-backed sequence campaigns, not the first active campaign returned by a
160
+ resolver.
161
+
162
+ Goal-mode continuation: a skill cannot create or invoke `/goal` by itself. When
163
+ this command is already running inside an active Codex goal, keep that goal open
164
+ until every selected sender lane is filled by projected coverage
165
+ (`sent + scheduled`) for the scheduler-forward target window, Christian
166
+ explicitly stops/statuses the run, or a concrete non-scheduler blocker appears.
167
+ Do not call the goal complete or blocked only because the current state is
168
+ `awaiting_scheduler_after_ready_buffer`; treat it as loaded, awaiting scheduler.
169
+
170
+ Load the internal workflow prompt and deterministic flow asset before taking
171
+ any operational step:
172
+
173
+ ```text
174
+ get_subskill_prompt({ subskillName: "refill-sends-workflow" })
175
+ get_subskill_asset({ subskillName: "refill-sends-workflow", assetPath: "core/flow.v1.json" })
176
+ ```
177
+
178
+ Continue both loads until `hasMore:false`; parse the flow JSON and verify
179
+ `workflow:"refill-sends-workflow"` with a `v1` version. Then follow that
180
+ workflow exactly. The default path is read-only research: compute the refill
181
+ target plan first, resolve the route, identify the sender-relevant campaign
182
+ that most recently had scheduler-owned sends, read refill state for that target,
183
+ report the next safe step using campaign names first, and stop before mutation
184
+ unless the user has explicitly approved the exact workspace,
185
+ campaign/table/source ids, caps/dates, approval mode, expected side effects,
186
+ and stop/rollback condition.
187
+
188
+ Immediately after loading the internal workflow, call
189
+ `get_refill_target_plan`. The target plan is the canonical first fact receipt:
190
+ eligible senders, selected sender-local days, gross target, actual sent
191
+ coverage, scheduler-owned scheduled coverage across active enrolled campaigns,
192
+ projected coverage (`sent + scheduled`), inferred per-sender send lane/action
193
+ selections, ready buffer, remaining projected gap, paid-InMail credit/threshold
194
+ feasibility, `targetShapeRevision`, and `stateRevision`. Refill target lanes are
195
+ connection invites (`send_invite`), standalone paid InMails
196
+ (`send_inmail_closed`), or unified Sales Nav cascades represented publicly as
197
+ `send_inmail_closed` with `campaignClassification:"sales_nav_cascade"`. For a
198
+ Sales Nav cascade, refill the selected campaign first; its sequence can route
199
+ prospects to Open InMail, paid InMail while fresh credits are >= 5, or
200
+ same-campaign connection fallback without asking for separate open/paid/
201
+ connection campaigns. DMs (`send_dm`) are follow-up actions, not refill horizon
202
+ target capacity, and must not be counted as refill sent, scheduled, or ready
203
+ coverage. When `actionTypes` are omitted, trust the target plan's inferred lane
204
+ rather than asking which campaign class to fill. If a stale target plan selects
205
+ `send_dm` or `send_inmail_open` as the lane, stop and re-plan with the current
206
+ planner before mutation.
207
+ Short form: trust the target plan's inferred lane when it is a connection invite,
208
+ paid-InMail refill lane, or unified Sales Nav cascade.
209
+ Connection-only evergreen campaigns with exact `["send_invite"]` sequence proof
210
+ are plain invite capacity: treat them as `selectedLane:"send_invite"` only. Do
211
+ not infer DM, InMail, Sales Nav cascade, paid-credit refresh, message
212
+ generation, follow-up, sequence mutation, launch/start, scheduling override, or
213
+ direct-send work from a connection-only lane.
214
+
215
+ Structured planner packet:
216
+
217
+ - `target.eligibleSenderLedger` is the public sender eligibility ledger.
218
+ - `target.senderRefillPlans[]` is the canonical sender-level packet; read and
219
+ display it before mutation.
220
+ - Each sender packet includes `campaignRanking.options`, `sourcePlan`,
221
+ `refillReceipt`, `nextActions`, and `manualAlternates`.
222
+ - `refillReceipt` is the public ladder receipt. It carries the selected
223
+ campaign/sender/lane summary, skipped rungs, existing-row frontier proof, and
224
+ any absolute `wait.deadlineAt`.
225
+ - Preserve these coverage labels exactly: `Need to prepare`, `Goal`,
226
+ `Already sent`, `Scheduled`, `Ready and waiting to be scheduled`,
227
+ `Still need to schedule`, and `Still need to prepare`. Never render an
228
+ unlabeled `Still need` value.
229
+ - `target.globalActionQueue` is the only cross-sender yolo execution queue.
230
+ Execute exactly one globally ranked primitive from
231
+ `target.globalActionQueue[0]`, then rerun `get_refill_target_plan` with the
232
+ same `workspaceId` before
233
+ choosing another action.
234
+ - When that primitive is `run_scheduler_sweep`, show `workspaceWide:true` and
235
+ its reason in the approval/yolo packet so the operator sees that the sweep
236
+ may schedule other eligible workspace cells on the approved date.
237
+ - `manualAlternates` are not yolo actions. Threshold lowering and campaign
238
+ creation are manual continuations only.
239
+
240
+ Refill action ladder: approve generated rows only when an explicit bounded
241
+ approval gate exists, process all existing same-campaign unenriched/unprepared
242
+ rows in bounded batches before any source work, then copy bounded net-new rows
243
+ from the selected source (`selectedLeadListId`, provider, and source
244
+ fingerprint preserved), then use provider-aligned source-more. A new source or
245
+ provider switch changes the reply-rate baseline and is a manual alternate, not a
246
+ `--yolo` side effect.
247
+ Source/copy/fallback requires receipt-proven exhaustion of earlier rungs:
248
+ `existingRowFrontier.hasMoreFrontierRows:false`, zero `approvalCandidates`, no
249
+ fresh active prep, no `stuckActiveCells`, and no non-terminal
250
+ `approvedNotDispatched` rows. Treat anomalies, `stuckActiveCells`, and
251
+ non-terminal `approvedNotDispatched` as diagnose-and-report gates, not
252
+ exhaustion. Terminal `approvedNotDispatched` blockers may be reported, then the
253
+ ladder can proceed.
254
+
255
+ Run-local paid-credit guard: in `--yolo`, the `refill_sends` MCP command
256
+ automatically maintains a `refreshedPaidInmailSenderIds` set for the current
257
+ command call. If its first target plan has stale/missing paid-InMail credit
258
+ facts, it refreshes each selected sender at most once, reruns
259
+ `get_refill_target_plan`, and returns the post-refresh `targetPlan` before
260
+ choosing the next prep/source-copy/bounded-approval/read-only wait action. If fresh facts are still below
261
+ threshold, below-threshold paid-InMail facts fall back to an existing connection
262
+ lane, the same Sales Nav cascade campaign's connection branch, or a manual
263
+ continuation.
264
+
265
+ Freshness gate precedes scheduler wait: if any selected
266
+ `target.senderRefillPlans[].paidInmail.status` is `missing_credit_facts` or
267
+ `stale_credit_facts`, or the target plan contains a
268
+ `refresh_paid_inmail_credits` candidate, do not enter `wait_for_scheduler` even
269
+ when `remainingReadyOrProjectedGap:0`. Refresh the exact selected sender credit
270
+ facts once, rerun `get_refill_target_plan`, and only then decide whether
271
+ scheduler wait is the next safe action. If facts remain missing/stale after the
272
+ single refresh attempt, stop with a paid-InMail freshness blocker instead of
273
+ waiting on scheduler pickup.
274
+ The standalone MCP refresh surface is the scoped route
275
+ `/api/v3/mcp/senders/:senderId/refresh-inmail-credits` with explicit
276
+ `workspaceId`; do not use active-workspace mutation as the automation control
277
+ path.
278
+
279
+ Compact refill lessons: sender-level target plan is final truth; trust
280
+ `schedulerGate.sendable` and scheduler gate blockers, not raw
281
+ `unipileAccountStatus` labels alone; use compact prep status checks for
282
+ long-running jobs; reread target plans after prep or cancel; treat ready rows as
283
+ intermediate; avoid huge parallel target-plan reads when output is large. If a
284
+ campaign produces prepared/ready rows but sender-level projected coverage does
285
+ not move after one bounded settle loop, pivot to compact prep status or a
286
+ scheduler-proven lane. Do not keep waiting on campaign-level ready counts.
287
+
288
+ For exact-date requests, pass `targetDate` to `get_refill_target_plan`. If you
289
+ need raw proof, call the read-only `get_scheduler_fill_capacity` query for the
290
+ same sender/action/date; it tells the MCP how many cells the product scheduler
291
+ will try to place and does not import, approve, schedule, refresh credits, or
292
+ mutate.
293
+ Treat `rollingWeeklyInvite.capacityFreedDuringWindow:true` as proof that
294
+ rolling-weekly capacity frees later in the send window and remains schedulable;
295
+ use its timing fields instead of treating the window-start gate as a permanent
296
+ full-day blocker.
297
+ When the refill loop has ready rows and needs scheduler pickup now, use
298
+ `run_scheduler_sweep` with the same explicit `workspaceId`; it can place cells
299
+ within existing scheduler gates and returns the receipt, but it never sends or
300
+ bypasses limits.
301
+ A scheduler sweep is a visible workspace-wide scheduling side effect. The
302
+ request packet limits the expected target changes to its exact date, senders,
303
+ action types, campaigns, tables, and stable sources, but the product scheduler
304
+ may also place unrelated eligible workspace work; disclose that possibility in
305
+ the approval packet and receipt. For an exact-date sweep action, execute it
306
+ once, then reread the full target plan before taking or presenting another
307
+ action.
308
+ The exact-date `run_scheduler_sweep` may schedule eligible workspace cells
309
+ through existing product gates; it never sends directly or raw-writes scheduler
310
+ fields. Only non-exact or no-sweep scheduler waits are read-only.
311
+ On resume, reconcile the current target plan and matching sweep status/receipt
312
+ before retrying. A matching same-key terminal receipt replays; an
313
+ `uncertain_outcome` stops for reconciliation and must not schedule again.
314
+ Scheduler-run receipt interpretation: `cellsConsidered is allocation-attempt
315
+ count`, not total ready supply, while `readyCellsFound` is ready inventory found
316
+ before prefilters. Inspect `campaignScopeSummary` before assuming the selected
317
+ refill campaign/table was included; if absent, do not infer that target was
318
+ ready-but-blocked. Interpret `prefiltered` as ready cells removed before
319
+ allocation, `skipped` as considered cells blocked by scheduler gates, and
320
+ `deferred` as considered cells waiting on windows/capacity/cooldown. For ready
321
+ closed-InMail cells with stale paid-credit prefilter/defer reasons, refresh
322
+ paid-InMail credits once through existing tools, then rerun `run_scheduler_sweep`
323
+ or read `action:"status"`; `refresh_paid_inmail_credits_then_rerun` is that
324
+ path. `wait_for_capacity_or_window` means report loaded/capped/waiting and do
325
+ not source or prep more rows; `no_ready_cells_continue_refill_prep` means return
326
+ to the refill/prep ladder. Do not treat `cellsScheduled:0` alone as failure.
327
+ If the target plan is complete by projected coverage, report that the selected
328
+ target is already filled and no-op without asking for approval. If the ready
329
+ buffer covers the projected gap, paid InMail credit facts are fresh for every
330
+ selected paid-InMail lane, but scheduled coverage is still short, keep the run
331
+ open in a persistent read-only scheduler wait loop. Honor the emitted wait
332
+ metadata: reread `get_refill_target_plan` after about 30 seconds by default (or
333
+ the action's explicit `rereadAfterMs`), never use a blind hard-coded sleep, and
334
+ stop at the named bound using `receipt_deadline > unchanged_poll_bound >
335
+ run_budget` precedence. A matching active/uncertain request key is never
336
+ redispatched. Continue until projected coverage fills the target, a concrete
337
+ non-scheduler blocker appears, a named bound stops the run, or Christian
338
+ explicitly asks to stop or only receive a status report. Treat
339
+ `awaiting_scheduler_after_ready_buffer` as an in-progress wait state, not a
340
+ close-out condition.
341
+ Wait actions are gates, not competing goals. When `wait_for_active_work` or
342
+ `wait_for_scheduler` includes receipt `wait.deadlineAt`, honor that absolute
343
+ deadline; if it is expired on this call, escalate to diagnostics with the
344
+ receipt evidence instead of issuing another blind wait.
345
+ If paid InMail credit facts are stale or missing and the first target plan
346
+ contains `refresh_paid_inmail_credits`, do not present that as the operator's
347
+ next action in `--yolo`. Do not present paid-credit refresh as the next operator
348
+ action after `refill_sends` returns `autoPaidInmailRefresh` and the
349
+ post-refresh `targetPlan`. Trust `refill_sends.autoPaidInmailRefresh`: it should
350
+ show the exact sender ids refreshed once, sender-credit-cache write receipts,
351
+ and a returned post-refresh `targetPlan`. Continue from that post-refresh packet.
352
+ If paid InMail is below threshold after the fresh credit read, report the exact
353
+ campaign/table/column threshold action or same-campaign connection fallback;
354
+ `--yolo` does not lower paid-InMail thresholds or create campaigns.
355
+
356
+ If the plain route's managed waterfall targets are stale, for example skipped
357
+ targets show archived/completed shared slots or the returned targets do not cover
358
+ the named sender, immediately run the active route refetch before declaring a
359
+ sender blocked. Current dashboard-active `PAUSED` campaign-backed sequence
360
+ campaigns are start-eligible refill candidates; read refill state before deciding
361
+ whether to prep, approve, start, or skip. Do not treat them as archived inventory.
362
+
363
+ For interactive Codex or Claude Code sessions, that approval must use the
364
+ host-native structured question gate, not plain chat:
365
+
366
+ - Codex: use `request_user_input`.
367
+ - Claude Code: use `AskUserQuestion`.
368
+
369
+ The approval question must present the final refill step with exactly two
370
+ choices: `Accept` and `Decline`. Render the full operator output packet in
371
+ normal chat immediately before opening the structured approval question so it
372
+ can be displayed as Markdown. The chat packet must include workspace, sender
373
+ scope, a campaign-by-campaign table with campaign name, sender names, action,
374
+ target count/cap, source/list, and blocker/skip reason, then exact ids,
375
+ expected side effects, forbidden actions, and the stop condition. The structured
376
+ question body must be compact and refer back to the posted packet instead of
377
+ duplicating it. Treat `Accept` as permission for only the rendered target, caps,
378
+ mode, and side effects. Treat `Decline` as a hard stop with no mutation.
379
+
380
+ If Christian includes `--yolo` in the same refill request, treat that flag as
381
+ auto-accept for the rendered bounded refill packet after the required fresh state
382
+ reread. For sender-scoped language with no named senders, `--yolo` means all
383
+ eligible healthy senders enrolled in active campaign-backed sequence campaigns in
384
+ the requested `workspaceId`. Without `--yolo`, if Christian did not name senders, ask
385
+ which eligible enrolled senders to refill before choosing campaigns or mutating.
386
+
387
+ `--yolo` only covers the exact sender set, per-sender target campaigns, caps,
388
+ approval mode, and side effects in the packet. It may authorize `start_campaign`
389
+ only for selected `PAUSED`, dashboard-active, campaign-backed sequence refill
390
+ targets when the rendered packet names the exact campaign ids and start side
391
+ effect. Starting a paused campaign can let the product scheduler schedule/send
392
+ approved eligible sequence actions, so include that expected side effect in the
393
+ packet. It does not authorize starting unrelated, archived, completed, draft, or
394
+ direct campaigns, separate launch/send actions, archive or delete cleanup,
395
+ direct scheduler writes, sender reassignment, paid-InMail threshold changes,
396
+ connection campaign creation, paid-InMail credit refreshes outside the exact
397
+ rendered sender packet, or campaigns outside those
398
+ selected for the eligible sender set. Stop and re-plan if the route, sender set,
399
+ ids, caps, blockers, paid-InMail feasibility, action class, or side-effect class
400
+ drift before mutation. Sent/scheduled counts increasing toward the approved
401
+ target are expected progress:
402
+ they change `stateRevision`, not `targetShapeRevision`, and do not require a
403
+ second approval.
404
+
405
+ In `--yolo`, continue as far as the rendered packet safely allows. After each
406
+ apply/prep/source-copy/bounded-approval/read-only wait result, reread state, settle processing when needed, and move to
407
+ the next selected sender or start-eligible same-packet campaign instead of
408
+ stopping after the first partial result. If no in-packet safe action remains,
409
+ return concrete continuation options with campaign names, exact ids, which option
410
+ is still covered by the current packet, and which option needs a new approval
411
+ packet.
412
+
413
+ For `--yolo` fill/schedule requests, completion means projected saturation
414
+ (`sent + scheduled`) for the scheduler-forward target window, not merely
415
+ prepared/approved/ready rows. Maintain a target-window saturation ledger per
416
+ selected sender: selected send days, gross capacity, actual sent cells, future
417
+ scheduler-owned scheduled cells with non-null `scheduledFor`, projected count,
418
+ ready-to-schedule buffer, remaining projected gap, paid-InMail feasibility,
419
+ `targetShapeRevision`, `stateRevision`, and the next MCP primitive that can
420
+ reduce the gap. After every apply/prep/source-copy/bounded-approval/read-only wait result, wait for processing, reread
421
+ the target plan/refill state, recompute the ledger, then keep applying safe
422
+ bounded actions until projected coverage fills the target window or a concrete
423
+ non-scheduler blocker is proven.
424
+ If ready rows cover the projected gap but the scheduler has not picked them up
425
+ yet, report loaded, awaiting scheduler and run the persistent read-only
426
+ scheduler wait loop. Do not finish the refill goal, mark it complete, or mark it
427
+ blocked only because it is still `awaiting_scheduler_after_ready_buffer`; keep
428
+ waiting unless Christian stops the run or the host cannot continue.
429
+
430
+ Future scheduled coverage and already sent actions are distinct; only
431
+ scheduler-owned future scheduled actions count as scheduled coverage. For
432
+ multiple target dates, finish D1 execution and the full D1 reread before
433
+ planning D2. Completion proof is product-native Sellable MCP evidence only:
434
+ target plan, campaign refill state, scheduler capacity, sweep/status, and
435
+ bounded receipts. Never use individual cell ids, Prisma, SQL, direct database
436
+ access, or production-environment scripts as completion proof.
437
+
438
+ In `--yolo`, the default fill target is the scheduler-forward 48-hour window
439
+ unless `--target-date`/`targetDate`, `--until`/`untilDate`, or an explicit
440
+ compatibility `horizonSendDays` is provided. If a target date is provided,
441
+ compute bounded gaps for only that sender-local date using scheduler-fillable
442
+ slots. If an until date is provided, compute bounded gaps through that
443
+ sender-local date inclusive, skipping no-send days and never extending beyond
444
+ that date without a new packet. For each target sender, compute the bounded gap
445
+ from that sender's healthy daily capacity, existing future scheduler-owned
446
+ scheduled sends, and rows already ready to schedule across active campaigns
447
+ enrolled with that sender. Then pick the best same-sender campaign to fill the
448
+ gap: prefer recent/future scheduler-owned sends for that sender, then strongest
449
+ recent result evidence, then source health. Do not stop
450
+ after filling only one sender when the request was sender-scoped. If a
451
+ same-source copy hits the campaign-table row cap, split the current source into
452
+ a bounded LinkedIn profile source list, confirm only that smaller list into the
453
+ same campaign, and operate on the copied review batch. Do not fall back to
454
+ on-demand campaigns or unrelated active-campaign fills.
455
+
456
+ Public concepts are regular campaign and evergreen campaign. Internal direct
457
+ campaign types are unsupported refill targets. `fill_campaign_horizon` is only a
458
+ legacy evergreen-only lower-level primitive after route and refill-state
459
+ evidence proves an evergreen target.