@sellable/mcp 0.1.367 → 0.1.369

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. 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. 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. 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' and 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. 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, and notAdHoc:true. messageDraftingReceipt must use statusSource:'branch' or statusSource:'packaged-generate-messages-worker' and 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 row ids, generated message text, pass verdicts, and no issues; 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. 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. Each lane packet includes workerDispatch with acceptedRuntimes, rejectedRuntimes, requiresVisibleThreadOrDurableReceipt, and receiptArtifactHint; `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. 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. 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' and 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. 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 statusSource:'branch' or statusSource:'packaged-generate-messages-worker' and 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 row ids, generated message text, pass verdicts, and no issues; 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: {
@@ -75,7 +75,7 @@ export const setupEvergreenCampaignsToolDefinitions = [
75
75
  type: "array",
76
76
  maxItems: 20,
77
77
  items: { type: "object" },
78
- description: "Required for verify. Structured lane worker receipts from create-campaign/source/message/sequence execution. Customer-visible lanes must use status:'succeeded' or status:'completed' and include createCampaignStepReceipt with setupPlanCall, createCampaignWorkflowReceipt, campaignBriefReceipt, sourceDecisionReceipt, filterDecisionReceipt, messageDraftingReceipt, reviewBatchReceipt, sequenceReceipt, and verifyCall nested inside createCampaignStepReceipt. createCampaignWorkflowReceipt proves the lane worker loaded `$sellable:create-campaign`, `create-campaign-v2`, and `create-campaign-v2/core/flow.v2.json`; top-level-only proof copies are not enough.",
78
+ description: "Required for verify. Structured lane worker receipts from create-campaign/source/message/sequence execution. Customer-visible lanes must use status:'succeeded' or status:'completed' and include createCampaignStepReceipt with setupPlanCall, createCampaignWorkflowReceipt, campaignBriefReceipt, sourceDecisionReceipt, filterDecisionReceipt, messageDraftingReceipt, reviewBatchReceipt, sequenceReceipt, and verifyCall nested inside createCampaignStepReceipt. createCampaignWorkflowReceipt proves the lane worker loaded `$sellable:create-campaign`, `create-campaign-v2`, and `create-campaign-v2/core/flow.v2.json`; it must also include a visible workerThreadId or durable receiptArtifactPath with durableReceiptWritten:true. top-level-only proof copies are not enough.",
79
79
  },
80
80
  },
