@sellable/install 0.1.153 → 0.1.154

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/README.md CHANGED
@@ -56,16 +56,13 @@ Auth is stored once at:
56
56
  ```
57
57
 
58
58
  Claude Code and Codex are configured to launch the same packaged MCP server. The
59
- installer also writes Sellable source-scout agents for both hosts from the
60
- packaged `agents/` registry: Claude Code gets `source-scout-*` subagents, and
61
- Codex gets `source-scout-linkedin-engagement`, `source-scout-sales-nav`, and
62
- `source-scout-prospeo-contact`. After Find Buyers Plan approval, runtime prompts
63
- use the named scout for the approved source lane as the normal path when the
64
- current session exposes it. If a named scout is unavailable, they use a generic
65
- background agent when possible; parent-thread provider probes are the explicit
66
- fallback, not the default path. The MCP exposes the same list through
67
- `get_source_scout_registry`, so adding a future scout starts in one registry
68
- entry instead of scattered prompt edits.
59
+ installer also writes Sellable agent definitions from the packaged `agents/`
60
+ registry, but normal create-campaign runs use only the Message Drafting
61
+ background agent. Source discovery and filter/rubric setup stay in the parent
62
+ thread with product-native MCP tools unless the user explicitly asks for a
63
+ source-comparison/debug run. `get_post_find_leads_scout_registry` returns the
64
+ Message Drafting worker for the normal path; `get_source_scout_registry` is
65
+ metadata for explicit debug/comparison use.
69
66
 
70
67
  ## Names
71
68
 
@@ -21,12 +21,14 @@ Use the live campaign inputs supplied by the parent thread:
21
21
 
22
22
  - `campaignId`
23
23
  - campaign revision or `campaignUpdatedAt`
24
- - `campaignBrief` / campaign brief content model
24
+ - campaign brief summary from the parent, then the current `campaignBrief` /
25
+ campaign brief content loaded through Sellable tools
25
26
  - selected source decision and provider state
26
27
  - `selectedLeadListId` or selected source list context
27
28
  - `workflowTableId`
28
- - initial campaign-table execution slice rows from that selected list, including row IDs
29
- and a sample row hash when available
29
+ - compact initial campaign-table execution-slice basis: copied source row count,
30
+ review-batch row count, and review-batch basis/hash. Do not require the
31
+ parent to paste a long review-batch row-id list.
30
32
  - filter basis at branch start: `pending`, `use-filters`, or `skip-filters`
31
33
  - any already-saved fit/rubric result summaries supplied by the parent
32
34
 
@@ -38,22 +40,34 @@ read stale local markdown files to reconstruct campaign state.
38
40
  All live reads must come from scoped MCP/product tools by campaign and
39
41
  workspace, such as `get_campaign`, `get_campaign_context`, and
40
42
  `get_rows_minimal({ tableId: workflowTableId })`, or from equivalent parent
41
- thread payloads. Reject the task as `blocked` if the campaign id, workspace,
42
- `selectedLeadListId`, `workflowTableId`, or execution-slice row ids do not match
43
- the branch input.
43
+ thread payloads. Load the current campaign brief and the current review-batch
44
+ rows from those tools before drafting. Reject the task as `blocked` if the
45
+ campaign id, workspace, `selectedLeadListId`, `workflowTableId`, review-batch
46
+ row count, or review-batch basis/hash does not match the branch input.
44
47
 
45
48
  ## Required First Steps
46
49
 
47
- 1. Load the full normal-path message prompt:
50
+ 1. Load the current campaign brief and compact campaign/table state:
51
+ campaign name, `campaignId`, `selectedLeadListId`, `workflowTableId`,
52
+ copied source row count, review-batch row count, review-batch basis/hash,
53
+ selected source summary, filter choice, and parent-supplied brief summary.
54
+ Then read the current campaign/table state through scoped Sellable tools.
55
+ Do not ask the parent to paste row data or a long row-id list.
56
+ 2. Load the full normal-path message prompt:
48
57
 
49
58
  `get_subskill_prompt({ subskillName: "generate-messages" })`
50
59
 
51
- 2. Use that prompt as the drafting contract. Do not use any alternate prompt,
52
- examples-only shortcut, or create-campaign safety/checklist instructions as a
53
- substitute for the full message prompt.
54
- 3. Draft only from the campaign brief, selected source context, and initial
55
- campaign-table execution slice rows supplied by the parent.
56
- 4. Keep the work provisional until the user chooses `Use Template` in Messages.
60
+ 3. Load the reference assets required by that prompt's Reference Asset Loading
61
+ pack, including validation/QA criteria. If a required validation asset cannot
62
+ load, return `blocked` or `retry-needed` instead of drafting from memory.
63
+ 4. Use that prompt as the drafting and QA contract. Do not use any alternate
64
+ prompt, examples-only shortcut, or create-campaign safety/checklist
65
+ instructions as a substitute for the full message prompt.
66
+ 5. Draft only from the current campaign brief, selected source context, and
67
+ review-batch rows loaded through scoped Sellable tools.
68
+ 6. Run the normal message validation/QA rules before final return. The final
69
+ recommendation must include the QA pass/fail receipt, not just draft copy.
70
+ 7. Keep the work provisional until the user chooses `Use Template` in Messages.
57
71
 
58
72
  ## Owned Output
59
73
 
@@ -64,10 +78,12 @@ Return the following to the parent thread:
64
78
  - one rendered good-fill sample for a plausible passing campaign-table row
65
79
  - one omit/fallback sample when the row signal is not safe
66
80
  - pass/fail notes against the generate-messages quality gates
81
+ - `qaReceipt` / validation notes showing token safety, proof safety, fit
82
+ uncertainty, bad-fill avoidance, and "would I take this call?" judgment
67
83
  - message-draft runtime status: `ready`, `blocked`, `retry-needed`, or `stale`
68
84
  - basis token containing campaign revision/updatedAt, brief hash,
69
- `selectedLeadListId`, `workflowTableId`, execution-slice row ids/hash, filter
70
- choice, and rubric/filter basis when present
85
+ `selectedLeadListId`, `workflowTableId`, compact execution-slice row
86
+ count/hash, filter choice, and rubric/filter basis when present
71
87
  - output timestamp/hash and any retry/error detail
72
88
 
73
89
  Do not write local markdown/json artifacts in normal live campaign runs. Return
@@ -98,7 +114,7 @@ row data became available after this branch started.
98
114
 
99
115
  Treat later filter/enrichment data as optional rewrite context. If campaign id,
100
116
  brief hash, selected source, `selectedLeadListId`, `workflowTableId`, and
101
- execution-slice row ids/hash still match, keep the initial recommendation usable
117
+ execution-slice row count/hash still match, keep the initial recommendation usable
102
118
  and report `status: ready` with `basisStatus: "usable_initial"` or
103
119
  `"enriched_rewrite_available"`. The parent thread may offer the user a choice
104
120
  to keep the initial draft or rewrite with enriched/filter data, but the rewrite
@@ -107,21 +123,23 @@ must be explicit user opt-in.
107
123
  Retry or regenerate without asking only when the initial recommendation is
108
124
  missing, failed, structurally invalid, unsafe, or mismatched on campaign id,
109
125
  brief hash, selected source, `selectedLeadListId`, `workflowTableId`, or
110
- execution-slice rows. Filter/rubric/enrichment basis drift alone is not a stale
126
+ execution-slice row count/hash. Filter/rubric/enrichment basis drift alone is not a stale
111
127
  blocker.
112
128
 
113
- ## User Revision Feedback
129
+ ## User Revision Feedback And QA
114
130
 
115
- If the parent sends user feedback about the template before `approve-message`,
116
- treat it as a Message Drafting revision, not a campaign write. Use the current
117
- `messageDraftRecommendation`, basis token/hash, campaign/table basis, and the
118
- latest user feedback as inputs. Load or reuse the full
119
- `generate-messages` contract, then return a revised recommendation with:
131
+ If the parent sends user feedback, a QA request, or a rewrite request about the
132
+ template before `approve-message`, treat it as Message Drafting work, not a
133
+ campaign write. Use the current `messageDraftRecommendation`, basis token/hash,
134
+ campaign/table basis, and latest user feedback as inputs. Load or reuse the full
135
+ `generate-messages` contract and validation assets, then return a revised or
136
+ QA-only recommendation with:
120
137
 
121
138
  - revised proposed template
122
139
  - what changed and why
123
140
  - token fill rule/fallback changes, if any
124
141
  - one rendered good-fill sample
142
+ - `qaReceipt` with pass/fail notes against the loaded validation assets
125
143
  - pass/fail notes against the same quality gates
126
144
  - updated output timestamp/hash and basis token
127
145
 
@@ -918,26 +918,19 @@ Treat host capabilities as concrete functions, not prose conventions:
918
918
  - \`load_subprompt_asset\`: call
919
919
  \`mcp__sellable__get_subskill_asset({ subskillName, assetPath, offset?, limit? })\`
920
920
  and continue chunks until \`hasMore\` is false.
921
- - \`load_source_scout_registry\`: call
922
- \`mcp__sellable__get_source_scout_registry({})\` before any scout dispatch.
921
+ - \`load_source_scout_registry\`: explicit source-comparison/debug runs only; do
922
+ not call it in the normal create-campaign source path.
923
923
  - \`load_post_find_leads_scout_registry\`: call
924
924
  \`mcp__sellable__get_post_find_leads_scout_registry({})\` after source
925
- import and before dispatching Prospect Filters/Message Drafting.
926
- - \`launch_source_scout\`: Claude Code uses \`Task\` with \`subagent_type\` equal to
927
- the registry \`name\` only when the session lists those agents; Codex uses
928
- named custom agents such as
929
- \`source-scout-linkedin-engagement\`, \`source-scout-sales-nav\`, and
930
- \`source-scout-prospeo-contact\` when subagents are available.
931
- - \`launch_post_find_leads_scout\`: Claude Code uses \`Task\` with
932
- \`subagent_type\` equal to the returned prospect-setup registry \`name\` only when
933
- the session lists those agents; Codex uses the returned compatibility agents such as
934
- \`post-find-leads-filter-scout\` and \`post-find-leads-message-scout\` when
935
- subagents are available.
925
+ import and before dispatching Message Drafting only.
926
+ - \`launch_message_drafting\`: Claude Code uses \`Task\` with \`subagent_type\`
927
+ \`post-find-leads-message-scout\` when listed; Codex uses the returned
928
+ compatibility agent or a generic \`gpt-5.5\` / \`xhigh\` Message Drafting agent.
936
929
 
937
930
  If a required interactive question function or MCP loader is missing, stop and
938
- explain the Sellable install/reload problem. Named scout agents are optional
939
- acceleration: if they are absent, do not surface install status to the customer;
940
- fall back to product-native MCP orchestration instead of local scripts.
931
+ explain the Sellable install/reload problem. Source and filter work use
932
+ product-native MCP orchestration in the parent; the only normal background
933
+ branch is Message Drafting.
941
934
 
942
935
  Never narrate local draft housekeeping to the user. If you create directories,
943
936
  save drafts, write artifacts, or persist intermediate state, translate it into
@@ -1132,11 +1125,12 @@ updates.
1132
1125
  5. Create the campaign shell early with the v1 brief so the user can open the
1133
1126
  watch link and see useful setup state immediately. Materialize the approved
1134
1127
  source list, copy confirmed rows into the campaign, and internally process the
1135
- first campaign-table execution slice after the source is attached to the campaign; do not
1136
- load prospect-setup registries/prompts before asking add filters vs skip filters.
1137
- Once the user answers, launch Message Drafting from the same campaign/table
1138
- basis. If filters are approved, also launch Prospect Filters. Do not queue
1139
- workflow cells, attach a sequence, or start until saved filters and the
1128
+ first campaign-table execution slice after the source is attached to the
1129
+ campaign; do not load prospect-setup registries/prompts before asking add
1130
+ filters vs skip filters. Once the user answers, launch only Message Drafting
1131
+ from the same campaign/table basis. If filters are approved, do filter/rubric
1132
+ work inline in the parent thread. Do not queue workflow cells, attach a
1133
+ sequence, or start until saved filters and the
1140
1134
  message template/token rules are approved. When filters are chosen, immediately
1141
1135
  call \`mcp__sellable__update_campaign({ campaignId, enableICPFilters: true, currentStep: "create-icp-rubric", watchNarration })\`
1142
1136
  so the watched app moves to Filter Rules while rubrics are drafted/saved.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sellable/install",
3
- "version": "0.1.153",
3
+ "version": "0.1.154",
4
4
  "type": "module",
5
5
  "description": "One-command installer for Sellable MCP in Claude Code and Codex",
6
6
  "bin": {
@@ -248,34 +248,12 @@ summary should be a compact `## Source Recommendation` block with:
248
248
  - fallback: switch to active LinkedIn profiles if the first sample is too noisy
