opencrush 0.2.7 → 0.2.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.
Files changed (2) hide show
  1. package/dist/index.js +21 -84
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -245007,7 +245007,6 @@ async function openBrowserPrompt(url, isCN) {
245007
245007
  }
245008
245008
  }
245009
245009
  async function runSetupWizard() {
245010
- var _a3;
245011
245010
  console.clear();
245012
245011
  console.log(source_default.magenta(`
245013
245012
  \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
@@ -245023,18 +245022,18 @@ async function runSetupWizard() {
245023
245022
  message: isCN ? "\u9009\u62E9\u5B89\u88C5\u65B9\u5F0F:" : "How would you like to set up?",
245024
245023
  choices: [
245025
245024
  {
245026
- name: isCN ? `\u26A1 \u5FEB\u901F\u8BBE\u7F6E ${source_default.gray("(3\u6B65\uFF0C2\u5206\u949F\u641E\u5B9A \u2014 \u63A8\u8350\u65B0\u624B)")}` : `\u26A1 Quick setup ${source_default.gray("(3 steps, ~2 min \u2014 recommended)")}`,
245025
+ name: `\u26A1 Quick setup ${source_default.gray("(selfies, Spotify, all core features \u2014 recommended)")}`,
245027
245026
  value: "quick",
245028
- short: isCN ? "\u5FEB\u901F" : "Quick"
245027
+ short: "Quick"
245029
245028
  },
245030
245029
  {
245031
- name: isCN ? `\u{1F527} \u5B8C\u6574\u8BBE\u7F6E ${source_default.gray("(5\u6B65\uFF0C\u89E3\u9501\u81EA\u62CD/\u8BED\u97F3/\u81EA\u4E3B\u53D1\u5E16\u7B49)")}` : `\u{1F527} Full setup ${source_default.gray("(5 steps, unlock selfies / voice / auto-post)")}`,
245030
+ name: `\u{1F527} Full setup ${source_default.gray("(+ voice messages, browser, Twitter auto-posting)")}`,
245032
245031
  value: "full",
245033
- short: isCN ? "\u5B8C\u6574" : "Full"
245032
+ short: "Full"
245034
245033
  }
245035
245034
  ]
245036
245035
  }]);
245037
- const TOTAL_STEPS = setupMode === "quick" ? 3 : 5;
245036
+ const TOTAL_STEPS = 5;
245038
245037
  const step = (n2, label) => {
245039
245038
  console.log(source_default.cyan(`
245040
245039
  [${n2}/${TOTAL_STEPS}] ${label}`));
@@ -245250,86 +245249,24 @@ async function runSetupWizard() {
245250
245249
  envValues.OLLAMA_BASE_URL = "http://localhost:11434";
245251
245250
  envValues.OLLAMA_MODEL = "qwen2.5:7b";
245252
245251
  }
245253
- if (setupMode === "quick") {
245254
- envValues.PROACTIVE_MESSAGE_MIN_INTERVAL = "120";
245255
- envValues.PROACTIVE_MESSAGE_MAX_INTERVAL = "240";
245256
- envValues.QUIET_HOURS_START = "23";
245257
- envValues.QUIET_HOURS_END = "8";
245258
- const { wantSelfies } = await esm_default12.prompt([{
245259
- type: "confirm",
245260
- name: "wantSelfies",
245261
- message: "\u{1F4F8} Enable selfies & video? (fal.ai \u2014 free credits on signup)",
245262
- default: true
245263
- }]);
245264
- if (wantSelfies) {
245265
- await openBrowserPrompt("https://fal.ai/dashboard/keys", false);
245266
- const { falKey } = await esm_default12.prompt([{
245267
- type: "password",
245268
- name: "falKey",
245269
- message: "Paste your fal.ai key (or press Enter to skip):",
245270
- mask: "*"
245271
- }]);
245272
- if (falKey.trim()) envValues.FAL_KEY = falKey.trim();
245273
- }
245274
- const quickEnvPath = (0, import_fs20.existsSync)(_legacyEnv) && _legacyEnv !== getEnvPath() ? _legacyEnv : getEnvPath();
245275
- const quickSpinner = ora("Writing configuration...").start();
245276
- (0, import_fs20.writeFileSync)(quickEnvPath, generateEnvFile(envValues), "utf-8");
245277
- quickSpinner.succeed(`Configuration saved to ${quickEnvPath}`);
245278
- console.log("\n" + boxen(
245279
- source_default.green("\u2705 " + (isCN ? "\u8BBE\u7F6E\u5B8C\u6210\uFF01\n\n" : "Setup complete!\n\n")) + source_default.white(isCN ? "\u5DF2\u542F\u7528:\n" : "Enabled:\n") + [
245280
- `\u{1F9E0} AI: ${((_a3 = getProviderInfo(envValues.LLM_PROVIDER)) == null ? void 0 : _a3.name) ?? envValues.LLM_PROVIDER}`,
245281
- `\u{1F49D} Character: ${characterName}`,
245282
- envValues.WHATSAPP_ENABLED ? "\u{1F4AC} WhatsApp" : "",
245283
- envValues.DISCORD_BOT_TOKEN ? "\u{1F3AE} Discord" : "",
245284
- envValues.TELEGRAM_BOT_TOKEN ? "\u{1F4EC} Telegram" : "",
245285
- envValues.FAL_KEY ? "\u{1F4F8} Selfies & Video" : "",
245286
- "\u{1F495} Emotion engine \u{1F91D} Relationship tracking \u{1F9E0} Memory"
245287
- ].filter(Boolean).map((f2) => source_default.cyan(` ${f2}`)).join("\n") + "\n\n" + source_default.gray(isCN ? " \u89E3\u9501\u81EA\u62CD/\u8BED\u97F3\u7B49: npx opencrush@latest setup \u2192 \u5B8C\u6574\u8BBE\u7F6E" : " Unlock selfies/voice: npx opencrush@latest setup \u2192 Full setup"),
245288
- { padding: 1, margin: 1, borderStyle: "round", borderColor: "magenta" }
245289
- ));
245290
- const { startNow: quickStart } = await esm_default12.prompt([{
245291
- type: "confirm",
245292
- name: "startNow",
245293
- message: isCN ? "\u73B0\u5728\u542F\u52A8\u4F60\u7684\u4F34\u4FA3\uFF1F" : "Start your companion now?",
245294
- default: true
245295
- }]);
245296
- if (quickStart) {
245297
- const dotenv3 = await Promise.resolve().then(() => __toESM(require_main()));
245298
- dotenv3.config({ path: quickEnvPath, override: true });
245299
- const { startOpencrush: startOpencrush2 } = await Promise.resolve().then(() => (init_start(), start_exports));
245300
- await startOpencrush2();
245301
- }
245302
- return;
245303
- }
245304
- step(4, isCN ? "\u611F\u5B98\u529F\u80FD\uFF08\u53EF\u9009\uFF09" : "Sensory features (optional)");
245305
- console.log(source_default.gray(isCN ? "\u8FD9\u4E9B\u529F\u80FD\u8BA9\u4F60\u7684\u4F34\u4FA3\u66F4\u52A0\u771F\u5B9E\u2014\u2014\u770B\u5F97\u89C1\u3001\u542C\u5F97\u5230\u3001\u6709\u81EA\u5DF1\u7684\u793E\u4EA4\u5708\u3002\n" : "These features make your companion come alive \u2014 visible, audible, and social.\n"));
245252
+ step(4, "Features");
245253
+ console.log(source_default.gray("These features make your companion come alive \u2014 visible, audible, and social.\n"));
245254
+ const quickChoices = [
245255
+ { name: "\u{1F4F8} Selfies & Video \u2014 send photos and short videos (needs fal.ai key)", value: "images", checked: true },
245256
+ { name: "\u{1F3B5} Spotify \u2014 listen to music on Spotify and share songs (needs Spotify key)", value: "spotify" }
245257
+ ];
245258
+ const fullChoices = [
245259
+ { name: "\u{1F4F8} Selfies & Video \u2014 send photos and short videos (needs fal.ai key)", value: "images", checked: true },
245260
+ { name: "\u{1F3A4} Voice messages \u2014 send voice notes (ElevenLabs / Fish Audio / FAL Kokoro)", value: "voice" },
245261
+ { name: `\u{1F426} Twitter/X \u2014 post tweets autonomously ${source_default.gray("(needs Twitter API + OAuth)")}`, value: "twitter" },
245262
+ { name: `\u{1F310} Browser \u2014 browse web, watch videos, share screenshots ${source_default.gray("(needs Playwright)")}`, value: "browser" },
245263
+ { name: "\u{1F3B5} Spotify \u2014 listen to music on Spotify and share songs (needs Spotify key)", value: "spotify" }
245264
+ ];
245306
245265
  const { optionalFeatures } = await esm_default12.prompt([{
245307
245266
  type: "checkbox",
245308
245267
  name: "optionalFeatures",
245309
- message: isCN ? "\u9009\u62E9\u8981\u542F\u7528\u7684\u611F\u5B98\u529F\u80FD:" : "Which features do you want?",
245310
- choices: [
245311
- {
245312
- name: isCN ? "\u{1F4F8} \u81EA\u62CD & \u89C6\u9891 \u2014 \u53EF\u4EE5\u53D1\u81EA\u62CD\u548C\u77ED\u89C6\u9891 (\u9700\u8981 fal.ai key)" : "\u{1F4F8} Selfies & Video \u2014 send photos and short videos (needs fal.ai key)",
245313
- value: "images",
245314
- checked: false
245315
- },
245316
- {
245317
- name: isCN ? "\u{1F3A4} \u8BED\u97F3\u6D88\u606F \u2014 \u53EF\u4EE5\u53D1\u8BED\u97F3 (ElevenLabs / Fish Audio / FAL Kokoro)" : "\u{1F3A4} Voice messages \u2014 send voice notes (ElevenLabs / Fish Audio / FAL Kokoro)",
245318
- value: "voice"
245319
- },
245320
- {
245321
- name: isCN ? `\u{1F426} Twitter/X \u2014 \u81EA\u4E3B\u53D1\u63A8\u6587\u3001\u5206\u4EAB\u751F\u6D3B ${source_default.gray("[\u9AD8\u7EA7 \u2014 \u9700\u8981 Twitter API + OAuth]")}` : `\u{1F426} Twitter/X \u2014 post tweets autonomously ${source_default.gray("[advanced \u2014 needs Twitter API + OAuth]")}`,
245322
- value: "twitter"
245323
- },
245324
- {
245325
- name: isCN ? `\u{1F310} \u6D4F\u89C8\u5668 \u2014 \u80FD\u6D4F\u89C8\u7F51\u9875\u3001\u770B\u89C6\u9891\u3001\u5206\u4EAB\u622A\u56FE ${source_default.gray("[\u9AD8\u7EA7 \u2014 \u9700\u8981\u5B89\u88C5 Playwright]")}` : `\u{1F310} Browser \u2014 browse web, watch videos, share screenshots ${source_default.gray("[advanced \u2014 needs Playwright]")}`,
245326
- value: "browser"
245327
- },
245328
- {
245329
- name: isCN ? "\u{1F3B5} Spotify \u8054\u52A8 \u2014 \u5728 Spotify \u542C\u6B4C\u5E76\u5206\u4EAB (\u9700\u8981 Spotify API)" : "\u{1F3B5} Spotify \u2014 listen to music on Spotify and share songs (needs Spotify key)",
245330
- value: "spotify"
245331
- }
245332
- ]
245268
+ message: "Which features do you want?",
245269
+ choices: setupMode === "quick" ? quickChoices : fullChoices
245333
245270
  }]);
245334
245271
  if (optionalFeatures.includes("images")) {
245335
245272
  console.log(source_default.yellow("\n \u{1F449} fal.ai API key (free credits on signup):"));
@@ -245595,7 +245532,7 @@ async function runSetupWizard() {
245595
245532
  console.log("\n" + boxen(
245596
245533
  source_default.green("\u2705 Setup complete!\n\n") + source_default.white("Enabled features:\n") + enabledFeatures.map((f2) => source_default.cyan(` ${f2}`)).join("\n") + "\n\n" + (postSetupSteps.length > 0 ? source_default.yellow("Next steps:\n") + postSetupSteps.join("\n") + "\n\n" : "") + source_default.white("Start your companion:\n") + source_default.cyan(" npx opencrush@latest start\n\n") + source_default.white("Edit personality anytime:\n") + source_default.cyan(` ~/.opencrush/characters/${characterName}/SOUL.md
245597
245534
 
245598
- `) + source_default.gray("Need help? https://github.com/Hollandchirs/Opencrush"),
245535
+ `) + (setupMode === "quick" ? source_default.gray(" Unlock voice/browser/Twitter: run setup again \u2192 Full setup\n\n") : "") + source_default.gray("Need help? https://github.com/Hollandchirs/Opencrush"),
245599
245536
  { padding: 1, margin: 1, borderStyle: "round", borderColor: "magenta" }
245600
245537
  ));
245601
245538
  const { startNow } = await esm_default12.prompt([{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencrush",
3
- "version": "0.2.7",
3
+ "version": "0.2.8",
4
4
  "description": "Your AI companion lives on your computer. She watches dramas, listens to music, and thinks of you.",
5
5
  "bin": {
6
6
  "opencrush": "dist/index.js"