@sellable/mcp 0.1.379 → 0.1.381

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.
@@ -6,7 +6,7 @@ async function postSetupEvergreenCampaigns(body) {
6
6
  export const setupEvergreenCampaignsToolDefinitions = [
7
7
  {
8
8
  name: "setup_evergreen_campaigns",
9
- description: "Evergreen campaign setup plan/verify command. Use plan mode first to inspect exact workspace/sender/campaign/table/source state and receive immutable lane packets. `selectedSenderIds` is a legacy shorthand for both scopes; prefer `postEngagerSenderIds` for the Post Engagers sender scope and `sharedSenderIds` for the shared lane sender scope when they differ. If a protected existing Post Engagers campaign must stay unchanged and the operator requested only shared lane execution, pass postEngagerSenderIds:[] and sharedSenderIds; do not include the protected active Post Engagers lane as a reuse packet because it can make the yolo plan non-autoExecutable. The command plans one Post Engagers lane per post-engager sender plus shared Signal Discovery and Shared Cold Fallback lanes for the shared sender set. yolo is only a parent-skill auto-execution hint for safe lane packets; this backend command remains read-only in plan mode and verifies receipts in verify mode. Package-backed prompt authority: the installed public wrapper can be the local Codex skill entrypoint, but lane workers must use get_subskill_prompt and get_subskill_asset for nested `$sellable:create-campaign`, create-campaign-v2, generate-messages, validation, and assets; nested filesystem prompt fallback is a failed UAT. Use mcp__sellable only for workspace selection and product mutations/readbacks. Do not use mcp__sellable_admin, direct DB, Prisma, or SQL as execution proof. Worker-local replans are read-only drift checks and must preserve the exact parent sender scopes, including postEngagerSenderIds:[] when intentionally empty and the exact sharedSenderIds array; if scope, planRevision, actionId, or laneKey drifts, stop with blocked:worker_plan_scope_drift before mutation. Each lane packet includes workerDispatch with acceptedRuntimes, rejectedRuntimes, requiresVisibleThreadOrDurableReceipt, receiptArtifactHint, receiptRunId, and receiptMustBeWrittenAfter; pre-existing receipts at old deterministic paths are stale and must not be used, so stop with blocked:stale_receipt_artifact if the receipt was not freshly written for the current receiptRunId. `multi_agent_v1.spawn_agent`/opaque spawn_agent is not accepted for mutating command proof unless the parent has visible thread or durable receipt proof. In local Codex, prefer `codex_app.list_projects` then `codex_app.create_thread` with a local project target; do not create a worktree for lane execution. If Codex app thread tools are unavailable but local Codex CLI is available, use durable streaming workers with `codex -a never -s danger-full-access exec -C <repo> -o <worker-final-file> -`; approval and sandbox flags must appear before `exec`, and current customer CLI installs reject `codex exec --ask-for-approval never` and `codex exec -a never`. When safe-yolo needs normal setup work, the parent skill may ask for bounded delegated approval: one approval over the current planRevision, selected action ids, caps, allowed side-effect classes, and stop conditions lets lane workers execute without per-substep approval while staying inside that packet. In exec/automation mode, do not call request_user_input; if yolo plan autoExecutable:false and no interactive approval can be received, stop with blocked:bounded_approval_unavailable_in_exec_mode before any mutation. Lane workers must explicitly load and use the installed `$sellable:create-campaign` wrapper as the nested workflow entrypoint, then load `create-campaign-v2` and `create-campaign-v2/core/flow.v2.json`; they must execute creation, source import, create-campaign workflow steps, generate-messages, sequence attachment, pause_campaign review-state transition when the current table is still DRAFT, and review readiness through that existing create-campaign workflow/subskills, then return receipts here for verification. Customer-visible verify receipts must set status:'succeeded' or status:'completed'; status:'passed', status:'pass', and status:'passed_with_warnings' are rejected as primary success statuses. Receipts must include createCampaignStepReceipt with setupPlanCall, createCampaignWorkflowReceipt, campaignBriefReceipt, sourceDecisionReceipt, filterDecisionReceipt, messageDraftingReceipt, reviewBatchReceipt, sequenceReceipt, and verifyCall nested inside createCampaignStepReceipt; top-level-only copies of those objects are not enough and are not promoted by verify. setupPlanCall must use canonical keys: planRevision, actionId, laneKey, workspaceId, senderIds, campaignId, tableId, createIntent. Do not use laneActionId, lanePacketActionId, delegatedPlanRevision, delegatedActionId, or requestedCall text as a substitute for those canonical fields. createCampaignWorkflowReceipt must include skillCommand:'$sellable:create-campaign', skillName:'create-campaign', wrapperSkillLoaded:true, workflowPromptName:'create-campaign-v2', workflowPromptLoadedToHasMoreFalse:true, workflowAssetPath:'create-campaign-v2/core/flow.v2.json', workflowAssetLoaded:true, workerRuntime, workerThreadId or receiptArtifactPath, durableReceiptWritten when using a receipt file, and notAdHoc:true. messageDraftingReceipt must use exactly statusSource:'branch' or statusSource:'packaged-generate-messages-worker'; descriptive aliases such as statusSource:'package-readback-local-thread' are rejected. It must include proof that generate-messages was loaded, start_campaign_message_preparation/get_campaign_message_preparation_status ran when the packaged worker path is used, validationResult:'passed', a passed qualityReview, and at least 3 concrete sampleMessages with rowId, generatedMessageText, verdict, and issues; Do not substitute `message` for `generatedMessageText`; Do not substitute `passVerdict` for `verdict`. Before writing durable receipts, run a receipt self-check: top-level `planRevision`, `actionId`, `laneKey`, `laneType`, `workspaceId`, and `senderIds` must exist; if the self-check fails, fix the receipt before ending. Use start_campaign_message_preparation with approvalMode:\"mark_ready\" only for evergreen setup. Never call `start_campaign_message_preparation` with `approvalMode:\"approve\"`; approve exactly one semantic Approved cell through select_campaign_cells/update_cell and final proof must show approvedGeneratedMessageCount exactly 1. Shared Cold Fallback samples with a standalone name followed by 'Hey there' are rejected. This command does not launch campaigns, does not schedule sends, does not assign scheduler-owned send fields, does not raw-write campaign status, does not archive/delete cleanup targets, and does not spend paid credits.",
9
+ description: "Evergreen campaign setup plan/verify command. Use plan mode first to inspect exact workspace/sender/campaign/table/source state and receive immutable lane packets. `selectedSenderIds` is a legacy shorthand for both scopes; prefer `postEngagerSenderIds` for the Post Engagers sender scope and `sharedSenderIds` for the shared lane sender scope when they differ. If a protected existing Post Engagers campaign must stay unchanged and the operator requested only shared lane execution, pass postEngagerSenderIds:[] and sharedSenderIds; do not include the protected active Post Engagers lane as a reuse packet because it can make the yolo plan non-autoExecutable. The command plans one Post Engagers lane per post-engager sender plus shared Signal Discovery and Shared Cold Fallback lanes for the shared sender set. yolo is only a parent-skill auto-execution hint for safe lane packets; pass yolo only in plan mode and never include yolo on mode:\"verify\" calls. This backend command remains read-only in plan mode and verifies receipts in verify mode. Package-backed prompt authority: the installed public wrapper can be the local Codex skill entrypoint, but lane workers must use get_subskill_prompt and get_subskill_asset for nested `$sellable:create-campaign`, create-campaign-v2, generate-messages, validation, and assets; nested filesystem prompt fallback is a failed UAT. Use mcp__sellable only for workspace selection and product mutations/readbacks. Do not use mcp__sellable_admin, direct DB, Prisma, SQL, built-in web search, browser search, web.run, or any external browsing/search tool as execution or research proof; if Sellable MCP research tools are insufficient, write a blocked receipt instead of browsing externally. Worker-local replans are read-only drift checks and must preserve the exact parent sender scopes, including postEngagerSenderIds:[] when intentionally empty and the exact sharedSenderIds array; if scope, planRevision, actionId, or laneKey drifts, stop with blocked:worker_plan_scope_drift before mutation. Each lane packet includes workerDispatch with acceptedRuntimes, rejectedRuntimes, requiresVisibleThreadOrDurableReceipt, receiptArtifactHint, receiptRunId, and receiptMustBeWrittenAfter; pre-existing receipts at old deterministic paths are stale and must not be used, so stop with blocked:stale_receipt_artifact if the receipt was not freshly written for the current receiptRunId. `multi_agent_v1.spawn_agent`/opaque spawn_agent is not accepted for mutating command proof unless the parent has visible thread or durable receipt proof. In local Codex, prefer `codex_app.list_projects` then `codex_app.create_thread` with a local project target; do not create a worktree for lane execution. If Codex app thread tools are unavailable but local Codex CLI is available, use durable streaming workers with `codex -a never -s danger-full-access exec -C <repo> -o <worker-final-file> -`; approval and sandbox flags must appear before `exec`, and current customer CLI installs reject `codex exec --ask-for-approval never` and `codex exec -a never`. When safe-yolo needs normal setup work, the parent skill may ask for bounded delegated approval: one approval over the current planRevision, selected action ids, caps, allowed side-effect classes, and stop conditions lets lane workers execute without per-substep approval while staying inside that packet. In exec/automation mode, do not call request_user_input; if yolo plan autoExecutable:false and no interactive approval can be received, stop with blocked:bounded_approval_unavailable_in_exec_mode before any mutation. Lane workers must explicitly load and use the installed `$sellable:create-campaign` wrapper as the nested workflow entrypoint, then load `create-campaign-v2` and `create-campaign-v2/core/flow.v2.json`; they must execute creation, source import, create-campaign workflow steps, generate-messages, sequence attachment, pause_campaign review-state transition when the current table is still DRAFT, and review readiness through that existing create-campaign workflow/subskills, then return receipts here for verification. Customer-visible verify receipts must set status:'succeeded' or status:'completed'; status:'passed', status:'pass', and status:'passed_with_warnings' are rejected as primary success statuses. Receipts must include createCampaignStepReceipt with setupPlanCall, createCampaignWorkflowReceipt, campaignBriefReceipt, sourceDecisionReceipt, filterDecisionReceipt, messageDraftingReceipt, reviewBatchReceipt, sequenceReceipt, and verifyCall nested inside createCampaignStepReceipt; top-level-only copies of those objects are not enough and are not promoted by verify. setupPlanCall must use canonical keys: planRevision, actionId, laneKey, workspaceId, senderIds, campaignId, tableId, createIntent. Do not use laneActionId, lanePacketActionId, delegatedPlanRevision, delegatedActionId, or requestedCall text as a substitute for those canonical fields. createCampaignWorkflowReceipt must include skillCommand:'$sellable:create-campaign', skillName:'create-campaign', wrapperSkillLoaded:true, workflowPromptName:'create-campaign-v2', workflowPromptLoadedToHasMoreFalse:true, workflowAssetPath:'create-campaign-v2/core/flow.v2.json', workflowAssetLoaded:true, workerRuntime, workerThreadId or receiptArtifactPath, durableReceiptWritten when using a receipt file, and notAdHoc:true. messageDraftingReceipt must use exactly statusSource:'branch' or statusSource:'packaged-generate-messages-worker'; descriptive aliases such as statusSource:'package-readback-local-thread' are rejected. It must include proof that generate-messages was loaded, start_campaign_message_preparation/get_campaign_message_preparation_status ran when the packaged worker path is used, validationResult:'passed', a passed qualityReview, and at least 3 concrete sampleMessages with rowId, generatedMessageText, verdict, and issues; Do not substitute `message` for `generatedMessageText`; Do not substitute `passVerdict` for `verdict`. Before writing durable receipts, run a receipt self-check: top-level `planRevision`, `actionId`, `laneKey`, `laneType`, `workspaceId`, and `senderIds` must exist; if the self-check fails, fix the receipt before ending. Use start_campaign_message_preparation with approvalMode:\"mark_ready\" only for evergreen setup. Never call `start_campaign_message_preparation` with `approvalMode:\"approve\"`; approve exactly one semantic Approved cell through select_campaign_cells/update_cell and final proof must show approvedGeneratedMessageCount exactly 1. Shared Cold Fallback samples with a standalone name followed by 'Hey there' are rejected. This command does not launch campaigns, does not schedule sends, does not assign scheduler-owned send fields, does not raw-write campaign status, does not archive/delete cleanup targets, and does not spend paid credits.",
10
10
  inputSchema: {
11
11
  type: "object",
12
12
  properties: {
@@ -86,7 +86,7 @@ export const setupEvergreenCampaignsToolDefinitions = [
86
86
  export function setupEvergreenCampaigns(input) {
87
87
  return postSetupEvergreenCampaigns({
88
88
  mode: input.mode,
89
- yolo: input.yolo,
89
+ yolo: input.mode === "verify" ? undefined : input.yolo,
90
90
  depth: input.depth,
91
91
  allConnectedSenders: input.allConnectedSenders,
92
92
  selectedSenderIds: input.selectedSenderIds,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sellable/mcp",
3
- "version": "0.1.379",
3
+ "version": "0.1.381",
4
4
  "type": "module",
5
5
  "description": "Sellable MCP server for Claude Code and Codex campaign workflows",
6
6
  "main": "dist/index.js",
@@ -106,12 +106,19 @@ Short form: nested filesystem prompt fallback is a failed UAT.
106
106
  Package-backed tool surface: use `mcp__sellable` only for workspace selection,
107
107
  campaign/table/source/message mutations, and product-visible readbacks. Do not
108
108
  use `mcp__sellable_admin`, admin workspace setters, direct DB tools, Prisma, or
109
- SQL as part of command execution proof. Before any worker mutation, record
109
+ SQL as part of command execution proof. Do not use built-in web search,
110
+ browser search, `web.run`, or any external browsing/search tool for sender or
111
+ company research in this command; use Sellable MCP research tools such as
112
+ `get_sender`, `fetch_linkedin_profile`, `fetch_linkedin_posts`,
113
+ `fetch_company`, `fetch_company_posts`, and `complete_sender_research`. If those
114
+ MCP tools do not provide enough proof, write a blocked receipt with the missing
115
+ proof instead of browsing externally. Before any worker mutation, record
110
116
  normal-surface workspace proof with
111
117
  `set_active_workspace({ workspaceId, userConfirmed:true })` or the equivalent
112
118
  `mcp__sellable` call, then reread the active workspace.
113
119
  Short form: mcp__sellable only.
114
120
  Short form: Do not use `mcp__sellable_admin`.
121
+ Short form: Do not use web search or browser search.
115
122
 
116
123
  Plan shape:
117
124
 
@@ -331,31 +338,56 @@ not a parent-thread summary. The receipt must include:
331
338
  when using a receipt file, and `notAdHoc:true`.
332
339
  - `researchSenderReceipt`: `research-sender` prompt load proof,
333
340
  `complete_sender_research` result, sender LinkedIn identity basis, and the
334
- notes/proof counts used before the net-new `create_campaign` call.
341
+ notes/proof counts used before the net-new `create_campaign` call. It must
342
+ include canonical `promptLoadedToHasMoreFalse:true`,
343
+ `completeSenderResearch`, and either `senderLinkedinUrl`, non-empty
344
+ `senderIds`, or non-empty `senderIdentityBasis`, plus `identityBasis`.
335
345
  - `campaignBriefReceipt`: the CampaignOffer/campaign id, current
336
346
  workflowTableId, brief hash or updated-at marker, delivery format, token
337
- rules, hard avoids, source-use rules, and first-message template state.
347
+ rules, hard avoids, source-use rules, and first-message template state. If
348
+ the tool output uses `approvedFirstMessageTemplate`, copy it to canonical
349
+ `firstMessageTemplate`; if it uses `deliveryFormatIncluded`,
350
+ `tokenRulesIncluded`, `hardAvoidsIncluded`, or `sourceUseRulesIncluded`, copy
351
+ those to canonical `deliveryFormat`, `tokenRules`, `hardAvoids`, and
352
+ `sourceUseRules`.
338
353
  - `sourceDecisionReceipt`: selected source/list id, provider, cursor/inventory
339
354
  state, import/copy caps, explicit `dedupeDncProviderExclusions:true` or an
340
355
  equivalent exclusions object, row ids or row-count evidence (`rowCount`,
341
356
  `readyRowCount`, or `rowEvidence`), and the reason no colder source was used
342
- before the current source was proven exhausted or insufficient.
357
+ before the current source was proven exhausted or insufficient. If the raw
358
+ provider output uses `sourceProvider`, `sourceListId`, `reviewBatchRowIds`, or
359
+ `rationale`, copy them to canonical `provider`, `sourceId`/`sourceListId`,
360
+ `rowIdsHash`/`rowCount`, and `sourceLadderReason`.
343
361
  - `filterDecisionReceipt`: saved/applied filter ids or explicit skip-filter
344
362
  decision with current campaign/table basis.
345
363
  - `messageDraftingReceipt`: the Message Drafting proof described below,
346
- including packaged `generate-messages` prompt/assets and validation.
364
+ including packaged `generate-messages` prompt/assets and validation. Raw
365
+ fields like `generateMessagesPromptLoadedToHasMoreFalse`,
366
+ `requiredAssetsLoadedToHasMoreFalse`,
367
+ `validationPromptLoadedToHasMoreFalse`,
368
+ `get_campaign_message_preparation_status`, and
369
+ `waitForCampaignProcessingProof` are useful, but the receipt must also copy
370
+ them into canonical `promptLoadedToHasMoreFalse`, `requiredAssetsLoaded`,
371
+ `validationLoaded`, `reviewBatchRowHash`, and
372
+ `messageDraftRecommendation`.
347
373
  - `reviewBatchReceipt`: review-batch row ids/hash, generated row count,
348
374
  quality-valid route-proof row id when approved, and proof that no broad
349
375
  approve-all occurred.
350
376
  - `sequenceReceipt`: exact current workflowTableId, recommended non-paid
351
377
  sequence attach/precheck result, and readback showing `hasSequence:true` when
352
- completion is claimed.
378
+ completion is claimed. If the tool output uses
379
+ `attachRecommendedSequenceResult.actionTypes` or
380
+ `nonPaidRecommendedSequence`, copy them to canonical `actionTypes` and
381
+ `nonPaid`.
353
382
  - final paused-send proof: if the current campaign table is `DRAFT` after the
354
383
  sequence is attached, call the product `pause_campaign({ campaignId })`
355
384
  endpoint/tool to put the unlaunched campaign into `PAUSED` review state, then
356
385
  reread the campaign/table. Do not raw-write `campaignStatus`, do not start or
357
386
  launch, and do not schedule/send. Completion requires reread proof of
358
- `currentStep:"send"` and `campaignStatus:"PAUSED"`.
387
+ `currentStep:"send"` and `campaignStatus:"PAUSED"`. If the raw output nests
388
+ this in `finalCampaignRead` or `finalTableRead`, copy it to canonical
389
+ `finalPausedSendProof.currentStep` and
390
+ `finalPausedSendProof.campaignStatus`.
359
391
  - `verifyCall`: the exact `setup_evergreen_campaigns({ mode:"verify",
360
392
  planRevision, selectedActionIds, receipts })` call/result used before the
361
393
  parent reports completion.
@@ -370,7 +402,18 @@ substitute `message` for `generatedMessageText`. Do not substitute
370
402
  `passVerdict` for `verdict`. If the self-check fails, fix the receipt before
371
403
  ending; do not leave the parent to infer canonical fields from top-level
372
404
  aliases or narrative text.
405
+ Self-check shorthand: copy raw tool-output aliases into canonical receipt keys
406
+ before writing JSON; do not leave only raw objects like
407
+ `get_campaign_message_preparation_status`, `attachRecommendedSequenceResult`,
408
+ `finalCampaignRead`, or `finalTableRead`.
373
409
  Self-check shorthand: top-level `planRevision`, `actionId`, `laneKey`, `laneType`, `workspaceId`, and `senderIds` must exist before worker completion.
410
+ Self-check shorthand: `messageDraftingReceipt.promptLoadedToHasMoreFalse`,
411
+ `requiredAssetsLoaded`, `validationLoaded`, `reviewBatchRowHash`, and
412
+ `messageDraftRecommendation` must exist before worker completion.
413
+ Self-check shorthand: `reviewBatchReceipt.rowIdsHash`,
414
+ `reviewBatchReceipt.generatedCount`, `sequenceReceipt.actionTypes`,
415
+ `sequenceReceipt.nonPaid`, `finalPausedSendProof.currentStep`, and
416
+ `finalPausedSendProof.campaignStatus` must exist before worker completion.
374
417
  Self-check shorthand: `sampleMessages[]` must include `rowId`, `generatedMessageText`, `verdict`, and `issues`.
375
418
  Self-check shorthand: Do not substitute `message` for `generatedMessageText`.
376
419
  Self-check shorthand: Do not substitute `passVerdict` for `verdict`.
@@ -455,9 +498,8 @@ verification unless the same object also appears inside
455
498
  "selectedLeadListId": "<source/list id>",
456
499
  "reviewBatchRowHash": "<review row ids hash>",
457
500
  "messageDraftRecommendation": {"basis": "generate-messages"},
458
- "sampleMessages[].verdict": "pass",
459
501
  "sampleMessages": [
460
- {"rowId": "<row id>", "generatedMessageText": "<message>", "verdict": "pass"}
502
+ {"rowId": "<row id>", "generatedMessageText": "<message>", "verdict": "passed", "issues": []}
461
503
  ]
462
504
  },
463
505
  "reviewBatchReceipt": {
@@ -467,8 +509,6 @@ verification unless the same object also appears inside
467
509
  "sequenceReceipt": {
468
510
  "workflowTableId": "<workflow table id>",
469
511
  "hasSequence": true,
470
- "sequenceReceipt.actionTypes": ["send_invite"],
471
- "sequenceReceipt.nonPaid": true,
472
512
  "actionTypes": ["send_invite"],
473
513
  "nonPaid": true
474
514
  },
@@ -596,7 +636,8 @@ The parent then calls
596
636
  `setup_evergreen_campaigns({ mode:"verify", postEngagerSenderIds,
597
637
  sharedSenderIds, planRevision, selectedActionIds, receipts })` using the same
598
638
  sender scopes as the plan call and the original execution planRevision/actionIds,
599
- and reports only verified completion. A verify call without the same sender scopes can recompute an empty or different plan and is invalid proof. A verify call that uses a later reuse planRevision instead of the original execution planRevision is also invalid proof. Only after verify succeeds, rerun
639
+ and reports only verified completion. Do not include `yolo` in the verify call;
640
+ `yolo` is plan-mode only. A verify call without the same sender scopes can recompute an empty or different plan and is invalid proof. A verify call that uses a later reuse planRevision instead of the original execution planRevision is also invalid proof. Only after verify succeeds, rerun
600
641
  `setup_evergreen_campaigns({ mode:"plan", postEngagerSenderIds,
601
642
  sharedSenderIds, yolo:true })` without explicit campaign/table bindings. That
602
643
  idempotency rerun must return `intent:"reuse"` for every completed lane and no