@sellable/install 0.1.7 → 0.1.8
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 +4 -3
- package/bin/sellable-install.mjs +53 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -47,9 +47,10 @@ Do not ask users to run `/sellable:create-campaign-v2`,
|
|
|
47
47
|
## Structured Questions
|
|
48
48
|
|
|
49
49
|
Claude Code uses `AskUserQuestion`. Codex uses `request_user_input` when that
|
|
50
|
-
tool is exposed in an interactive
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
tool is exposed in an interactive session. The installer enables Codex Default
|
|
51
|
+
mode support by writing `default_mode_request_user_input = true` under
|
|
52
|
+
`[features]` in `~/.codex/config.toml`. `codex exec` is non-interactive, so it
|
|
53
|
+
cannot show the structured questionnaire UI.
|
|
53
54
|
|
|
54
55
|
For Codex Desktop, the installer also writes a local Sellable plugin bundle into
|
|
55
56
|
`~/.sellable/codex-marketplace`, includes the Sellable skill entrypoints, and
|
package/bin/sellable-install.mjs
CHANGED
|
@@ -15,7 +15,7 @@ import { createInterface } from "node:readline/promises";
|
|
|
15
15
|
const DEFAULT_API_URL = "https://app.sellable.dev";
|
|
16
16
|
const DEFAULT_SERVER_PACKAGE =
|
|
17
17
|
process.env.SELLABLE_MCP_PACKAGE || "@sellable/mcp";
|
|
18
|
-
const CODEX_PLUGIN_VERSION = "0.1.
|
|
18
|
+
const CODEX_PLUGIN_VERSION = "0.1.8";
|
|
19
19
|
const INSTALL_PACKAGE_SPEC = `@sellable/install@${CODEX_PLUGIN_VERSION}`;
|
|
20
20
|
|
|
21
21
|
function usage() {
|
|
@@ -271,6 +271,29 @@ function upsertTomlTable(content, tableName, block) {
|
|
|
271
271
|
return `${content.trimEnd()}\n\n${normalizedBlock}\n`;
|
|
272
272
|
}
|
|
273
273
|
|
|
274
|
+
function upsertTomlBoolean(content, tableName, key, value) {
|
|
275
|
+
const line = `${key} = ${value ? "true" : "false"}`;
|
|
276
|
+
const tablePattern = new RegExp(
|
|
277
|
+
`(^|\\n)(\\[${escapeRegExp(tableName)}\\]\\n)([\\s\\S]*?)(?=\\n\\[[^\\n]+\\]|$)`
|
|
278
|
+
);
|
|
279
|
+
|
|
280
|
+
if (!tablePattern.test(content)) {
|
|
281
|
+
return `${content.trimEnd()}\n\n[${tableName}]\n${line}\n`;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
return content.replace(tablePattern, (_, prefix, header, body) => {
|
|
285
|
+
const keyPattern = new RegExp(
|
|
286
|
+
`(^|\\n)\\s*${escapeRegExp(key)}\\s*=.*`,
|
|
287
|
+
"m"
|
|
288
|
+
);
|
|
289
|
+
const updatedBody = keyPattern.test(body)
|
|
290
|
+
? body.replace(keyPattern, `$1${line}`)
|
|
291
|
+
: `${body.trimEnd()}${body.trimEnd() ? "\n" : ""}${line}\n`;
|
|
292
|
+
|
|
293
|
+
return `${prefix}${header}${updatedBody.trimEnd()}`;
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
|
|
274
297
|
function writeFile(path, content, opts, mode = 0o644) {
|
|
275
298
|
console.log(`Writing ${path}`);
|
|
276
299
|
if (opts.dryRun) return;
|
|
@@ -451,15 +474,20 @@ Do not tell users to run \`/sellable:create-campaign-v2\`,
|
|
|
451
474
|
Use the host-native structured question gate for intake and approval:
|
|
452
475
|
|
|
453
476
|
- Claude Code: \`AskUserQuestion\`
|
|
454
|
-
- Codex: \`request_user_input\` when exposed in an interactive
|
|
455
|
-
|
|
477
|
+
- Codex: \`request_user_input\` when exposed in an interactive session. The
|
|
478
|
+
installer enables this in Default mode with
|
|
479
|
+
\`[features].default_mode_request_user_input = true\`.
|
|
456
480
|
|
|
457
481
|
Do not silently ask Codex intake or approval questions as plain chat when
|
|
458
482
|
\`request_user_input\` is unavailable in an interactive session. Stop and tell
|
|
459
|
-
the user
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
483
|
+
the user: \`Codex has not exposed request_user_input in this session. Can I
|
|
484
|
+
update ~/.codex/config.toml with [features].default_mode_request_user_input =
|
|
485
|
+
true? After that, fully quit and reopen Codex, then rerun
|
|
486
|
+
$sellable:create-campaign.\` If they decline, tell them to switch to
|
|
487
|
+
Plan/collaboration mode and rerun \`$sellable:create-campaign\`. Plain chat
|
|
488
|
+
questions are only acceptable in non-interactive \`codex exec\`
|
|
489
|
+
smoke/rehearsal runs because structured user input is unavailable by design
|
|
490
|
+
there.
|
|
463
491
|
|
|
464
492
|
## Bootstrap
|
|
465
493
|
|
|
@@ -695,6 +723,12 @@ enabled = true`
|
|
|
695
723
|
`[plugins."sellable@sellable-local"]
|
|
696
724
|
enabled = false`
|
|
697
725
|
);
|
|
726
|
+
content = upsertTomlBoolean(
|
|
727
|
+
content,
|
|
728
|
+
"features",
|
|
729
|
+
"default_mode_request_user_input",
|
|
730
|
+
true
|
|
731
|
+
);
|
|
698
732
|
writeFileSync(configPath, `${content.trimEnd()}\n`, { mode: 0o600 });
|
|
699
733
|
} else {
|
|
700
734
|
console.log(`+ upsert [marketplaces.sellable] in ${configPath}`);
|
|
@@ -702,6 +736,9 @@ enabled = false`
|
|
|
702
736
|
console.log(
|
|
703
737
|
`+ disable stale [plugins."sellable@sellable-local"] in ${configPath}`
|
|
704
738
|
);
|
|
739
|
+
console.log(
|
|
740
|
+
`+ enable [features].default_mode_request_user_input in ${configPath}`
|
|
741
|
+
);
|
|
705
742
|
}
|
|
706
743
|
|
|
707
744
|
console.log("Codex Desktop plugin installed:");
|
|
@@ -858,6 +895,15 @@ function verify(opts) {
|
|
|
858
895
|
? "Codex skill bundle present"
|
|
859
896
|
: "Codex skill bundle missing"
|
|
860
897
|
);
|
|
898
|
+
const configPath = join(codexHome(), "config.toml");
|
|
899
|
+
const configContent = existsSync(configPath)
|
|
900
|
+
? readFileSync(configPath, "utf8")
|
|
901
|
+
: "";
|
|
902
|
+
console.log(
|
|
903
|
+
configContent.includes("default_mode_request_user_input = true")
|
|
904
|
+
? "Codex Default-mode request_user_input enabled"
|
|
905
|
+
: "Codex Default-mode request_user_input missing"
|
|
906
|
+
);
|
|
861
907
|
}
|
|
862
908
|
}
|
|
863
909
|
|