nemoris 0.1.11 → 0.1.12

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nemoris",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "type": "module",
5
5
  "description": "Personal AI agent runtime — persistent memory, delivery guarantees, task contracts, self-healing. Local-first, no cloud.",
6
6
  "license": "MIT",
@@ -498,16 +498,25 @@ export async function startDirectDaemon({
498
498
  if (fsImpl.existsSync(srcCliPath)) {
499
499
  cliEntryPath = srcCliPath;
500
500
  } else {
501
- try {
502
- const { execFileSync } = await import("node:child_process");
503
- const whichOut = execFileSync("which", ["nemoris"], { encoding: "utf8", timeout: 3000 }).trim();
504
- if (whichOut) {
505
- cliEntryPath = whichOut;
506
- }
507
- } catch { /* which not available */ }
501
+ // Resolve cli.js from this module's own package — the `which nemoris`
502
+ // path is a shell wrapper, not a Node.js file, so we can't pass it
503
+ // to `node` directly.
504
+ const __dirname = path.dirname(new URL(import.meta.url).pathname);
505
+ const packageCliPath = path.join(__dirname, "..", "cli.js");
506
+ if (fsImpl.existsSync(packageCliPath)) {
507
+ cliEntryPath = packageCliPath;
508
+ } else {
509
+ // Last resort: try which nemoris and hope it's a node script
510
+ try {
511
+ const { execFileSync } = await import("node:child_process");
512
+ const whichOut = execFileSync("which", ["nemoris"], { encoding: "utf8", timeout: 3000 }).trim();
513
+ if (whichOut) {
514
+ cliEntryPath = whichOut;
515
+ }
516
+ } catch { /* which not available */ }
517
+ }
508
518
  }
509
519
  if (!cliEntryPath) {
510
- // Fallback: resolve from this module's own package
511
520
  const __dirname = path.dirname(new URL(import.meta.url).pathname);
512
521
  cliEntryPath = path.join(__dirname, "..", "cli.js");
513
522
  }
@@ -437,16 +437,18 @@ async function runFastPathWizard({ installDir }) {
437
437
  const { buildSetupChecklist } = await import("./setup-checklist.js");
438
438
  let checklist = buildSetupChecklist(installDir);
439
439
 
440
+ let telegramBotUsername = null;
440
441
  if (!checklist.telegram.configured) {
441
442
  const wantTelegram = await prompter.confirm({
442
443
  message: "Set up Telegram now?",
443
444
  initialValue: false,
444
445
  });
445
446
  if (wantTelegram) {
446
- await runTelegramPhase({
447
+ const tgResult = await runTelegramPhase({
447
448
  installDir,
448
449
  agentId,
449
450
  });
451
+ telegramBotUsername = tgResult?.botUsername || null;
450
452
  checklist = buildSetupChecklist(installDir);
451
453
  }
452
454
  }
@@ -464,7 +466,7 @@ async function runFastPathWizard({ installDir }) {
464
466
 
465
467
  // Strong finish screen
466
468
  const telegramConfigured = checklist.telegram.configured || checklist.telegram.pending;
467
- const botName = readTelegramBotName(installDir);
469
+ const botName = telegramBotUsername || readTelegramBotName(installDir);
468
470
  const finishLines = [
469
471
  `Your agent is live`,
470
472
  "",