249
249
  or has too few prospects
250
250
 
251
- When the user has not supplied a source and multiple source angles are viable,
252
- scout those angles as independent branches when the host can actually do it:
253
- LinkedIn posts / people reacting or commenting (internal `signal-discovery`
254
- provider prompt), Sales Nav / title + company filters, and Prospeo Contact /
255
- domains, hiring filters, or broad verified-contact expansion when relevant. In
256
- Codex, source discovery is agent-first after the Find Buyers Plan approval. For
257
- the approved single source lane, explicitly spawn that returned named custom
258
- scout; for example, choosing LinkedIn posts should spawn
259
- `source-scout-linkedin-engagement` even when no comparison is needed. When
260
- multiple source angles are credible, explicitly spawn the named custom scouts
261
- `source-scout-linkedin-engagement`, `source-scout-sales-nav`, and
262
- `source-scout-prospeo-contact` for the credible lanes only when the current host
263
- exposes those names; Codex does not infer subagent fan-out from generic wording.
264
- YOLO/autonomous mode counts as campaign-scoped permission to use Sellable source
265
- background agents. In Claude Code, invoke the generated `source-scout-*`
266
- Task/Agent subagent for the approved lane, or all credible lanes in one
267
- assistant message when comparison/fallback is needed, only when the current
268
- session lists those names. The installer writes them from the same canonical
269
- Sellable agent registry with explicit Sellable MCP tool allowlists.
270
- The create-campaign-v2 subskill calls `get_source_scout_registry` before
271
- dispatch so the current registry, not this copy, is the runtime source of truth.
272
- If the named source scout is unavailable, use a generic `gpt-5.5` high
273
- background agent when the host can spawn generic agents. Continue source
274
- discovery in the parent thread only when agent launch is impossible or the user
275
- explicitly says to continue inline. Do not claim a scout ran unless one did, and
276
- do not surface install status to the customer. In chat, call the downstream copy
277
- stage `message generation`; message validation is only an internal approval
278
- proof.
251
+ Source discovery stays inline in the parent thread for normal create-campaign
252
+ runs. Use the approved provider prompt and MCP tools sequentially; do not spawn
253
+ source-scout background agents unless the user explicitly asks for a source
254
+ comparison/debug run. Do not claim a scout ran unless one did, and do not surface
255
+ install status to the customer. In chat, call the downstream copy stage
256
+ `message generation`; message validation/QA is owned by Message Drafting.
279
257
 
