@sellable/install 0.1.90 → 0.1.92
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/bin/sellable-install.mjs
CHANGED
|
@@ -444,6 +444,9 @@ function codexPluginMcp(opts) {
|
|
|
444
444
|
type: "stdio",
|
|
445
445
|
command,
|
|
446
446
|
args,
|
|
447
|
+
env: {
|
|
448
|
+
SELLABLE_WATCH_MODE_DRIVER: "codex",
|
|
449
|
+
},
|
|
447
450
|
},
|
|
448
451
|
},
|
|
449
452
|
};
|
|
@@ -455,6 +458,9 @@ function codexPluginMcp(opts) {
|
|
|
455
458
|
type: "stdio",
|
|
456
459
|
command: "npx",
|
|
457
460
|
args: ["-y", opts.mcpPackage],
|
|
461
|
+
env: {
|
|
462
|
+
SELLABLE_WATCH_MODE_DRIVER: "codex",
|
|
463
|
+
},
|
|
458
464
|
},
|
|
459
465
|
},
|
|
460
466
|
};
|
|
@@ -1518,6 +1524,19 @@ exec npx -y ${INSTALL_PACKAGE_SPEC} "$@"
|
|
|
1518
1524
|
writeFile(binPath, shim, opts, 0o755);
|
|
1519
1525
|
}
|
|
1520
1526
|
|
|
1527
|
+
const WATCH_MODE_DRIVER_ENV = {
|
|
1528
|
+
claude: "SELLABLE_WATCH_MODE_DRIVER=claude",
|
|
1529
|
+
codex: "SELLABLE_WATCH_MODE_DRIVER=codex",
|
|
1530
|
+
};
|
|
1531
|
+
|
|
1532
|
+
function withWatchModeDriver(command, args, driver) {
|
|
1533
|
+
const envArg = WATCH_MODE_DRIVER_ENV[driver];
|
|
1534
|
+
if (!envArg) {
|
|
1535
|
+
throw new Error(`Unknown watch mode driver: ${driver}`);
|
|
1536
|
+
}
|
|
1537
|
+
return ["env", [envArg, command, ...args]];
|
|
1538
|
+
}
|
|
1539
|
+
|
|
1521
1540
|
function mcpCommand(opts) {
|
|
1522
1541
|
if (opts.server === "package") {
|
|
1523
1542
|
return ["npx", ["-y", opts.mcpPackage]];
|
|
@@ -1536,6 +1555,12 @@ function mcpCommand(opts) {
|
|
|
1536
1555
|
return ["hosted", [opts.hostedUrl]];
|
|
1537
1556
|
}
|
|
1538
1557
|
|
|
1558
|
+
function mcpCommandForHost(opts, driver) {
|
|
1559
|
+
const [command, args] = mcpCommand(opts);
|
|
1560
|
+
if (command === "hosted") return [command, args];
|
|
1561
|
+
return withWatchModeDriver(command, args, driver);
|
|
1562
|
+
}
|
|
1563
|
+
|
|
1539
1564
|
function installClaude(opts) {
|
|
1540
1565
|
if (!commandExists("claude")) {
|
|
1541
1566
|
const message =
|
|
@@ -1556,7 +1581,7 @@ function installClaude(opts) {
|
|
|
1556
1581
|
patchClaudeAlwaysLoad(opts);
|
|
1557
1582
|
return true;
|
|
1558
1583
|
}
|
|
1559
|
-
const [command, args] =
|
|
1584
|
+
const [command, args] = mcpCommandForHost(opts, "claude");
|
|
1560
1585
|
run("claude", ["mcp", "remove", "sellable"], {
|
|
1561
1586
|
...opts,
|
|
1562
1587
|
dryRun: opts.dryRun,
|
|
@@ -1638,7 +1663,7 @@ function installCodex(opts) {
|
|
|
1638
1663
|
const info = installCodexDesktopPlugin(opts);
|
|
1639
1664
|
return { installed: true, ...info };
|
|
1640
1665
|
}
|
|
1641
|
-
const [command, args] =
|
|
1666
|
+
const [command, args] = mcpCommandForHost(opts, "codex");
|
|
1642
1667
|
run("codex", ["mcp", "remove", "sellable"], {
|
|
1643
1668
|
...opts,
|
|
1644
1669
|
dryRun: opts.dryRun,
|
package/package.json
CHANGED
|
@@ -191,6 +191,11 @@ a fresh watch link once with `create_campaign({ campaignId })` or `get_campaign`
|
|
|
191
191
|
and print that link. Do not claim the browser was opened, inspected, or
|
|
192
192
|
synchronized.
|
|
193
193
|
|
|
194
|
+
Never print a placeholder watch link such as "Open campaign" or "link will
|
|
195
|
+
update once the shell is created." If the shell is not created yet, call
|
|
196
|
+
`create_campaign` first. If `create_campaign` does not return `watchUrl`, stop
|
|
197
|
+
and surface the missing watch-link error before lead sourcing.
|
|
198
|
+
|
|
194
199
|
After every `update_campaign({ campaignId, currentStep })`, use
|
|
195
200
|
`get_campaign_navigation_state` when available as a compact orientation check:
|
|
196
201
|
match the saved campaign state to the expected watch-link step, explain the
|
|
@@ -565,6 +570,8 @@ updates.
|
|
|
565
570
|
`message-validation.md` proves the message-review safety-gate workflow ran,
|
|
566
571
|
`message-review.md` approves the template, rubrics are saved, and the
|
|
567
572
|
approved message set is synced into the campaign brief.
|
|
573
|
+
Do not ask the user to approve the brief before shell creation unless they
|
|
574
|
+
explicitly requested a no-write draft; the shell itself is the review surface.
|
|
568
575
|
6. The main thread owns watch navigation. Call
|
|
569
576
|
`mcp__sellable__update_campaign({ campaignId, currentStep })` before major
|
|
570
577
|
visible work so the user can watch progress in the app: `create-offer` for
|