@sellable/mcp 0.1.397 → 0.1.399
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/tools/prompts.js
CHANGED
|
@@ -373,7 +373,7 @@ export function getPostFindLeadsScoutRegistry() {
|
|
|
373
373
|
codex: 'After confirm_lead_list copies source rows and the initial campaign-table execution slice exists, ask the filter-choice question immediately. Do not spawn anything before that question. After the answer, launch only Message Drafting. The filter-choice answer is the post-import user gate for this single worker; do not ask another question about starting it in step-wise or YOLO mode. The registry lookup is not a launch: after get_post_find_leads_scout_registry, immediately invoke Task/spawn_agent or the host background-agent mechanism before loading filter-leads.md, before saving rubrics, and before treating skip-filters as ready for message review. Both choices route through this kickoff; do not let filters_skipped jump straight from filter-choice to message-generation. If filters are chosen, the parent stays on Filter Rules and drafts/saves rubrics with MCP tools while Message Drafting runs in the background. If filters are skipped, move to Messages/message review only after Message Drafting has started or is ready; update_campaign(currentStep=messages) is not proof of launch. If the named Message Drafting custom agent is unavailable, spawn a generic gpt-5.5 xhigh Message Drafting background agent with the same lean campaign/table basis. When the background worker starts, persist workerDetails.messageDraftBuilder with statusSource "branch", status "branch-running", runId, startedAt, updatedAt, basisToken when known, and basis containing campaignId, selectedLeadListId, workflowTableId, filterChoice, and reviewBatchRowHash or reviewBatchRowIds; workerStatuses.messageDraftBuilder may be "running" as a simple badge only. Never put rich proof under workerStatuses and never use workerStatuses.messageDrafting. If no background-agent tool is callable, start the same full message branch inline before filter drafting or before skip-filter message review, record workerDetails.messageDraftBuilder with statusSource "parent-thread-fallback" and status "fallback-active", and require the same live context, prompt, assets, and validation gate before message review; do not wait until filters are saved and then call the registry.',
|
|
374
374
|
claude: "After confirm_lead_list copies source rows and the initial campaign-table execution slice exists, ask the filter-choice question immediately. Do not invoke any Task/Agent before that question. After the answer, invoke only Message Drafting. If filters are chosen, parent drafts/saves rubrics with MCP tools while Message Drafting runs, asks filter approval, then joins Message Drafting. If filters are skipped, invoke only Message Drafting and move to Messages/message review.",
|
|
375
375
|
parentThreadRule: 'Named agents are optional acceleration, but message drafting is not optional. The only normal background worker is Message Drafting. The filter-choice answer is the campaign-scoped go-ahead for this single post-import worker; do not ask another question to start it in step-wise or YOLO mode. If a named agent is unavailable, use a generic gpt-5.5 xhigh Message Drafting background agent. source work and filter work stay in the parent thread with MCP tools. If post-find-leads-message-scout is available, run it as the background Message Draft Builder after the filter-choice answer. The registry lookup is not a launch: get_post_find_leads_scout_registry only identifies the worker, and Message Drafting counts as started only after Task/spawn_agent or the host background-agent tool is invoked, or after the parent begins the same full message branch inline because no background-agent tool is callable. This launch must happen before loading filter-leads.md, save_rubrics, filter approval, or skip-filter message review; currentStep=messages is not proof of launch. If post-find-leads-message-scout is absent, do not customer-surface install status. Do not silently treat message drafting as started; the main thread must either launch the background worker or execute the same message branch from CampaignOffer state, selected source state, workflowTableId, and initial campaign-table execution slice rows. For a spawned worker, record workerDetails.messageDraftBuilder with statusSource branch / status branch-running, runId, startedAt, updatedAt, and basis containing campaignId, selectedLeadListId, workflowTableId, filterChoice, and reviewBatchRowHash or reviewBatchRowIds. workerStatuses.messageDraftBuilder is optional simple badge text only ("running", "ready", "blocked", "idle"); never put runId/statusSource/basis under workerStatuses and never use workerStatuses.messageDrafting. If no background-agent tool is callable, start that same full message branch inline before filter drafting or before skip-filter message review, record workerDetails.messageDraftBuilder with statusSource parent-thread-fallback / status fallback-active then ready, and require the same live context, prompt, assets, and validation gate before message review; do not report that as a background worker failure. If neither branch nor inline fallback can run, return blocked/retry-needed; do not wait until filters are saved and then call the registry. The Message Drafting handoff must be lean. Do not paste copied row counts, brief hashes, review-batch hashes, full reviewBatchRowIds, broad row data, or local debug artifacts into the spawn prompt. Local markdown/json files are not normal-path inputs. The filter-choice question is the first post-import user gate; do not load post-lead registries or filter references before it. Message drafting starts after the filter-choice answer, must load get_subskill_prompt({ subskillName: "generate-messages" }), and must load every required message asset named by generate-messages Mode 0 through get_subskill_asset before drafting. Reference Asset Loading means loading the required pre-draft reference pack before drafting; return blocked/retry-needed if required assets cannot be loaded; load ai-tells.md because it is never optional. The branch or parent-thread fallback loads the full generate-messages prompt and every referenced asset through get_subskill_asset. After generating/revising the candidate and before returning ready, must load get_subskill_prompt({ subskillName: "create-campaign-v2-validation" }) as the final internal validation gate, must read live campaign table state through scoped MCP/product tools, and must reject mismatched selectedLeadListId/workflowTableId/campaign/workspace input. Do not block when filters were chosen but leadScoringRubrics are not yet visible in the branch read; the parent owns save_rubrics and filter approval in parallel, so Message Drafting should return status ready with basisStatus usable_initial when campaign/list/table identity and the non-empty execution slice match. Do not use any alternate, local-artifact, or examples-only message prompt. User copy feedback, message QA, or rewrite requests before approve-message must be routed back to Message Drafting with the current recommendation, lean campaign/table basis, and latest user text; the parent must not rewrite or QA the template from memory and must not call update_campaign_brief before approve-message. The worker validates internally and returns only templateRecommendation, tokenFillRules, renderedGoodSample, status, approveOrReviseRecommendation, validationStatus, outputAt, outputHash, and blocked/retry detail. Do not render renderedFallbackSample, risk notes, or a qaReceipt on the normal happy path. On the filter path, save_rubrics keeps the browser on Filter Rules after save_rubrics so the user can approve the saved criteria; after saved-filter approval, move to Filter Leads with currentStep=apply-icp-rubric whether Message Drafting is ready or still running. Wait there for message approval. Enrichment, filtering, Generate Message cells, sender setup, sequence attach, and launch wait for template approval on the Use Template path. On the skip path, move to Messages/message review after Message Drafting has started or is ready and wait for message approval before enrichment or Settings. Do not render message review from checklist or shortcut instructions; message review requires a messageDraftRecommendation whose basis proves the generate-messages prompt, required message assets, and validation gate ran for the current campaign/table execution slice. Do not automatically rerun Message Drafting after filters/enrichment finish; show the initial draft by default and offer an enriched rewrite only with explicit user opt-in. Handoff and recommendation output are Markdown with labeled fields, not raw JSON.',
|
|
376
|
-
prepareMessagesRule: `Default create-campaign stays on the existing reviewBatchLimit:15 first campaign-table execution slice. For plain post-mint fill/load/refill requests, load get_subskill_prompt({ subskillName: "refill-sends-workflow" }), then call resolve_campaign_fill_route({ intent:"plain" }), list_senders, and get_campaign_refill_state for enough candidate campaigns to identify the campaign that most recently had scheduler-owned sends for the relevant sender set before any mutation. Route outcomes are route:"evergreen_horizon", route:"active_campaigns", and route:"ask_create"; stay in the same campaignOfferId/campaignId context after minting. Plain fill is not an alias for fill_campaign_horizon or campaign creation. fill_campaign_horizon is evergreen-only and is not the generic regular-campaign fill path. Campaign creation is allowed only after route:"ask_create" and explicit user selection; it is never the default response to plain fill. Treat "fill up/load sends" as capacity-fill preparation: calculate the bounded
|
|
376
|
+
prepareMessagesRule: `Default create-campaign stays on the existing reviewBatchLimit:15 first campaign-table execution slice. For plain post-mint fill/load/refill requests, load get_subskill_prompt({ subskillName: "refill-sends-workflow" }), then call resolve_campaign_fill_route({ intent:"plain" }), list_senders, and get_campaign_refill_state for enough candidate campaigns to identify the campaign that most recently had scheduler-owned sends for the relevant sender set before any mutation. Route outcomes are route:"evergreen_horizon", route:"active_campaigns", and route:"ask_create"; stay in the same campaignOfferId/campaignId context after minting. Plain fill is not an alias for fill_campaign_horizon or campaign creation. fill_campaign_horizon is evergreen-only and is not the generic regular-campaign fill path. Campaign creation is allowed only after route:"ask_create" and explicit user selection; it is never the default response to plain fill. Treat "fill up/load sends" as capacity-fill preparation. In --yolo fill/refill mode, default to one best recent-send campaign and a two-send-day horizon: calculate the bounded gap from healthy sender daily capacity minus future scheduler-owned scheduled sends and ready-to-schedule rows, then prepare only that gap. Use the refill workflow to decide whether to enrich/prep more rows in that same recent-send campaign, add/import more rows to that same campaign/source path, use a different existing campaign only when the recent-send lane is blocked/exhausted, or ask what to create. Do not create warm-post-engager side campaigns. Surface sender-health blockers separately from prepared/approved/scheduled counts. User-facing refill decisions must be campaign-name-first and sender-name-first, with ids as proof/execution targets only. For already-running regular campaigns that need Signal Discovery source replenishment, use the guarded currentStep clear with clearCurrentStepIfMatches:"running", campaign-scoped provider prompt/search/select, and import_leads with the existing sourceLeadListId when a newly approved selected-post scrape would otherwise return reusedExistingSourceList. After confirm_lead_list copies rows into an existing table, avoid fixed maxRowsToCheck:100; if confirm_lead_list returns USER_ADDED_ROWS_LIMIT_EXCEEDED, create a bounded same-source split from selectedLeadListId with get_rows_minimal/load_csv_linkedin_leads, confirm that smaller source list into the same campaign, and operate on the reviewBatch first; inspect reviewBatch/table selectors or use adaptive/wider bounded prep so appended rows are included. Do not interpret checkedRows as enriched rows; it is only the table cursor. Prepared, approved, and ready_to_schedule rows are intermediate states; never call them scheduled unless a re-read proves scheduler-owned scheduled cells with non-null scheduledFor. Before source import, prep, or approval, require exact visible approval 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, but still do not launch. For "schedule X sends" or "fill sender sends", approve only when explicitly requested, then re-read campaign/table scheduled counts; if scheduler-owned scheduledFor cells are not present, report prepared/approved/ready - awaiting scheduler instead of success. Do not call start_campaign as part of fill/schedule horizon. Do not call start_campaign as part of refill sends. Launch/start is a separate explicit human action after the operator intentionally wants sends to go out, and it must still verify that the bounded cohort is the only approved cohort and must not broad approve-all. 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. start_campaign remains forbidden until explicit launch/start approval outside refill sends.`,
|
|
377
377
|
},
|
|
378
378
|
};
|
|
379
379
|
}
|
package/package.json
CHANGED
|
@@ -137,9 +137,16 @@ explicit user selection; it is never the default response to plain fill. When
|
|
|
137
137
|
choosing among active targets, use refill-state scheduled-count evidence to
|
|
138
138
|
continue the campaign that most recently had scheduler-owned sends for the
|
|
139
139
|
relevant sender set; do not treat every active campaign as a refill candidate.
|
|
140
|
+
In `--yolo` fill/refill mode, default to one best recent-send campaign and a
|
|
141
|
+
two-send-day horizon: subtract future scheduler-owned scheduled sends and
|
|
142
|
+
ready-to-schedule rows from healthy sender daily capacity, then prepare only
|
|
143
|
+
that bounded gap.
|
|
140
144
|
When more leads are needed, the refill workflow must recommend same-campaign
|
|
141
145
|
source-ladder replenishment first; do not create warm-post-engager side
|
|
142
|
-
campaigns, on-demand campaigns, or unrelated campaigns.
|
|
146
|
+
campaigns, on-demand campaigns, or unrelated campaigns. If same-source copy hits
|
|
147
|
+
`USER_ADDED_ROWS_LIMIT_EXCEEDED`, split the current source into a bounded
|
|
148
|
+
same-source LinkedIn profile list, confirm that smaller list into the same
|
|
149
|
+
campaign, and operate on the copied review batch first. Surface sender-health
|
|
143
150
|
blockers separately from prepared/approved/scheduled counts.
|
|
144
151
|
|
|
145
152
|
Treat active fills as capacity-fill preparation: calculate the bounded target
|
|
@@ -38,6 +38,7 @@ allowed-tools:
|
|
|
38
38
|
- mcp__sellable__get_table_rows
|
|
39
39
|
- mcp__sellable__get_campaign_table_schema
|
|
40
40
|
- mcp__sellable__select_campaign_cells
|
|
41
|
+
- mcp__sellable__queue_campaign_cells
|
|
41
42
|
- mcp__sellable__wait_for_campaign_processing
|
|
42
43
|
- mcp__sellable__get_sender
|
|
43
44
|
---
|
|
@@ -79,6 +80,15 @@ delete cleanup, direct scheduler writes, sender reassignment, or any expanded
|
|
|
79
80
|
target set. Stop and re-plan if the route, ids, caps, blockers, or side-effect
|
|
80
81
|
class drift before mutation.
|
|
81
82
|
|
|
83
|
+
In `--yolo`, the default two-day fill horizon is two send days. The workflow must pick
|
|
84
|
+
the best recent-send campaign first, not every active campaign, and compute the
|
|
85
|
+
bounded gap from healthy sender daily capacity, existing future scheduled sends,
|
|
86
|
+
and rows already ready to schedule. If a same-source copy hits the campaign-table
|
|
87
|
+
row cap, split the current source into a bounded LinkedIn profile source list,
|
|
88
|
+
confirm only that smaller list into the same campaign, and operate on the copied
|
|
89
|
+
review batch. Do not fall back to on-demand campaigns or broad active-campaign
|
|
90
|
+
fills.
|
|
91
|
+
|
|
82
92
|
Public concepts are regular campaign and evergreen campaign. Internal direct
|
|
83
93
|
campaign types are unsupported refill targets. `fill_campaign_horizon` is only a
|
|
84
94
|
legacy evergreen-only lower-level primitive after route and refill-state
|
|
@@ -36,6 +36,7 @@ allowed-tools:
|
|
|
36
36
|
- mcp__sellable__get_table_rows
|
|
37
37
|
- mcp__sellable__get_campaign_table_schema
|
|
38
38
|
- mcp__sellable__select_campaign_cells
|
|
39
|
+
- mcp__sellable__queue_campaign_cells
|
|
39
40
|
- mcp__sellable__wait_for_campaign_processing
|
|
40
41
|
- mcp__sellable__get_sender
|
|
41
42
|
---
|
|
@@ -69,6 +70,10 @@ Plain phrases that enter here include "fill", "refill sends", "max out sends",
|
|
|
69
70
|
first resolver target unless it is also the most recent sender-relevant send
|
|
70
71
|
lane.
|
|
71
72
|
Short form: Do not stop after the first resolver target unless recent-send evidence supports it.
|
|
73
|
+
In `--yolo` mode, selecting every active campaign is a scope error. Pick the
|
|
74
|
+
single highest-ranked recent-send campaign unless the refill-state evidence
|
|
75
|
+
proves multiple distinct sender lanes need separate two-day fills.
|
|
76
|
+
Short form: `--yolo` selects the best recent-send campaign first, not all active campaigns.
|
|
72
77
|
4. Pick exact ids from the selected refill-state response. Do not use campaign
|
|
73
78
|
names or table names as target identifiers for tool calls.
|
|
74
79
|
5. Classify the target from refill state:
|
|
@@ -111,6 +116,16 @@ The default refill interpretation is "continue the campaign that was actually
|
|
|
111
116
|
sending most recently for the relevant available senders", not "touch every
|
|
112
117
|
active campaign".
|
|
113
118
|
|
|
119
|
+
Default `--yolo` horizon is two send days when the user asks to fill, refill,
|
|
120
|
+
load, or max sends without naming a different horizon. Compute the target from
|
|
121
|
+
the selected campaign's healthy sender daily capacity for the next two send
|
|
122
|
+
days, minus already scheduler-owned future scheduled sends for those days and
|
|
123
|
+
minus rows already ready to schedule. If `readyToSchedule` already covers the
|
|
124
|
+
two-day gap, do not add rows or prep; report that the selected campaign is loaded
|
|
125
|
+
and awaiting the scheduler. If the gap is positive, prepare only the gap and keep
|
|
126
|
+
all source-copy/prep caps tied to that two-day packet.
|
|
127
|
+
Short form: default `--yolo` refill target is the selected campaign's two-day send gap.
|
|
128
|
+
|
|
114
129
|
Rank candidates in this order:
|
|
115
130
|
|
|
116
131
|
1. **Sender match**: campaigns whose healthy sender ids match the user-named
|
|
@@ -169,6 +184,30 @@ Source replenishment choices:
|
|
|
169
184
|
source prospects into the same campaign/source-list path, then confirm
|
|
170
185
|
readiness.
|
|
171
186
|
|
|
187
|
+
When reusing an existing source list on an already-large campaign, handle the
|
|
188
|
+
campaign-table row cap automatically in `--yolo` mode. If `confirm_lead_list`
|
|
189
|
+
fails with `USER_ADDED_ROWS_LIMIT_EXCEEDED`, parse `remainingRows`,
|
|
190
|
+
`currentRows`, `requestedRows`, and `maxRows`; do not stop just because the full
|
|
191
|
+
source list is too large. Instead, create a bounded same-source split:
|
|
192
|
+
|
|
193
|
+
1. choose a split size no larger than `remainingRows`, the two-day refill row
|
|
194
|
+
budget, and the first-pass processing cap unless the packet named a higher
|
|
195
|
+
cap;
|
|
196
|
+
2. read compact rows from the current `selectedLeadListId` with
|
|
197
|
+
`get_rows_minimal`;
|
|
198
|
+
3. create a temporary bounded LinkedIn profile source list with
|
|
199
|
+
`load_csv_linkedin_leads`, preserving useful source columns such as post URL,
|
|
200
|
+
post author, engagement type/text, keyword, confidence, and why;
|
|
201
|
+
4. call `confirm_lead_list` with that bounded source-list id, the same campaign
|
|
202
|
+
id, and `currentStep:"running"` for ACTIVE campaigns;
|
|
203
|
+
5. verify the campaign table row count and review batch with
|
|
204
|
+
`get_campaign_table_schema` before any prep/approval.
|
|
205
|
+
|
|
206
|
+
Do not use `add_on_demand_leads` or create an on-demand table as the automatic
|
|
207
|
+
regular-campaign fallback. The fallback must stay same-campaign and
|
|
208
|
+
source-list-backed.
|
|
209
|
+
Short form: row-cap fallback means bounded same-source split, not stop or on-demand.
|
|
210
|
+
|
|
172
211
|
### Running Campaign Signal Discovery Recovery
|
|
173
212
|
|
|
174
213
|
For an already-running regular campaign that needs same-campaign Signal
|
|
@@ -281,6 +320,16 @@ then use `select_campaign_cells` diagnostics against
|
|
|
281
320
|
`rowSelector:{ type:"reviewBatch" }` for `enrich`, `generateMessage`, and
|
|
282
321
|
`approved` roles when needed.
|
|
283
322
|
|
|
323
|
+
For bounded split refills, operate on the review batch first. Queue
|
|
324
|
+
`queue_campaign_cells` for `columnRole:"enrich"` on
|
|
325
|
+
`rowSelector:{ type:"reviewBatch" }`, wait for campaign processing, then queue
|
|
326
|
+
`columnRole:"generateMessage"` for the same review batch or
|
|
327
|
+
`needsGeneratedMessage` rows. If the bounded packet explicitly uses
|
|
328
|
+
`approvalMode:"approve"` because the user asked to fill/schedule sends or
|
|
329
|
+
provided `--yolo` for a two-day send fill, approve only the bounded review-batch
|
|
330
|
+
cohort after current generated messages exist. Do not broad approve existing
|
|
331
|
+
table rows.
|
|
332
|
+
|
|
284
333
|
If review-batch enrich cells are pending or Generate Message cells are
|
|
285
334
|
dependency-blocked, omit `maxRowsToCheck` so the adaptive prep job can cover the
|
|
286
335
|
bounded table scan, or set a bounded cap high enough to include appended rows
|