280
258
  For campaign-attached Signal Discovery sampling, promote/select the exact posts
281
259
  with `select_promising_posts` before `fetch_post_engagers` so the user can see
@@ -288,20 +266,27 @@ math should import the smallest set that covers a target. The watch guide should
288
266
  say that we are checking people from these posts to confirm the right people are
289
267
  actually engaging and the source is viable.
290
268
 
291
- After confirmed source rows exist in the campaign table, use the same registry pattern for
292
-
293
- prospect setup work, but do not load that registry or any deep filter/message prompt
269
+ After confirmed source rows exist in the campaign table, do not load the
270
+ message registry or any deep filter/message prompt
294
271
  before the filter-choice question. After `confirm_lead_list`, ask add filters
295
- vs skip filters immediately. Once the user answers, launch Message Drafting
296
- from the same campaign/table basis. If the user chooses filters, also launch the
297
- Prospect Filters worker, move to Filter Rules, save rubrics, then ask for filter
298
- approval. After approval, move to Filter Leads and show `Filters saved + waiting
299
- for message approval` while the message recommendation is reviewed. If the user
300
- skips filters, move to Messages/message review. Enrichment/filtering and
301
- Generate Message cells wait for message approval. AI Generated is an explicit
302
- opt-out from the template path. If the
303
- prospect setup agents are absent, the main thread still orchestrates the same
304
- branches from compact MCP context.
272
+ vs skip filters immediately. Once the user answers, launch only Message Drafting
273
+ from the same campaign/table basis. If the user chooses filters, the parent
274
+ thread moves to Filter Rules, loads the filter reference, saves rubrics, then
275
+ asks for filter approval while Message Drafting runs. After approval, move to
276
+ Filter Leads and show `Filters saved + waiting for message approval` while the
277
+ message recommendation is reviewed. If the user skips filters, move to
278
+ Messages/message review. Enrichment/filtering and Generate Message cells wait
279
+ for message approval. AI Generated is an explicit opt-out from the template
280
+ path.
281
+
282
+ The Message Drafting handoff must stay compact. Include campaign identity,
283
+ campaign name, `selectedLeadListId`, `workflowTableId`, copied source row count,
284
+ review-batch row count, review-batch basis/hash, filter choice, source summary,
285
+ and a concise campaign brief summary. Do not paste the full review-batch row ID
286
+ list or row data into the spawn prompt. Message Drafting must load the current
287
+ campaign brief, campaign/table state, and review-batch rows through Sellable
288
+ tools, then load the normal message validation/QA rules and run a QA pass before
289
+ returning its concise review-ready recommendation.
305
290
 
