@sellable/mcp 0.1.65 → 0.1.67

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sellable/mcp",
3
- "version": "0.1.65",
3
+ "version": "0.1.67",
4
4
  "type": "module",
5
5
  "description": "Sellable MCP server for Claude Code and Codex campaign workflows",
6
6
  "main": "dist/index.js",
@@ -9,7 +9,7 @@ visibility: internal
9
9
  <role>
10
10
  You are the create-campaign-v2 orchestrator. Your job is to execute the
11
11
  configured `core/flow.v2.json` state machine from scratch: (1) interview the
12
- user and create `brief-v1`, (2) validate the chained Phase 84 draft artifacts,
12
+ user and create `brief.md`, (2) validate the chained Phase 84 draft artifacts,
13
13
  (3) run a message-review gate, show the user an approval packet and commit
14
14
  gate, and (4) if the user
15
15
  approves, atomically mint a real `CampaignOffer` and hand off to the bounded
@@ -34,8 +34,8 @@ The JSON flow is the source of truth for stage order, `requiredArtifacts`,
34
34
  replace them.
35
35
 
36
36
  Each stage writes its own artifact into the draft directory before the next
37
- stage starts. `brief-v1.md` is the customer-facing brief output; `brief.md` is
38
- the canonical downstream campaign thesis input.
37
+ stage starts. `brief.md` is the single customer-facing brief and canonical
38
+ downstream campaign thesis input.
39
39
 
40
40
  After validation artifacts are complete, show the user a commit gate with 6
