@sellable/mcp 0.1.331 → 0.1.333

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.
@@ -1,6 +1,10 @@
1
1
  export interface WorkflowTableListItem {
2
2
  id: string;
3
3
  name: string;
4
+ workspaceId: string | null;
5
+ status: string | null;
6
+ campaignStatus: string | null;
7
+ dashboardBucket: "active" | "archived";
4
8
  type: string | null;
5
9
  campaignOfferId: string | null;
6
10
  campaignBacked: boolean;
@@ -6,7 +6,7 @@ import { getApi } from "../api.js";
6
6
  export const tableToolDefinitions = [
7
7
  {
8
8
  name: "list_tables",
9
- description: "List all workflow tables in the active workspace. Returns metadata including whether each table is campaign-backed and whether it has a sequence attached.\n\n" +
9
+ description: "List all workflow tables in the active workspace. Returns metadata including workspaceId, workflow status, campaignStatus, dashboardBucket, whether each table is campaign-backed, and whether it has a sequence attached.\n\n" +
10
10
  "Unlike get_campaigns, this lists every WorkflowTable regardless of how it was created, including create_workflow_table, create_on_demand_table, and UI-created tables.",
11
11
  inputSchema: {
12
12
  type: "object",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sellable/mcp",
3
- "version": "0.1.331",
3
+ "version": "0.1.333",
4
4
  "type": "module",
5
5
  "description": "Sellable MCP server for Claude Code and Codex campaign workflows",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: create-evergreen-campaigns
3
- description: Reconcile a sender team's evergreen campaign structure — create-or-reuse the standing campaigns (per-sender post engagers + shared fallback/source lanes) idempotently, with send-lane sequences and prospect-safe message briefs. Never duplicates, never launches. Schedule-automation friendly ("make sure evergreen campaigns exist for these users").
3
+ description: Reconcile a sender team's evergreen campaigns — create-or-reuse the standing campaigns (per-sender post engagers + shared signal/cold lanes) idempotently, and when asked for customer-ready/full setup, complete each customer-visible campaign to paused send review with brief, rows, generated review messages, one approval gate row, and sequence. Never duplicates, never launches.
4
4
  visibility: internal
5
5
  ---
6
6
 
@@ -10,7 +10,8 @@ visibility: internal
10
10
  You are a campaign structure reconciler. Evergreen campaigns are the standing
11
11
  always-on lanes every sender should have. Your job is to make reality match the
12
12
  plan — creating only what is missing, reusing everything that exists, and never
13
- producing duplicates. Reconcile/create-reuse only; this skill never launches campaigns.
13
+ producing duplicates. This skill never launches campaigns; customer-visible
14
+ completion stops at paused send review.
14
15
  </role>
15
16
 
16
17
  <inputs>
@@ -22,8 +23,22 @@ run without user input, or similar, run in **automation mode**:
22
23
  - Do not ask the user to confirm templates, delivery format, or sample output.
23
24
  - Reconcile structure and record any template/config polish as `created`,
24
25
  `reused`, `repaired`, `flagged`, or `blocked`.
25
- - Apply only safe metadata repairs that do not create rows, generate messages,
26
- approve rows, launch campaigns, send messages, or spend paid InMail.
26
+ - Choose the automation depth from the invoking prompt:
27
+ - **Structure-only reconcile** is for heartbeat prompts that only say to
28
+ ensure slots exist. It may create/reuse shells and apply metadata repairs,
29
+ but it does not create rows, generate messages, approve rows, or attach new
30
+ send work.
31
+ - **Customer-visible completion** is required when the prompt says full
32
+ campaign, customer-ready, send-review-ready, went through
33
+ `$sellable:create-campaign`, fill out, approve one, only needs enrich and
34
+ approve more, or similar. For every dashboard campaign card in that mode,
35
+ mirror the create-campaign completion path: brief -> source rows -> filter
36
+ decision -> Message Drafting -> first review batch -> generated messages ->
37
+ sender/settings validation -> recommended sequence -> `currentStep:"send"`.
38
+ This mode may create/copy bounded rows, generate review messages, approve
39
+ exactly one quality-valid route-proof row when needed, and attach the
40
+ recommended sequence, but it still must not launch campaigns, schedule
41
+ sends, send messages, or spend paid InMail.
27
42
 
28
43
  If the invoking prompt explicitly asks for interactive message polish or sample
29
44
  proof, run in **interactive polish mode** and use the confirmation/sample steps
@@ -32,12 +47,12 @@ below.
32
47
  Default evergreen plan per workspace (override only if the prompt specifies different lanes):
33
48
 
34
49
  1. **`<Sender Name> - Post Engagers`** — one per sender (warm lane, highest priority)
35
- 2. **`<Workspace/Team> - Shared Signal Discovery`** — one shared source lane across senders
36
- 3. **`<Workspace/Team> - Shared Cold Fallback`** — one shared source/fallback lane across senders
50
+ 2. **`<Workspace/Team> - Shared Signal Discovery`** — one shared warm-signal campaign lane across senders
51
+ 3. **`<Workspace/Team> - Shared Cold Fallback`** — one shared cold/fallback campaign lane across senders
37
52
  </inputs>
38
53
 
39
54
  <objective>
40
- 1. **Inventory first**: `get_campaigns` + `list_tables` + `get_campaign_waterfall` in the active workspace. Treat `list_tables` and the managed waterfall as authoritative for older managed slots; `get_campaigns` is a recent campaign page and may miss canonical evergreen lanes. Match existing campaigns/tables/waterfall slots to the plan by name (case-insensitive, ignore suffixes like "(Copy)") and stored slot identity. A matching non-archived campaign/table/waterfall slot = REUSE; record it and move on. Never create a second campaign for a slot that already has one in any of those inventories.
55
+ 1. **Inventory first**: `get_campaigns` + `list_tables` + `get_campaign_waterfall` in the active workspace. Treat `list_tables` and the managed waterfall as authoritative for older managed slots; `get_campaigns` is a recent campaign page and may miss canonical evergreen lanes. Match existing campaigns/tables/waterfall slots to the plan by name (case-insensitive, ignore suffixes like "(Copy)") and stored slot identity. `list_tables.campaignStatus` and `list_tables.dashboardBucket` are part of the identity check: a matching `ARCHIVED` table/campaign is not a plain `REUSE`. If it is the canonical prod slot and the invocation explicitly allows dashboard visibility repair, repair it to `PAUSED`; otherwise mark it `flagged`/`blocked` and do not create a duplicate. A matching non-archived campaign/table/waterfall slot = REUSE; record it and move on. Never create a second campaign for a slot that already has one in any of those inventories.
41
56
  2. **Create only the missing slots** with `create_on_demand_campaign({ name, senderIds, campaignBrief })`:
42
57
  - Post Engagers lanes: that sender's ID only. Shared lanes: all the senders' IDs.
43
58
  - The brief must include the warm post-engager first-message template style — short, casual, references the post they engaged with, closed question, **no internal vocabulary, no pitch, no meeting ask** in message one:
@@ -55,29 +70,76 @@ Default evergreen plan per workspace (override only if the prompt specifies diff
55
70
  - **InMail lanes can never be multiline**: an InMail is one message and the recipient must reply before anything else can be sent. InMail-bound templates must read as one cohesive message — declare `Delivery format: single message (InMail — no follow-up until reply)` and never structure the copy to depend on multi-message pacing.
56
71
 
57
72
  - The sequence is auto-selected by sender tier; do not hand-author sequence templates here. Never select a paid-InMail template.
58
- 3. **Verify each slot** after create/reuse/repair:
73
+ 3. **Customer-Visible Completion Contract**: a named evergreen lane that appears
74
+ as a campaign card or campaign-backed table is not done when the shell exists.
75
+ It is done only when the customer can open the campaign and land on final
76
+ send review with all setup state present:
77
+ - `currentStep:"send"`.
78
+ - The linked workflow table has `campaignStatus:"PAUSED"`; `ACTIVE` means
79
+ already launched and must be reported separately, and `ARCHIVED` must be
80
+ repaired only when the prompt explicitly allows dashboard visibility repair.
81
+ - A full campaign brief exists, including delivery format, token rules,
82
+ hard avoids, source-use rules, and the approved first-message template.
83
+ - A source/list decision has been resolved and campaign rows are loaded. If
84
+ there is no approved source or no rows can be copied, report `blocked` with
85
+ the missing source detail; do not call the campaign complete.
86
+ - The filter step is resolved: either saved/applied filters are present, or
87
+ the campaign explicitly skipped filters. Do not leave customer-visible
88
+ campaigns at `filter-choice`, `filter-rules`, or `apply-icp-rubric` and
89
+ report success.
90
+ - Message Drafting has run from the current campaign/table basis, using the
91
+ create-campaign message prompt/assets and validation gate. Updating
92
+ `currentStep:"messages"` is not proof. Parent-thread handwritten copy is
93
+ not a substitute.
94
+ - The first review batch exists and at least 3 review rows have generated
95
+ messages from the approved brief. If fewer than 3 usable rows exist, report
96
+ the actual count and why.
97
+ - At least one generated row is approved as a route-proof gate. If zero rows
98
+ are approved and the prompt explicitly asked for full/customer-ready
99
+ completion, approve exactly one quality-valid generated row. If one or more
100
+ rows are already approved, do not add more approvals during evergreen
101
+ completion. Never broad approve all rows.
102
+ - The recommended non-paid sequence is attached, and the watched campaign is
103
+ on Send. Use `attach_recommended_sequence({ campaignId, currentStep:"send" })`
104
+ when a safe attach is needed. Existing sequence proof may come from
105
+ `SEQUENCE_EXISTS`; do not replace it without explicit user confirmation.
106
+ - No scheduled, queued outbound, sent outbound, campaign launch, or paid
107
+ InMail spend is created by this skill.
108
+ 4. **Verify each slot** after create/reuse/repair:
59
109
  - `get_campaign` shows the campaign exists, remains unlaunched, and has the expected workflow table.
110
+ - Builder truth must match dashboard truth. `currentStep:"running"` is valid only when the linked table has `campaignStatus:"ACTIVE"`. For a `PAUSED` or `ARCHIVED` campaign/table, repair or flag stale `currentStep:"running"` back to launch review (`send` / review-ready) before reporting the slot done. Never call `start_campaign` just to make a stale `running` step true.
60
111
  - Send/action lanes such as Post Engagers have a sequence attached. Use `list_tables({ hasSequence: true })` as a quick cross-check, but do not treat that filter as the only proof. If the canonical campaign/table is missing from the sequence-filtered table list but a safe `attach_recommended_sequence({ campaignId })` repair/precheck returns `SEQUENCE_EXISTS`, record `sequence attached (verified by SEQUENCE_EXISTS precheck; list_tables.hasSequence mismatch)` and do not retry.
61
112
  - Only use `attach_recommended_sequence({ campaignId })` for a send-lane sequence repair/precheck when the target is a canonical prod slot and the invoking prompt allows sequence repair. Call it at most once without `confirmed`; a successful response is `repaired`, and `SEQUENCE_EXISTS` is non-mutating proof that a sequence already exists. Never call `attach_recommended_sequence` or `attach_sequence` with `confirmed:true` in evergreen automation unless the user explicitly asks to replace an existing sequence.
62
- - Source-only shared lanes may legitimately have `hasSequence:false` when they only supply rows through the managed waterfall. For those, verify the active waterfall linkage, table ID, campaign ID, source type, and priority; report `source-only/no sequence expected` instead of repairing or duplicating.
63
- 4. **Interactive polish mode only: confirm the message template with the user — and check it reads chat-native.** Show the exact first-message template each created campaign's brief carries and ask the user to confirm or adjust it before moving on. Because DM copy may send paragraph-by-paragraph (each blank-line block becomes its own message), every paragraph must read like something a human literally typed as a separate chat message:
113
+ - Do not report `source-only/no sequence expected` for any named evergreen
114
+ campaign that appears in Campaigns, has a CampaignOffer ID, or is backed by
115
+ a campaign dashboard table. Shared Signal Discovery and Shared Cold
116
+ Fallback campaign cards are still customer-visible campaigns and must
117
+ satisfy the Customer-Visible Completion Contract when the prompt asks for
118
+ full/customer-ready completion.
119
+ - Source-only shared lanes are allowed only for explicitly internal waterfall
120
+ inventory objects that are not represented as campaign cards. For those
121
+ internal-only objects, verify the active waterfall linkage, table ID,
122
+ source type, and priority, and label them `internal source pool` rather
123
+ than treating them as completed campaigns.
124
+ - Post Engagers lanes are sender-owned source lanes. The selected/source LinkedIn posts must be authored by that exact sender (for example, Thomas post-engager source posts must visibly be Thomas-authored posts). If selected/source posts include another person or company author, mark the slot `blocked`/`flagged` for source repair; do not scrape/import engagers or report completion until the source is sender-owned. Shared Signal Discovery lanes are the only evergreen lanes allowed to mix authors.
125
+ 5. **Interactive polish mode only: confirm the message template with the user — and check it reads chat-native.** Show the exact first-message template each created campaign's brief carries and ask the user to confirm or adjust it before moving on. Because DM copy may send paragraph-by-paragraph (each blank-line block becomes its own message), every paragraph must read like something a human literally typed as a separate chat message:
64
126
  - **No letter punctuation.** `Hey {{first_name}}` — never `Hey {{first_name}},` (nobody types a trailing comma and hits send). No `Dear`, no sign-offs, no `Best,`.
65
127
  - Each paragraph stands alone as a message — short, lowercase-casual is fine, sentence fragments are fine.
66
128
  - No paragraph should depend on letter formatting (no "As I mentioned above" referencing layout).
67
129
  If the template violates these, propose the chat-native version and ask; on approval, update the brief via `update_campaign_brief` and show the final version.
68
130
 
69
131
  **Also confirm the delivery format and keep config in sync.** Ask the user whether DM lanes should send multiline (paragraph-per-message) or as a single message. Record the answer as the brief's `Delivery format:` line, and when multiline is chosen, set `actionConfig.sendEachParagraphAsMessage: true` on that campaign's `send_dm` column via `update_column` (config edits run no cells and nothing sends from unlaunched campaigns). Never set the paragraph-split flag on InMail columns — the option does not apply to InMail.
70
- 5. **Interactive polish mode only: prove the template on one real row.** For ONE campaign that has at least one lead row (add one via `add_on_demand_leads` if every lane is empty and the user provides/approves a test lead), generate a message for exactly one row (`queue_campaign_cells` with `columnRole: "generateMessage"`, `rowSelector: { type: "reviewBatch", limit: 1 }` or the single row's ID), wait for it, then show the user the generated message next to the template — AND show how it would split if paragraph-per-message sending is enabled (list each paragraph as `msg 1:`, `msg 2:`, …) so the user confirms each one reads like a real typed message. Check alignment: tone, structure, no internal vocabulary, correct token substitution, no letter punctuation. Do NOT approve the row or generate for more rows — one sample only.
71
- 6. **Automation mode template/config audit**: inspect existing send-lane briefs for a `Delivery format:` line and chat-native warm template. If a send lane is missing the line and the prompt allows cleanup, update only the campaign brief metadata with the safest default for that lane (`Delivery format: single message (LinkedIn DM; line breaks remain inside one generated message; no follow-up until reply)`). If cleanup is not allowed, flag it. Do not generate a sample row in automation mode unless the invocation explicitly asks for sample proof.
72
- 7. **Report the reconcile plan and result** — every slot tagged `reused`, `created`, `repaired`, `flagged`, or `blocked`, plus template/sample details only when that mode ran:
132
+ 6. **Interactive polish mode only: prove the template on one real row.** For ONE campaign that has at least one lead row (add one via `add_on_demand_leads` if every lane is empty and the user provides/approves a test lead), generate a message for exactly one row (`queue_campaign_cells` with `columnRole: "generateMessage"`, `rowSelector: { type: "reviewBatch", limit: 1 }` or the single row's ID), wait for it, then show the user the generated message next to the template — AND show how it would split if paragraph-per-message sending is enabled (list each paragraph as `msg 1:`, `msg 2:`, …) so the user confirms each one reads like a real typed message. Check alignment: tone, structure, no internal vocabulary, correct token substitution, no letter punctuation. Do NOT approve the row or generate for more rows — one sample only.
133
+ 7. **Automation mode template/config audit**: inspect existing send-lane briefs for a `Delivery format:` line and chat-native warm template. If a send lane is missing the line and the prompt allows cleanup, update only the campaign brief metadata with the safest default for that lane (`Delivery format: single message (LinkedIn DM; line breaks remain inside one generated message; no follow-up until reply)`). If cleanup is not allowed, flag it. In structure-only automation, do not generate a sample row unless the invocation explicitly asks for sample proof. In customer-visible completion, follow the Customer-Visible Completion Contract instead.
134
+ 8. **Report the reconcile plan and result** — every slot tagged `reused`, `created`, `repaired`, `flagged`, or `blocked`, plus template/sample details only when that mode ran:
73
135
 
74
136
  ```
75
137
  Evergreen Reconcile — {date}
76
- • Christian Reyes - Post Engagers: reused (18 rows, sequence attached)
77
- • Thomas Nobbs - Post Engagers: reused (8 rows, sequence attached)
78
- • Sellable.dev - Shared Signal Discovery: reused (source-only/no sequence expected)
79
- • Sellable.dev - Shared Cold Fallback: created (source-only/no sequence expected)
80
- All campaigns remain unlaunched. Next: refresh-sender-engagement to supply the warm lanes, then fill-send-horizon.
138
+ • Christian Reyes - Post Engagers: reused (send review ready; 18 rows, 3 generated, 1 approved gate row, sequence attached, paused)
139
+ • Thomas Nobbs - Post Engagers: reused (send review ready; 8 rows, 3 generated, 1 approved gate row, sequence attached, paused)
140
+ • Sellable.dev - Shared Signal Discovery: repaired (send review ready; 50 rows, 3 generated, 1 approved gate row, sequence attached, paused)
141
+ • Sellable.dev - Shared Cold Fallback: created (send review ready; 50 rows, 3 generated, 1 approved gate row, sequence attached, paused)
142
+ All campaigns remain unlaunched. Next: enrich/approve more rows when you want more items ready to schedule.
81
143
  ```
82
144
  </objective>
83
145