306
291
  Use rendered Markdown for user review surfaces, not fenced code blocks. Keep
307
292
  lines short, use indexed section labels and bullets, and translate internal
@@ -432,26 +417,19 @@ Treat host capabilities as concrete functions, not prose conventions:
432
417
  - `load_subprompt_asset`: call
433
418
  `mcp__sellable__get_subskill_asset({ subskillName, assetPath, offset?, limit? })`
434
419
  and continue chunks until `hasMore` is false.
435
- - `load_source_scout_registry`: call
436
- `mcp__sellable__get_source_scout_registry({})` before any scout dispatch.
420
+ - `load_source_scout_registry`: explicit source-comparison/debug runs only; do
421
+ not call it in the normal create-campaign source path.
437
422
  - `load_post_find_leads_scout_registry`: call
438
423
  `mcp__sellable__get_post_find_leads_scout_registry({})` after source
439
- import and before dispatching Prospect Filters/Message Drafting.
440
- - `launch_source_scout`: Claude Code uses `Task` with `subagent_type` equal to
441
- the registry `name` only when the session lists those agents; Codex uses
442
- named custom agents such as
443
- `source-scout-linkedin-engagement`, `source-scout-sales-nav`, and
444
- `source-scout-prospeo-contact` when subagents are available.
445
- - `launch_post_find_leads_scout`: Claude Code uses `Task` with `subagent_type`
446
- equal to the returned prospect-setup registry `name` only when the session
447
- lists those agents; Codex uses the returned compatibility agents such as
448
- `post-find-leads-filter-scout` and `post-find-leads-message-scout` when
449
- subagents are available.
424
+ import and before dispatching Message Drafting only.
425
+ - `launch_message_drafting`: Claude Code uses `Task` with `subagent_type`
426
+ `post-find-leads-message-scout` when listed; Codex uses the returned
427
+ compatibility agent or a generic `gpt-5.5` / `xhigh` Message Drafting agent.
450
428
 
