@sellable/install 0.1.43 → 0.1.45
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
|
@@ -1295,9 +1295,62 @@ function installClaude(opts) {
|
|
|
1295
1295
|
["mcp", "add", "--transport", "stdio", "sellable", "--", command, ...args],
|
|
1296
1296
|
opts
|
|
1297
1297
|
);
|
|
1298
|
+
// Patch ~/.claude.json to add `alwaysLoad: true` so Claude Code v2.1.121+
|
|
1299
|
+
// pre-loads all mcp__sellable__* tool schemas instead of deferring them
|
|
1300
|
+
// behind ToolSearch (saves 2 round trips per `/sellable:create-campaign`
|
|
1301
|
+
// session). Older Claude Code versions ignore the field — no harm.
|
|
1302
|
+
patchClaudeAlwaysLoad(opts);
|
|
1298
1303
|
return true;
|
|
1299
1304
|
}
|
|
1300
1305
|
|
|
1306
|
+
function patchClaudeAlwaysLoad(opts) {
|
|
1307
|
+
if (opts.dryRun) {
|
|
1308
|
+
logVerbose(
|
|
1309
|
+
`${C.grey}+ would set alwaysLoad: true on sellable MCP server in ~/.claude.json${C.reset}`
|
|
1310
|
+
);
|
|
1311
|
+
return;
|
|
1312
|
+
}
|
|
1313
|
+
const claudeJsonPath = join(homedir(), ".claude.json");
|
|
1314
|
+
if (!existsSync(claudeJsonPath)) {
|
|
1315
|
+
logVerbose(
|
|
1316
|
+
`${C.grey}+ ~/.claude.json missing — skipping alwaysLoad patch (claude mcp add should have created it)${C.reset}`
|
|
1317
|
+
);
|
|
1318
|
+
return;
|
|
1319
|
+
}
|
|
1320
|
+
try {
|
|
1321
|
+
const raw = readFileSync(claudeJsonPath, "utf8");
|
|
1322
|
+
const config = JSON.parse(raw);
|
|
1323
|
+
let touched = false;
|
|
1324
|
+
// Top-level mcpServers.sellable (older claude versions)
|
|
1325
|
+
if (config.mcpServers?.sellable) {
|
|
1326
|
+
if (config.mcpServers.sellable.alwaysLoad !== true) {
|
|
1327
|
+
config.mcpServers.sellable.alwaysLoad = true;
|
|
1328
|
+
touched = true;
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
// Per-project mcpServers.sellable (current claude default)
|
|
1332
|
+
for (const projectPath of Object.keys(config.projects || {})) {
|
|
1333
|
+
const projServers = config.projects[projectPath]?.mcpServers;
|
|
1334
|
+
if (projServers?.sellable && projServers.sellable.alwaysLoad !== true) {
|
|
1335
|
+
projServers.sellable.alwaysLoad = true;
|
|
1336
|
+
touched = true;
|
|
1337
|
+
}
|
|
1338
|
+
}
|
|
1339
|
+
if (touched) {
|
|
1340
|
+
writeFileSync(claudeJsonPath, JSON.stringify(config, null, 2), {
|
|
1341
|
+
mode: 0o600,
|
|
1342
|
+
});
|
|
1343
|
+
logVerbose(
|
|
1344
|
+
`${C.grey}+ patched ${claudeJsonPath} sellable.alwaysLoad = true${C.reset}`
|
|
1345
|
+
);
|
|
1346
|
+
}
|
|
1347
|
+
} catch (err) {
|
|
1348
|
+
logVerbose(
|
|
1349
|
+
`${C.grey}+ could not patch alwaysLoad: ${err instanceof Error ? err.message : String(err)} (non-fatal)${C.reset}`
|
|
1350
|
+
);
|
|
1351
|
+
}
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1301
1354
|
function installCodex(opts) {
|
|
1302
1355
|
if (!commandExists("codex")) {
|
|
1303
1356
|
const message =
|
package/package.json
CHANGED
|
@@ -331,7 +331,15 @@ updates.
|
|
|
331
331
|
a. Say to the user verbatim:
|
|
332
332
|
|
|
333
333
|
```text
|
|
334
|
-
Welcome to Sellable
|
|
334
|
+
Welcome to Sellable! I'll help you launch a LinkedIn outbound campaign right here, all via chat — leads, messages, the whole thing.
|
|
335
|
+
|
|
336
|
+
First, let's connect your Sellable account:
|
|
337
|
+
|
|
338
|
+
1. Drop your email below
|
|
339
|
+
2. I'll send a magic login link to your inbox
|
|
340
|
+
3. Click it, come back here, and we'll keep going
|
|
341
|
+
|
|
342
|
+
What email should I use?
|
|
335
343
|
```
|
|
336
344
|
|
|
337
345
|
b. Wait for the user to paste their email in normal chat. Do NOT use
|
|
@@ -347,7 +355,19 @@ updates.
|
|
|
347
355
|
as the user typed it):
|
|
348
356
|
|
|
349
357
|
```text
|
|
350
|
-
Magic link sent to {email}.
|
|
358
|
+
Magic link sent to {email}.
|
|
359
|
+
|
|
360
|
+
─────────────────────────────────────────────
|
|
361
|
+
Your turn — check your inbox
|
|
362
|
+
─────────────────────────────────────────────
|
|
363
|
+
|
|
364
|
+
1. Open the email from Sellable
|
|
365
|
+
2. Click the magic link
|
|
366
|
+
3. Come back here when you're done
|
|
367
|
+
|
|
368
|
+
I'll be waiting right here.
|
|
369
|
+
|
|
370
|
+
(If your team already uses Sellable, ask an admin to invite you into their shared workspace instead — that gets you straight in.)
|
|
351
371
|
```
|
|
352
372
|
|
|
353
373
|
f. Call `mcp__sellable__wait_for_cli_login({ sessionId })` using the
|
|
@@ -378,18 +398,22 @@ updates.
|
|
|
378
398
|
(substituting `activeWorkspaceName` exactly):
|
|
379
399
|
|
|
380
400
|
```text
|
|
381
|
-
You're in —
|
|
401
|
+
You're in — {activeWorkspaceName} workspace, ready to roll.
|
|
382
402
|
|
|
383
|
-
Now — paste the LinkedIn profile URL of the person you
|
|
403
|
+
Now — paste the LinkedIn profile URL of the person you'll be sending campaigns from. Usually that's you (the founder), or whoever's voice the messages should sound like.
|
|
404
|
+
|
|
405
|
+
e.g. https://www.linkedin.com/in/your-handle
|
|
384
406
|
```
|
|
385
407
|
|
|
386
408
|
- If `isReturningUser === false`, prepend ONE line confirming the new
|
|
387
409
|
workspace, then the locked Step 3 narration verbatim:
|
|
388
410
|
|
|
389
411
|
```text
|
|
390
|
-
|
|
412
|
+
You're set up — your {activeWorkspaceName} workspace is ready.
|
|
413
|
+
|
|
414
|
+
Now — paste the LinkedIn profile URL of the person you'll be sending campaigns from. Usually that's you (the founder), or whoever's voice the messages should sound like.
|
|
391
415
|
|
|
392
|
-
|
|
416
|
+
e.g. https://www.linkedin.com/in/your-handle
|
|
393
417
|
```
|
|
394
418
|
|
|
395
419
|
No other lines. No "all set", no "signed in", no other acknowledgement.
|