81
81
  required: [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sellable/mcp",
3
- "version": "0.1.367",
3
+ "version": "0.1.369",
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,38 @@ After bounded delegated approval or safe `--yolo`, fan out lane worker tasks
138
138
  only from the current plan. Each worker receives the complete lane packet:
139
139
  workspace id, sender ids, lane key/type, existing campaign/table binding or
140
140
  create intent, source hints, caps, planRevision, actionId, allowed side effects,
141
- and postconditions. Workers must explicitly load and use the installed visible
142
- `$sellable:create-campaign` wrapper as the nested workflow entrypoint, then load
143
- `create-campaign-v2` and `create-campaign-v2/core/flow.v2.json` through the
144
- packaged MCP prompt/asset loaders before campaign creation or repair. The
141
+ postconditions, and the packet's `workerDispatch` policy. Treat
142
+ `workerDispatch.requiresVisibleThreadOrDurableReceipt:true` as a hard
143
+ execution boundary, not guidance. Read and preserve `workerDispatch.acceptedRuntimes`,
144
+ `workerDispatch.rejectedRuntimes`, and `workerDispatch.receiptArtifactHint`
145
+ before dispatch.
146
+
147
+ Worker fan-out must use visible or durable execution. Preferred in local Codex
148
+ is a visible Codex thread created with `codex_app.create_thread`; the parent
149
+ must record the returned thread id, pass exactly one lane packet into that
150
+ thread, and require the worker to write the lane receipt at the artifact path
151
+ named by `workerDispatch.receiptArtifactHint`. A streaming worker or branch
152
+ worker is acceptable only when it writes a durable per-lane receipt artifact as
153
+ it works. `multi_agent_v1.spawn_agent`, raw `spawn_agent`, or any opaque
154
+ Task/subagent runtime that cannot expose a visible thread id or durable receipt
155
+ artifact is not accepted as command-level UAT proof and must not be used for
156
+ mutating evergreen setup.
157
+
158
+ Run this preflight before the first irreversible product mutation in any lane:
159
+ the parent must have recorded either a visible Codex thread id or a durable
160
+ `receiptArtifactPath` for that lane. If the runtime cannot provide this, stop
161
+ with `blocked: missing_visible_or_durable_lane_worker_runtime` before calling
162
+ `create_campaign`, `update_campaign`, `import_leads`, `confirm_lead_list`, or
163
+ any source/message/sequence mutation. Do not downgrade this to
164
+ `missing_parallel_lane_worker_runtime` when an opaque runtime exists: an
165
+ opaque runtime is still missing visible/durable proof. If a worker creates
166
+ partial product state without receipts, the run is blocked; created objects exist
167
+ is not equivalent to command completion.
168
+
169
+ Workers must explicitly load and use the installed visible
170
+ `$sellable:create-campaign` wrapper as the nested workflow entrypoint, then
171
+ load `create-campaign-v2` and `create-campaign-v2/core/flow.v2.json` through
172
+ the packaged MCP prompt/asset loaders before campaign creation or repair. The
145
173
  worker then uses that create-campaign workflow/subskills for campaign
146
174
  creation/setup, source/import, filter choice, Message Drafting, packaged
147
175
  `generate-messages`, sequence attachment, and send-review readiness. Do not
@@ -149,20 +177,23 @@ rebuild those steps ad hoc in the parent thread or from a copied receipt
149
177
  checklist. The parent thread is only the planner, dispatcher, verifier, and
150
178
  receipt collector: it must not call `create_campaign`, `import_leads`,
151
179
  `start_campaign_message_preparation`, `update_cell`, or sequence-attach tools
152
- for a lane that was assigned to a worker. When the host supports branch
153
- execution, Task/subagent, or separate Codex threads, assign one lane packet per
154
- worker and run the lane workers in parallel. If the host cannot run parallel
155
- workers, report `blocked: missing_parallel_lane_worker_runtime` instead of
156
- silently doing all lane creation sequentially in the parent thread.
180
+ for a lane that was assigned to a worker. When the host supports visible Codex
181
+ threads, branch execution with durable receipts, or a streaming durable worker,
182
+ assign one lane packet per worker and run the lane workers in parallel. If the
183
+ host cannot run parallel workers with visible/durable receipts, report
184
+ `blocked: missing_visible_or_durable_lane_worker_runtime` instead of silently
185
+ doing all lane creation sequentially in the parent thread.
157
186
  Short form: the parent thread is the planner, dispatcher, verifier, and receipt collector.
158
187
  Before the first mutating lane action, complete an execution-runtime preflight:
159
- name the callable worker surface/tool that will run lane packets (for example
160
- Task/subagent, branch worker, separate Codex thread, or an equivalent explicit
161
- worker runtime). If you cannot name a real callable worker runtime, stop with
162
- `blocked: missing_parallel_lane_worker_runtime` before calling
188
+ name the callable worker surface/tool that will run lane packets and the proof
189
+ it gives (`thread id`, `receiptArtifactPath`, or both). If you cannot name a
190
+ real callable visible/durable worker runtime, stop with
191
+ `blocked: missing_visible_or_durable_lane_worker_runtime` before calling
163
192
  `create_campaign`, `update_campaign`, `import_leads`, `confirm_lead_list`, or
164
193
  any source/message/sequence mutation. Creating campaign shells first and then
165
194
  discovering the worker runtime is missing is a failed run.
195
+ Legacy reports may mention `blocked: missing_parallel_lane_worker_runtime`;
196
+ for new command runs, use the visible/durable blocker above.
166
197
 
167
198
  For any lane with `intent:"create"`, the worker must satisfy the normal
168
199
  net-new create-campaign preflight before shell creation: load
@@ -187,7 +218,9 @@ not a parent-thread summary. The receipt must include:
187
218
  `workflowPromptName:"create-campaign-v2"`,
188
219
  `workflowPromptLoadedToHasMoreFalse:true`,
189
220
  `workflowAssetPath:"create-campaign-v2/core/flow.v2.json"`,
190
- `workflowAssetLoaded:true`, the real `workerRuntime`, and `notAdHoc:true`.
221
+ `workflowAssetLoaded:true`, the real `workerRuntime`, a visible
222
+ `workerThreadId` or durable `receiptArtifactPath`, `durableReceiptWritten:true`
223
+ when using a receipt file, and `notAdHoc:true`.
191
224
  - `researchSenderReceipt`: `research-sender` prompt load proof,
192
225
  `complete_sender_research` result, sender LinkedIn identity basis, and the
193
226
  notes/proof counts used before the net-new `create_campaign` call.
@@ -258,6 +291,9 @@ verification unless the same object also appears inside
258
291
  "workflowAssetPath": "create-campaign-v2/core/flow.v2.json",
259
292
  "workflowAssetLoaded": true,
260
293
  "workerRuntime": "separate-codex-thread",
294
+ "workerThreadId": "<visible local Codex thread id>",
295
+ "receiptArtifactPath": ".planning/artifacts/uat/69/lane-receipts/<planRevision>/<actionId>-<laneKey>.json",
296
+ "durableReceiptWritten": true,
261
297
  "notAdHoc": true
262
298
  },
263
299
  "campaignBriefReceipt": {
@@ -335,6 +371,12 @@ succeeds should the parent perform the idempotency rerun.
335
371
  If any required field is missing, report
336
372
  `blocked: missing_create_campaign_step_receipt` for that lane and do not call it
337
373
  complete.
374
+ If `createCampaignWorkflowReceipt.workerRuntime` is
375
+ `multi_agent_v1.spawn_agent`, `spawn_agent`, or another opaque worker runtime,
376
+ or if it lacks both `workerThreadId` and a durable receipt artifact proof, treat
377
+ the lane as `blocked: missing_create_campaign_step_receipt` with detail
378
+ `createCampaignWorkflowReceipt.workerRuntime.visible_or_durable`; do not call
379
+ verify and do not repair by summarizing product readback in the parent.
338
380
 
339
381
  Message Drafting runtime rule: the preferred proof source is the normal
340
382
  create-campaign branch handoff (`watchNarration.workerDetails.messageDraftBuilder`