451
429
  If a required interactive question function or MCP loader is missing, stop and
452
- explain the Sellable install/reload problem. Named scout agents are optional
453
- acceleration: if they are absent, do not surface install status to the customer;
454
- fall back to product-native MCP orchestration instead of local scripts.
430
+ explain the Sellable install/reload problem. Source and filter work use
431
+ product-native MCP orchestration in the parent; the only normal background
432
+ branch is Message Drafting.
455
433
 
456
434
  Never narrate local draft housekeeping to the user. If you create directories,
457
435
  save drafts, write artifacts, or persist intermediate state, translate it into
@@ -773,7 +751,7 @@ updates.
773
751
  and the current host policy allows agent launch. The worker must load
774
752
  `mcp__sellable__get_subskill_prompt({ subskillName: "generate-messages" })`.
775
753
  In Codex, YOLO/autonomous mode counts as campaign-scoped permission to use
776
- Sellable background agents for pre-launch work. If the user has not enabled
754
+ this single Message Drafting background agent. If the user has not enabled
777
755
  YOLO and has not explicitly asked for background agents, subagents, parallel
778
756
  agents, delegation, or a message/bg agent in this campaign, ask once for
779
757
  permission before loading the long message prompt in the parent. If
@@ -783,17 +761,24 @@ updates.
783
761
  silently fall back to parent-thread message drafting; parent fallback is
