opencrater 0.1.7 → 0.1.9
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 +10 -0
- package/cli.js +12 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,3 +13,13 @@ One card at session edges (SessionStart / Stop), rendered by the same fail-silen
|
|
|
13
13
|
Opt out anytime: `npx opencrater off` or `OPENCRATER_DISABLE=1`.
|
|
14
14
|
|
|
15
15
|
Apache-2.0 · [opencrater.to](https://opencrater.to)
|
|
16
|
+
|
|
17
|
+
## One-time trust prompts
|
|
18
|
+
|
|
19
|
+
- **VS Code**: the first ⌘-click on a sponsor link shows an "open external
|
|
20
|
+
website?" dialog — choose **Configure Trusted Domains → trust
|
|
21
|
+
api.opencrater.to** and it never asks again. (Dismissing with ✕ or
|
|
22
|
+
`npx opencrater x` never opens anything — it's handled locally.)
|
|
23
|
+
- **Codex**: asks once to trust newly installed hooks on its next launch —
|
|
24
|
+
approve to enable cards. This is Codex's own security model.
|
|
25
|
+
|
package/cli.js
CHANGED
|
@@ -225,6 +225,8 @@ function detectHosts() {
|
|
|
225
225
|
return {
|
|
226
226
|
claude_code: fs.existsSync(path.join(os.homedir(), ".claude")) || hasBin("claude"),
|
|
227
227
|
codex: fs.existsSync(path.join(process.env.CODEX_HOME || path.join(os.homedir(), ".codex"))) || hasBin("codex"),
|
|
228
|
+
openclaw: fs.existsSync(path.join(os.homedir(), ".openclaw")) || hasBin("openclaw"),
|
|
229
|
+
gemini_cli: fs.existsSync(path.join(os.homedir(), ".gemini")) || hasBin("gemini"),
|
|
228
230
|
};
|
|
229
231
|
}
|
|
230
232
|
|
|
@@ -249,6 +251,12 @@ if (cmd === "on" || cmd === "enable") {
|
|
|
249
251
|
} else {
|
|
250
252
|
console.log("· Codex not found — skipped");
|
|
251
253
|
}
|
|
254
|
+
if (hosts.openclaw) {
|
|
255
|
+
console.log("✓ OpenClaw detected — native hook support is rolling out; cards will enable automatically.");
|
|
256
|
+
}
|
|
257
|
+
if (hosts.gemini_cli) {
|
|
258
|
+
console.log("✓ Gemini CLI detected — native hook support is rolling out; cards will enable automatically.");
|
|
259
|
+
}
|
|
252
260
|
// Pre-install the local hook runtime (background): hooks then run via
|
|
253
261
|
// plain node — no npx resolution latency, no cold-cache races.
|
|
254
262
|
try {
|
|
@@ -264,6 +272,10 @@ if (cmd === "on" || cmd === "enable") {
|
|
|
264
272
|
console.log("Ads are personalized to what you're working on via anonymized keywords");
|
|
265
273
|
console.log("(never raw prompts, paths, or secrets).");
|
|
266
274
|
console.log("Turn off anytime: npx opencrater off (or OPENCRATER_DISABLE=1)");
|
|
275
|
+
console.log("");
|
|
276
|
+
console.log("VS Code tip: the first time you ⌘-click a sponsor link, choose");
|
|
277
|
+
console.log("'Configure Trusted Domains' → trust api.opencrater.to and the");
|
|
278
|
+
console.log("confirmation dialog never appears again.");
|
|
267
279
|
} else if (cmd === "off" || cmd === "disable") {
|
|
268
280
|
const a = disableIn(CLAUDE_SETTINGS);
|
|
269
281
|
const b = disableIn(CODEX_HOOKS);
|