41
41
  choices (approve / revise-brief / revise-leads / revise-rubric /
@@ -51,7 +51,6 @@ Validated draft directory:
51
51
 
52
52
  ```text
53
53
  .sellable/create-campaign-v2/drafts/{workspace-slug}/{campaign-slug}/
54
- brief-v1.md
55
54
  brief.md
56
55
  lead-review.md
57
56
  lead-sample.json
@@ -362,6 +361,20 @@ me`, `I’ll paste a different sender profile`, and `Other / custom`.
362
361
  Approval options should refer to what the user just read, e.g. `Approve this
363
362
  brief`, `Revise target`, `Revise offer/proof`, and `Other / custom`.
364
363
  Include an `Open artifact:` link to `brief.md` before the approval question.
364
+ The visible brief must come before local persistence chrome. After the brief
365
+ is synthesized, render the approval-ready brief in chat before running visible
366
+ `mkdir`, `Write`, artifact-copy, or similar local draft setup. When the host
367
+ supports sidecar/background work, let a background writer persist `brief.md`
368
+ while the main thread keeps the brief review moving. If no background writer
369
+ is available, write `brief.md` synchronously only after the visible brief is
370
+ already in chat. File/folder creation is not the user's value moment; the
371
+ brief is.
372
+
373
+ The approval question can be based on the rendered brief in chat. Do not wait
374
+ for file-write chrome before asking for approval. Before lead sourcing or any
375
+ downstream step reads `brief.md`, reconcile that the persisted file matches
376
+ the visible approved brief; if the sidecar is still running, wait quietly or
377
+ finish the write synchronously at that boundary.
365
378
 
366
379
  - After the brief is approved or auto-confirmed, show the next progress line:
367
380
  `Cool. Now I'm going to find people who are both a good fit and likely to
@@ -390,13 +403,13 @@ should test for this campaign. Those can run in parallel and usually take
390
403
 
391
404
  - In hosted/rehearsal runs, `Bash` is only for safe local draft-directory
392
405
  housekeeping before approval: `mkdir`, `ls`, `find`, `test`, `pwd`, `echo`,
393
- `cat`, or copying `brief-v1.md` to `brief.md` inside the repo. Do not use
406
+ or `cat` inside the repo. Do not use
394
407
  Bash to run interpreters/scripts (`python`, `node`, `npm`, `pnpm`, `yarn`,
395
408
  `npx`), call APIs, query databases, inspect prompt dumps, run git, or
396
409
  synthesize artifact content. Use `Read`/`Write`/`Edit` for artifact files and
397
410
  MCP tools for product actions.
398
- - `brief-v1.md` is the user-facing brief. `brief.md` is the stable downstream
399
- input and remains the thesis source.
411
+ - `brief.md` is the single user-facing brief and stable downstream thesis
412
+ source.
400
413
  - `lead-review.md` and `lead-sample.json` are the required outputs of `find leads`.
401
414
  - `lead-filter.md` is the primary output of `filter leads`.
402
415
  - `rubric.json` is optional and secondary to `lead-filter.md`.
@@ -12,7 +12,7 @@
12
12
  ],
13
13
  "events": [
14
14
  "bootstrap_complete",
15
- "brief_v1_ready",
15
+ "brief_ready",
16
16
  "source_intake_ready",
17
17
  "user_brief_confirmed",
18
18
  "lead_review_ready",
@@ -139,7 +139,7 @@
139
139
  "campaignBrief": "~1-2 min"
140
140
  },
141
141
  "forbiddenWording": [
142
- "brief-v1.md",
142
+ "brief.md",
143
143
  "lead-review.md",
144
144
  "lead-sample.json",
145
145
  "message-validation.md"
@@ -150,14 +150,29 @@
150
150
  "target": "create-campaign-brief"
151
151
  },
152
152
  {
153
- "action": "write_artifact",
154
- "artifact": "brief-v1.md"
153
+ "action": "render_brief_preview_before_artifact_write",
154
+ "requiredVisibleContent": [
155
+ "Campaign brief",
156
+ "Decision",
157
+ "Target",
158
+ "Pain",
159
+ "Offer",
160
+ "Proof",
161
+ "Lead plan",
162
+ "Risks",
163
+ "After approval"
164
+ ],
165
+ "mustRunBefore": ["start_background_artifact_writer", "Bash", "mkdir"],
166
+ "chatRenderRule": "After synthesizing the brief, render the approval-ready brief in chat before any visible local folder creation, file write, or artifact copy. The user should see useful brief content before local persistence chrome. Do not ask the user to approve a hidden artifact."
155
167
  },
156
168
  {
157
- "action": "copy_artifact",
158
- "from": "brief-v1.md",
159
- "to": "brief.md",
160
- "reason": "brief.md remains the canonical downstream artifact name"
169
+ "action": "start_background_artifact_writer",
170
+ "artifact": "brief.md",
171
+ "mode": "sidecar_when_host_supports_background_agents",
172
+ "shouldNotBlockMainThread": true,
173
+ "allowedToRunWhileUserReviewsInlineBrief": true,
174
+ "fallback": "If no background writer is available, write brief.md synchronously only after the approval-ready brief is already visible in chat.",
175
+ "chatRenderRule": "Do not surface folder/file-write progress in chat unless the write fails or the user asks. The main thread should keep the brief review moving while the sidecar persists brief.md."
161
176
  },
162
177
  {
163
178
  "action": "ask_source_intake_after_strategy_batch",
@@ -183,7 +198,7 @@
183
198
  }
184
199
  ],
185
200
  "requiredArtifacts": [],
186
- "producesArtifacts": ["brief-v1.md", "brief.md"],
201
+ "producesArtifacts": ["brief.md"],
187
202
  "allowedTools": [
188
203
  "get_subskill_prompt",
189
204
  "get_subskill_asset",
@@ -211,9 +226,9 @@
211
226
  "start_campaign"
212
227
  ],
213
228
  "watchRequired": false,
214
- "waitFor": ["brief_v1_ready", "confirm_with_user"],
229
+ "waitFor": ["brief_ready", "confirm_with_user"],
215
230
  "transitions": {
216
- "brief_v1_ready": "brief-review",
231
+ "brief_ready": "brief-review",
217
232
  "confirm_with_user": "brief-review"
218
233
  },
219
234
  "optionalProducesArtifacts": ["lead-source-intake.json"]
@@ -224,7 +239,7 @@
224
239
  "onEnter": [
225
240
  {
226
241
  "action": "show_brief_summary",
227
- "artifact": "brief-v1.md"
242
+ "artifact": "brief.md"
228
243
  },
229
244
  {
230
245
  "action": "render_brief_approval_checkpoint",
@@ -243,8 +258,8 @@
243
258
  "then I will find good-fit leads"
244
259
  ],
245
260
  "minimumVisibleBriefDetail": "full_readable_brief_before_question",
246
- "requiredArtifactLinks": ["brief-v1.md", "brief.md"],
247
- "artifactLinkTiming": "before_approval_question",
261
+ "requiredArtifactLinks": ["brief.md"],
262
+ "artifactLinkTiming": "when_ready_before_downstream",
248
263
  "avoidQuestionWhenOnlyUsefulAnswerIs": "looks good"
249
264
  },
250
265
  {
@@ -255,9 +270,16 @@
255
270
  "noOpenStrategicTradeoff": true,
256
271
  "noMissingRequiredInputs": true
257
272
  }
273
+ },
274
+ {
275
+ "action": "ensure_background_artifact_ready",
276
+ "artifacts": ["brief.md"],
277
+ "requiredBeforeTransition": "find-leads",
278
+ "reconcileRule": "Before lead sourcing reads brief.md, verify the sidecar persisted the same brief shown in chat. If the sidecar is still running, wait quietly or finish the write synchronously; if it differs, reconcile to the visible approved brief.",
279
+ "chatRenderRule": "Do not block the brief approval question on this step. Only mention artifact persistence if it fails or needs user action."
258
280
  }
259
281
  ],
260
- "requiredArtifacts": ["brief-v1.md", "brief.md"],
282
+ "requiredArtifacts": [],
261
283
  "producesArtifacts": [],
262
284
  "allowedTools": [
263
285
  "AskUserQuestion",
@@ -326,7 +348,7 @@
326
348
  "artifacts": ["lead-review.md", "lead-sample.json"]
327
349
  }
328
350
  ],
329
- "requiredArtifacts": ["brief-v1.md", "brief.md"],
351
+ "requiredArtifacts": ["brief.md"],
330
352
  "producesArtifacts": ["lead-review.md", "lead-sample.json"],
331
353
  "allowedTools": [
332
354
  "get_subskill_prompt",
@@ -52,7 +52,7 @@ gate is the only mandatory pre-mint approval gate.
52
52
  The minimum pre-approval chain is:
53
53
 
54
54
  ```text
55
- brief-v1.md / brief.md
55
+ brief.md
56
56
  lead-review.md
57
57
  lead-sample.json
58
58
  lead-filter.md