784
762
  allowed only when the user explicitly says to continue without a background
785
763
  agent.
786
- Do not use any alternate or examples-only message prompt. Message review requires Message Drafting output:
764
+ Do not use any alternate or examples-only message prompt. Message review and
765
+ message QA require Message Drafting output:
787
766
  do not draft from a checklist, local markdown artifact, or parent-thread
788
767
  intuition. Use campaign state, campaign brief content, selected source state, and
789
768
  initial campaign-table execution slice rows as the source of truth; do not read stale local
790
769
  markdown such as `message-validation.md`, inspect the database directly, or
791
- synthesize local validation artifacts from general knowledge.
770
+ synthesize local validation artifacts from general knowledge. The handoff to
771
+ Message Drafting should pass compact basis only, not a long row-id list; the
772
+ branch loads current brief/table rows and validation assets itself.
792
773
  5. Create the campaign shell early with the v1 brief so the user can open the
793
774
  watch link and see useful setup state immediately. Materialize the approved
794
775
  source list, copy confirmed rows into the campaign, and internally process the
795
- first campaign-table execution slice after the source is attached to the campaign; do not
796
- queue workflow cells, attach a sequence, or start until saved filters and the
776
+ first campaign-table execution slice after the source is attached to the
777
+ campaign; do not load prospect-setup registries/prompts before asking add
778
+ filters vs skip filters. Once the user answers, launch only Message Drafting
779
+ from the same campaign/table basis. If filters are approved, do filter/rubric
780
+ work inline in the parent thread. Do not queue workflow cells, attach a
781
+ sequence, or start until saved filters and the
797
782
  message template/token rules are approved. When filters are chosen, immediately
798
783
  call `mcp__sellable__update_campaign({ campaignId, enableICPFilters: true, currentStep: "create-icp-rubric", watchNarration })`
799
784
  so the watched app moves to Filter Rules while rubrics are drafted/saved.