@sellable/mcp 0.1.132 → 0.1.133

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.
@@ -190,7 +190,7 @@ export const campaignToolDefinitions = [
190
190
  },
191
191
  watchNarration: {
192
192
  type: "object",
193
- description: "Single structured watch-guide narration object to send with currentStep changes. Include stage, headline, visibleState, agentIntent, and nextAction so the browser guide mirrors Codex progress.",
193
+ description: "Single structured watch-guide narration object to send with currentStep changes. Include what just happened, what the browser is showing now, what Codex is doing next, and nextAction so the browser guide mirrors Codex progress.",
194
194
  properties: {
195
195
  stage: {
196
196
  type: "string",
@@ -211,7 +211,13 @@ export const campaignToolDefinitions = [
211
211
  blockedReason: { type: ["string", "null"] },
212
212
  workerStatuses: { type: "object" },
213
213
  },
214
- required: ["stage", "headline", "visibleState", "agentIntent"],
214
+ required: [
215
+ "stage",
216
+ "headline",
217
+ "visibleState",
218
+ "agentIntent",
219
+ "nextAction",
220
+ ],
215
221
  },
216
222
  leadSourceType: {
217
223
  type: ["string", "null"],
@@ -283,7 +289,7 @@ export const campaignToolDefinitions = [
283
289
  },
284
290
  watchNarration: {
285
291
  type: "object",
286
- description: "Single structured watch-guide narration object to send with currentStep changes. Include stage, headline, visibleState, agentIntent, and nextAction so the browser guide mirrors Codex progress. Do not send separate guideHeadline/guideBody fields.",
292
+ description: "Single structured watch-guide narration object to send with currentStep changes. Include what just happened, what the browser is showing now, what Codex is doing next, and nextAction so the browser guide mirrors Codex progress. Do not send separate guideHeadline/guideBody fields.",
287
293
  properties: {
288
294
  stage: {
289
295
  type: "string",
@@ -304,7 +310,13 @@ export const campaignToolDefinitions = [
304
310
  blockedReason: { type: ["string", "null"] },
305
311
  workerStatuses: { type: "object" },
306
312
  },
307
- required: ["stage", "headline", "visibleState", "agentIntent"],
313
+ required: [
314
+ "stage",
315
+ "headline",
316
+ "visibleState",
317
+ "agentIntent",
318
+ "nextAction",
319
+ ],
308
320
  },
309
321
  interactionMode: {
310
322
  type: "string",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sellable/mcp",
3
- "version": "0.1.132",
3
+ "version": "0.1.133",
4
4
  "type": "module",
5
5
  "description": "Sellable MCP server for Claude Code and Codex campaign workflows",
6
6
  "main": "dist/index.js",
@@ -93,11 +93,15 @@ Optional debug/UAT draft directory, disabled in normal customer runs:
93
93
  campaign. If shell creation fails, stop and surface the error. There is no
94
94
  no-shell mint fallback in the active shell-first flow.
95
95
  - The main thread owns watch navigation. Before expensive work in each major
96
- stage, call `update_campaign({ campaignId, currentStep })` with the visible UI
97
- step the user should be watching, then continue the work from MCP/product
98
- state. Use `create-offer` for the brief, `pick-provider` or the selected
99
- provider step while sourcing, `filter-choice` after the 15-row review batch is
100
- imported, `messages`/`auto-execute-messaging` for message work,
96
+ stage, call `update_campaign({ campaignId, currentStep, watchNarration })`
97
+ with the visible UI step the user should be watching, then continue the work
98
+ from MCP/product state. Every currentStep switch in a watched run must refresh
99
+ `watchNarration` in the same visible beat. The copy must say what just
100
+ happened, what the browser is showing now, what Codex is doing next, and what
101
+ the user should do next. Use `create-offer` for the brief, `pick-provider` or
102
+ the selected provider step while sourcing, `filter-choice` after the 15-row
103
+ review batch is imported, `apply-icp-rubric` while template approval is
104
+ pending on Filter Leads, `auto-execute-messaging` for approved message work,
101
105
  `awaiting-user-greenlight` for Settings, and `validate-sample` only for
102
106
  recovery/legacy validation if reached. Do not advance `currentStep` backward.
103
107
  - After the shell is minted, normal resume paths read the CampaignOffer first.
@@ -8,6 +8,30 @@
8
8
  "requiredArtifactsApplyWhen": "legacy resume, fixture validation, or explicit debug/UAT mode only",
9
9
  "customerFacingAccess": "Watch link, live campaign currentStep, and concise watchNarration"
10
10
  },
11
+ "watchNarrationTransitionContract": {
12
+ "rule": "Every watched currentStep switch must update watchNarration in the same visible beat. The narration must clearly say what just happened, what page or state the browser is showing now, what Codex is doing next, and what the user should do next. Do not persist optimistic future-step copy; if the step cannot be shown yet, keep the previous currentStep and narrate the current work instead.",
13
+ "requiredFields": [
14
+ "stage",
15
+ "headline",
16
+ "visibleState",
17
+ "agentIntent",
18
+ "nextAction"
19
+ ],
20
+ "copyMustInclude": [
21
+ "what just happened",
22
+ "current visible page/state",
23
+ "next user action",
24
+ "safety boundary when work is gated"
25
+ ],
26
+ "appliesToTools": [
27
+ "create_campaign",
28
+ "update_campaign",
29
+ "update_campaign_brief when it unlocks a step",
30
+ "attach_selected_sender",
31
+ "attach_recommended_sequence",
32
+ "start_campaign"
33
+ ]
34
+ },
11
35
  "commitGateChoices": [
12
36
  "approve",
13
37
  "revise-brief",
@@ -1252,6 +1276,7 @@
1252
1276
  }
1253
1277
  ],
1254
1278
  "earlyMessageStartRule": "After auto-execute-leads confirms the 15-row review batch, workflowTableId is ready, and get_rows_minimal proves rows exist, the Message Draft Builder must start immediately from campaignBrief, selected source state, selectedLeadListId, and imported campaign table rows. post-lead-workstreams must reuse that in-flight message branch; if it is missing, launch it before saving rubrics or claiming message progress. This background template draft is provisional speed work only. The message worker must load the full generate-messages prompt; parent-thread fallback loads the same prompt and may use references/message-review-safety-gate.md only as a supplemental approval checklist. It may run beside filter-leads, but no enrichment, ICP scoring, filtering, or product Generate Message cells can queue until save_rubrics and update_campaign_brief both succeed.",
1279
+ "workerStatusContract": "Only show Lead Fit Builder or Message Draft Builder as In Progress when a Task/spawn_agent branch actually started and returned a live branch id, or when the parent-thread fallback is actively doing that branch before the next user-visible step. If a branch is completed in the parent thread, show it as Ready. After update_campaign_brief saves the approved template, Message Draft Builder is Ready even if row-level Generate Message cells have not completed.",
1255
1280
  "finalMessageReconcileRule": "The message recommendation may start before lead-filter.md exists, but before message-review it must cite only imported review-batch rows that still pass the saved rubric/filter results. If the selected winner depends on a row later excluded by saved filters, revise message-generation before message review.",
1256
1281
  "finalTemplateReviewLockRule": "template review does not require a Use Template vs AI Generated mode choice. After filters are enabled, lock template review until saved rubrics exist and the draft reconciles to the approved brief, selected source, and imported review batch. Keep the watched browser on Filter Leads while approval is pending. After approval writes the Approved Message Template into campaignBrief, queue enrichment/ICP scoring for the bounded review batch; prefer at least 2 usable passing/probably passing rows before moving the watched browser to Messages, with weak-sample escalation if only 1 passes.",
1257
1282
  "claudeRule": "In Claude Code, launch the returned message-generation scout immediately after post-import rows exist, then launch/reuse the filter-leads scout when the user chooses filters. When both named agents are available and both branches are ready in the same assistant message, use Task/Agent subagents in parallel; otherwise never claim background message progress until message-generation actually started.",
@@ -1566,7 +1591,7 @@
1566
1591
  {
1567
1592
  "action": "run_or_reconcile_subskill",
1568
1593
  "target": "generate-messages",
1569
- "mode": "DRY MODE",
1594
+ "mode": "approved_template_builder",
1570
1595
  "sampleSource": "imported review-batch rows from selectedLeadListId",
1571
1596
  "toolCallRequiredBeforeArtifacts": [
1572
1597
  "get_subskill_prompt({ subskillName: \"generate-messages\", offset, limit }) until hasMore=false",
@@ -1787,6 +1812,25 @@
1787
1812
  "requiredBeforeCascade": true,
1788
1813
  "writesCampaignState": "campaignBrief.Approved Message Template"
1789
1814
  },
1815
+ {
1816
+ "action": "advance_watch_after_template_saved_before_cascade",
1817
+ "tool": "update_campaign",
1818
+ "requires": [
1819
+ "campaignId",
1820
+ "campaignBrief.Approved Message Template",
1821
+ "leadScoringRubrics"
1822
+ ],
1823
+ "requiredValues": {
1824
+ "currentStep": "apply-icp-rubric",
1825
+ "enableICPFilters": true,
1826
+ "watchNarration.stage": "fit-message",
1827
+ "watchNarration.headline": "Template saved",
1828
+ "watchNarration.workerStatuses.leadFitBuilder": "ready",
1829
+ "watchNarration.workerStatuses.messageDraftBuilder": "ready"
1830
+ },
1831
+ "when": "immediately_after_update_campaign_brief_succeeds_before_get_rows_or_queue_cells",
1832
+ "watchNarrationRule": "Say the approved message template was saved into the campaign brief, the browser is staying on Filter Leads, and Codex is now queueing only the bounded review-batch enrichment/ICP scoring cascade. The Message Draft Builder must be shown as Ready, not In Progress, after this point."
1833
+ },
1790
1834
  {
1791
1835
  "tool": "get_rows_minimal",
1792
1836
  "purpose": "read_bounded_review_batch_cell_ids_after_message_approval",
@@ -2480,7 +2524,8 @@
2480
2524
  "requiredValues": {
2481
2525
  "currentStep": "awaiting-user-greenlight",
2482
2526
  "watchNarration.stage": "review-ready"
2483
- }
2527
+ },
2528
+ "watchNarrationRule": "Say the approved-template cascade has produced reviewable messages and the browser is moving to Settings. Include what just happened, that Settings is now visible for sender selection, and that nothing launches until the user greenlights the final send."
2484
2529
  }
2485
2530
  ],
2486
2531
  "allowedTools": [
@@ -2536,9 +2581,11 @@
2536
2581
  {
2537
2582
  "tool": "update_campaign",
2538
2583
  "requiredValues": {
2539
- "currentStep": "settings"
2584
+ "currentStep": "settings",
2585
+ "watchNarration.stage": "review-ready"
2540
2586
  },
2541
- "purpose": "park the watched UI on Settings before sender selection"
2587
+ "purpose": "park the watched UI on Settings before sender selection",
2588
+ "watchNarrationRule": "Say message review is complete and the browser is now on Settings so the user can connect or choose a sender. Include the safety boundary that no launch happens from Settings."
2542
2589
  },
2543
2590
  {
2544
2591
  "tool": "get_campaign_navigation_state",
@@ -2576,8 +2623,10 @@
2576
2623
  "senderIds": [
2577
2624
  "{selectedSenderId}"
2578
2625
  ],
2579
- "currentStep": "sequence"
2580
- }
2626
+ "currentStep": "sequence",
2627
+ "watchNarration.stage": "review-ready"
2628
+ },
2629
+ "watchNarrationRule": "Say the sender was attached and the browser is moving to Sequence. Explain that Codex is binding the recommended sequence next and that launch still needs explicit greenlight."
2581
2630
  },
2582
2631
  {
2583
2632
  "tool": "get_campaign_navigation_state",
@@ -2591,15 +2640,18 @@
2591
2640
  "campaignId": "{campaignId}",
2592
2641
  "currentStep": "send"
2593
2642
  },
2594
- "purpose": "bind the tier-aware recommended sequence before the launch decision"
2643
+ "purpose": "bind the tier-aware recommended sequence before the launch decision",
2644
+ "watchNarrationRule": "The sequence tool may persist currentStep. If it does, the same visible beat must still explain that the recommended sequence is attached and Send is next; otherwise follow with update_campaign and watchNarration before asking for launch greenlight."
2595
2645
  },
2596
2646
  {
2597
2647
  "tool": "update_campaign",
2598
- "when": "sequence attach response does not persist currentStep",
2648
+ "when": "after recommended sequence attach; required if sequence attach did not persist watchNarration with currentStep",
2599
2649
  "requiredValues": {
2600
- "currentStep": "send"
2650
+ "currentStep": "send",
2651
+ "watchNarration.stage": "review-ready"
2601
2652
  },
2602
- "purpose": "show the Send tab once sender and sequence are ready"
2653
+ "purpose": "show the Send tab once sender and sequence are ready",
2654
+ "watchNarrationRule": "Say the sender and sequence are ready and the browser is now on Send. The next action is the final launch greenlight; do not imply anything has sent yet."
2603
2655
  },
2604
2656
  {
2605
2657
  "tool": "get_campaign_navigation_state",
@@ -2720,7 +2772,8 @@
2720
2772
  "requiredFields": [
2721
2773
  "campaignId"
2722
2774
  ],
2723
- "persistsCurrentStep": "running"
2775
+ "persistsCurrentStep": "running",
2776
+ "watchNarrationRule": "After start_campaign succeeds, the running state must say the final greenlight was accepted, the campaign is now live/running, and the user can watch progress from the campaign."
2724
2777
  },
2725
2778
  {
2726
2779
  "action": "surface_watch_link",
@@ -28,6 +28,9 @@ stage labels. The driver label comes from the watch URL mode (`mode=claude` or
28
28
  - One primary user action per frame.
29
29
  - Headline under 8 words.
30
30
  - Body is 1-2 short sentences total.
31
+ - Every watched step switch must refresh `watchNarration` with current-tense
32
+ copy that says what just happened, what the browser is showing now, what
33
+ Codex is doing next, and what the user should do next.
31
34
  - Say where the user acts: usually `in Claude Code`, `in Codex`, or `in chat`,
32
35
  matching the host that created the watch URL.
33
36
  - `Find Leads` is only the static progress label. The copy must name the active