zenflo 0.11.17 → 0.12.1

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 CHANGED
@@ -429,8 +429,7 @@ MIT License - See [LICENSE](../LICENSE) for details.
429
429
 
430
430
  ## 🙏 Acknowledgments
431
431
 
432
- - Built on top of [Anthropic Claude](https://www.anthropic.com/)
433
- - Inspired by [Happy](https://github.com/slopus/happy) by slopus
432
+ - Powered by [Anthropic Claude](https://www.anthropic.com/)
434
433
  - Icons from [Claude Code](https://claude.ai/code)
435
434
 
436
435
  ---
@@ -10,7 +10,7 @@ const hasNoDeprecation = process.execArgv.includes('--no-deprecation');
10
10
 
11
11
  if (!hasNoWarnings || !hasNoDeprecation) {
12
12
  const projectRoot = dirname(dirname(fileURLToPath(import.meta.url)));
13
- const entrypoint = join(projectRoot, 'dist', 'codex', 'happyMcpStdioBridge.mjs');
13
+ const entrypoint = join(projectRoot, 'dist', 'codex', 'zenfloMcpStdioBridge.mjs');
14
14
 
15
15
  try {
16
16
  execFileSync(process.execPath, [
@@ -27,6 +27,6 @@ if (!hasNoWarnings || !hasNoDeprecation) {
27
27
  }
28
28
  } else {
29
29
  // Already have desired flags; import module directly
30
- import('../dist/codex/happyMcpStdioBridge.mjs');
30
+ import('../dist/codex/zenfloMcpStdioBridge.mjs');
31
31
  }
32
32
 
@@ -3,7 +3,7 @@
3
3
  var chalk = require('chalk');
4
4
  var os = require('node:os');
5
5
  var node_crypto = require('node:crypto');
6
- var types = require('./types-DlbOjNGw.cjs');
6
+ var types = require('./types-DzNSylqA.cjs');
7
7
  var node_child_process = require('node:child_process');
8
8
  var node_path = require('node:path');
9
9
  var node_readline = require('node:readline');
@@ -1046,7 +1046,7 @@ class AbortError extends Error {
1046
1046
  }
1047
1047
  }
1048
1048
 
1049
- const __filename$2 = node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-DorsFBUD.cjs', document.baseURI).href)));
1049
+ const __filename$2 = node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-BCav_-KH.cjs', document.baseURI).href)));
1050
1050
  const __dirname$2 = node_path.join(__filename$2, "..");
1051
1051
  function getDefaultClaudeCodePath() {
1052
1052
  return node_path.join(__dirname$2, "..", "..", "..", "node_modules", "@anthropic-ai", "claude-code", "cli.js");
@@ -3474,7 +3474,7 @@ async function checkIfDaemonRunningAndCleanupStaleState() {
3474
3474
  return false;
3475
3475
  }
3476
3476
  }
3477
- async function isDaemonRunningCurrentlyInstalledHappyVersion() {
3477
+ async function isDaemonRunningCurrentlyInstalledZenfloVersion() {
3478
3478
  types.logger.debug("[DAEMON CONTROL] Checking if daemon is running same version");
3479
3479
  const runningDaemon = await checkIfDaemonRunningAndCleanupStaleState();
3480
3480
  if (!runningDaemon) {
@@ -3551,8 +3551,8 @@ async function findAllHappyProcesses() {
3551
3551
  for (const proc of processes) {
3552
3552
  const cmd = proc.cmd || "";
3553
3553
  const name = proc.name || "";
3554
- const isHappy = name.includes("happy") || name === "node" && (cmd.includes("happy-cli") || cmd.includes("dist/index.mjs")) || cmd.includes("happy.mjs") || cmd.includes("zenflo") || cmd.includes("tsx") && cmd.includes("src/index.ts") && cmd.includes("happy-cli");
3555
- if (!isHappy) continue;
3554
+ const isZenflo = name.includes("zenflo") || name === "node" && (cmd.includes("zenflo") || cmd.includes("dist/index.mjs")) || cmd.includes("zenflo.mjs") || cmd.includes("tsx") && cmd.includes("src/index.ts");
3555
+ if (!isZenflo) continue;
3556
3556
  let type = "unknown";
3557
3557
  if (proc.pid === process.pid) {
3558
3558
  type = "current";
@@ -3582,7 +3582,7 @@ async function findRunawayHappyProcesses() {
3582
3582
  (p) => p.pid !== process.pid && (p.type === "daemon" || p.type === "dev-daemon" || p.type === "daemon-spawned-session" || p.type === "dev-daemon-spawned" || p.type === "daemon-version-check" || p.type === "dev-daemon-version-check")
3583
3583
  ).map((p) => ({ pid: p.pid, command: p.command }));
3584
3584
  }
3585
- async function killRunawayHappyProcesses() {
3585
+ async function killRunawayZenfloProcesses() {
3586
3586
  const runawayProcesses = await findRunawayHappyProcesses();
3587
3587
  const errors = [];
3588
3588
  let killed = 0;
@@ -3800,8 +3800,8 @@ ${typeLabels[type] || type}:`));
3800
3800
  console.log(chalk.yellow("No log files found"));
3801
3801
  }
3802
3802
  console.log(chalk.bold("\n\u{1F41B} Support & Bug Reports"));
3803
- console.log(`Report issues: ${chalk.blue("https://github.com/slopus/happy-cli/issues")}`);
3804
- console.log(`Documentation: ${chalk.blue("https://happy.engineering/")}`);
3803
+ console.log(`Report issues: ${chalk.blue("https://github.com/zenflo/zenflo/issues")}`);
3804
+ console.log(`Documentation: ${chalk.blue("https://zenflo.dev/docs")}`);
3805
3805
  }
3806
3806
  console.log(chalk.green("\n\u2705 Doctor diagnosis complete!\n"));
3807
3807
  }
@@ -4308,7 +4308,7 @@ async function startDaemon() {
4308
4308
  });
4309
4309
  types.logger.debug("[DAEMON RUN] Starting daemon process...");
4310
4310
  types.logger.debugLargeJson("[DAEMON RUN] Environment", getEnvironmentInfo());
4311
- const runningDaemonVersionMatches = await isDaemonRunningCurrentlyInstalledHappyVersion();
4311
+ const runningDaemonVersionMatches = await isDaemonRunningCurrentlyInstalledZenfloVersion();
4312
4312
  if (!runningDaemonVersionMatches) {
4313
4313
  types.logger.debug("[DAEMON RUN] Daemon version mismatch detected, restarting daemon with current CLI version");
4314
4314
  await stopDaemon();
@@ -4655,7 +4655,7 @@ async function startDaemon() {
4655
4655
  }
4656
4656
  }
4657
4657
 
4658
- async function startZenfloServer(client, apiClient) {
4658
+ async function startZenfloServer(client) {
4659
4659
  const handler = async (title) => {
4660
4660
  types.logger.debug("[zenfloMCP] Changing title to:", title);
4661
4661
  try {
@@ -4672,7 +4672,7 @@ async function startZenfloServer(client, apiClient) {
4672
4672
  const mcp = new mcp_js.McpServer({
4673
4673
  name: "ZenFlo MCP",
4674
4674
  version: "1.0.0",
4675
- description: "ZenFlo CLI MCP server with chat session management tools"
4675
+ description: "ZenFlo CLI MCP server for chat session title management"
4676
4676
  });
4677
4677
  mcp.registerTool("change_title", {
4678
4678
  description: "Change the title of the current chat session",
@@ -4705,46 +4705,6 @@ async function startZenfloServer(client, apiClient) {
4705
4705
  };
4706
4706
  }
4707
4707
  });
4708
- mcp.registerTool("send_inbox_message", {
4709
- description: "Send a message to Quinn's ZenFlo app inbox for cross-session communication",
4710
- title: "Send Inbox Message",
4711
- inputSchema: {
4712
- title: z.z.string().describe('Message title (e.g., "Task completed", "Found a bug")'),
4713
- message: z.z.string().describe("Message content/details"),
4714
- sessionId: z.z.string().optional().describe("Optional session ID to link the message to (makes it clickable)"),
4715
- priority: z.z.enum(["low", "normal", "high"]).optional().describe("Message priority (affects icon and color)")
4716
- }
4717
- }, async (args) => {
4718
- types.logger.debug("[zenfloMCP] Sending inbox message:", args.title);
4719
- try {
4720
- await apiClient.sendInboxMessage({
4721
- title: args.title,
4722
- message: args.message,
4723
- sessionId: args.sessionId,
4724
- priority: args.priority || "normal"
4725
- });
4726
- return {
4727
- content: [
4728
- {
4729
- type: "text",
4730
- text: `Successfully sent inbox message: "${args.title}"`
4731
- }
4732
- ],
4733
- isError: false
4734
- };
4735
- } catch (error) {
4736
- types.logger.debug("[zenfloMCP] Error sending inbox message:", error);
4737
- return {
4738
- content: [
4739
- {
4740
- type: "text",
4741
- text: `Failed to send inbox message: ${error instanceof Error ? error.message : String(error)}`
4742
- }
4743
- ],
4744
- isError: true
4745
- };
4746
- }
4747
- });
4748
4708
  const transport = new streamableHttp_js.StreamableHTTPServerTransport({
4749
4709
  // NOTE: Returning session id here will result in claude
4750
4710
  // sdk spawn to fail with `Invalid Request: Server already initialized`
@@ -4769,7 +4729,7 @@ async function startZenfloServer(client, apiClient) {
4769
4729
  });
4770
4730
  return {
4771
4731
  url: baseUrl.toString(),
4772
- toolNames: ["change_title", "send_inbox_message"],
4732
+ toolNames: ["change_title"],
4773
4733
  stop: () => {
4774
4734
  types.logger.debug("[zenfloMCP] Stopping server");
4775
4735
  mcp.close();
@@ -4804,7 +4764,7 @@ async function runClaude(credentials, options = {}) {
4804
4764
  const settings = await types.readSettings();
4805
4765
  let machineId = settings?.machineId;
4806
4766
  if (!machineId) {
4807
- console.error(`[START] No machine ID found in settings, which is unexepcted since authAndSetupMachineIfNeeded should have created it. Please report this issue on https://github.com/slopus/happy-cli/issues`);
4767
+ console.error(`[START] No machine ID found in settings, which is unexpected since authAndSetupMachineIfNeeded should have created it. Please report this issue on https://github.com/zenflo/zenflo/issues`);
4808
4768
  process.exit(1);
4809
4769
  }
4810
4770
  types.logger.debug(`Using machineId: ${machineId}`);
@@ -4857,7 +4817,7 @@ async function runClaude(credentials, options = {}) {
4857
4817
  }
4858
4818
  });
4859
4819
  const session = api.sessionSyncClient(response);
4860
- const zenfloServer = await startZenfloServer(session, api);
4820
+ const zenfloServer = await startZenfloServer(session);
4861
4821
  types.logger.debug(`[START] ZenFlo MCP server started at ${zenfloServer.url}`);
4862
4822
  const logPath = types.logger.logFilePath;
4863
4823
  types.logger.infoDeveloper(`Session: ${response.id}`);
@@ -5065,7 +5025,7 @@ async function runClaude(credentials, options = {}) {
5065
5025
  process.exit(0);
5066
5026
  }
5067
5027
 
5068
- const __filename$1 = url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-DorsFBUD.cjs', document.baseURI).href)));
5028
+ const __filename$1 = url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-BCav_-KH.cjs', document.baseURI).href)));
5069
5029
  const __dirname$1 = path.dirname(__filename$1);
5070
5030
  const PLIST_LABEL$1 = "com.zenflo.daemon";
5071
5031
  const LAUNCH_AGENTS_DIR$1 = path.join(os$1.homedir(), "Library", "LaunchAgents");
@@ -5620,14 +5580,14 @@ async function handleAuthCommand(args) {
5620
5580
  }
5621
5581
  function showAuthHelp() {
5622
5582
  console.log(`
5623
- ${chalk.bold("happy auth")} - Authentication management
5583
+ ${chalk.bold("zenflo auth")} - Authentication management
5624
5584
 
5625
5585
  ${chalk.bold("Usage:")}
5626
- happy auth login [--force] Authenticate with Happy
5627
- happy auth logout Remove authentication and machine data
5628
- happy auth status Show authentication status
5629
- happy auth show-backup Display backup key for mobile/web clients
5630
- happy auth help Show this help message
5586
+ zenflo auth login [--force] Authenticate with ZenFlo
5587
+ zenflo auth logout Remove authentication and machine data
5588
+ zenflo auth status Show authentication status
5589
+ zenflo auth show-backup Display backup key for mobile/web clients
5590
+ zenflo auth help Show this help message
5631
5591
 
5632
5592
  ${chalk.bold("Options:")}
5633
5593
  --force Clear credentials, machine ID, and stop daemon before re-auth
@@ -5662,7 +5622,7 @@ async function handleAuthLogin(args) {
5662
5622
  console.log(chalk.green("\u2713 Already authenticated"));
5663
5623
  console.log(chalk.gray(` Machine ID: ${settings.machineId}`));
5664
5624
  console.log(chalk.gray(` Host: ${os.hostname()}`));
5665
- console.log(chalk.gray(` Use 'happy auth login --force' to re-authenticate`));
5625
+ console.log(chalk.gray(` Use 'zenflo auth login --force' to re-authenticate`));
5666
5626
  return;
5667
5627
  } else if (existingCreds && !settings?.machineId) {
5668
5628
  console.log(chalk.yellow("\u26A0\uFE0F Credentials exist but machine ID is missing"));
@@ -5680,14 +5640,14 @@ async function handleAuthLogin(args) {
5680
5640
  }
5681
5641
  }
5682
5642
  async function handleAuthLogout() {
5683
- const happyDir = types.configuration.zenfloHomeDir;
5643
+ const zenfloDir = types.configuration.zenfloHomeDir;
5684
5644
  const credentials = await types.readCredentials();
5685
5645
  if (!credentials) {
5686
5646
  console.log(chalk.yellow("Not currently authenticated"));
5687
5647
  return;
5688
5648
  }
5689
- console.log(chalk.blue("This will log you out of Happy"));
5690
- console.log(chalk.yellow("\u26A0\uFE0F You will need to re-authenticate to use Happy again"));
5649
+ console.log(chalk.blue("This will log you out of ZenFlo"));
5650
+ console.log(chalk.yellow("\u26A0\uFE0F You will need to re-authenticate to use ZenFlo again"));
5691
5651
  const rl = node_readline.createInterface({
5692
5652
  input: process.stdin,
5693
5653
  output: process.stdout
@@ -5703,11 +5663,11 @@ async function handleAuthLogout() {
5703
5663
  console.log(chalk.gray("Stopped daemon"));
5704
5664
  } catch {
5705
5665
  }
5706
- if (fs.existsSync(happyDir)) {
5707
- fs.rmSync(happyDir, { recursive: true, force: true });
5666
+ if (fs.existsSync(zenfloDir)) {
5667
+ fs.rmSync(zenfloDir, { recursive: true, force: true });
5708
5668
  }
5709
5669
  console.log(chalk.green("\u2713 Successfully logged out"));
5710
- console.log(chalk.gray(' Run "happy auth login" to authenticate again'));
5670
+ console.log(chalk.gray(' Run "zenflo auth login" to authenticate again'));
5711
5671
  } catch (error) {
5712
5672
  throw new Error(`Failed to logout: ${error instanceof Error ? error.message : "Unknown error"}`);
5713
5673
  }
@@ -5721,7 +5681,7 @@ async function handleAuthStatus() {
5721
5681
  console.log(chalk.bold("\nAuthentication Status\n"));
5722
5682
  if (!credentials) {
5723
5683
  console.log(chalk.red("\u2717 Not authenticated"));
5724
- console.log(chalk.gray(' Run "happy auth login" to authenticate'));
5684
+ console.log(chalk.gray(' Run "zenflo auth login" to authenticate'));
5725
5685
  return;
5726
5686
  }
5727
5687
  console.log(chalk.green("\u2713 Authenticated"));
@@ -5733,7 +5693,7 @@ async function handleAuthStatus() {
5733
5693
  console.log(chalk.gray(` Host: ${os.hostname()}`));
5734
5694
  } else {
5735
5695
  console.log(chalk.yellow("\u26A0\uFE0F Machine not registered"));
5736
- console.log(chalk.gray(' Run "happy auth login --force" to fix this'));
5696
+ console.log(chalk.gray(' Run "zenflo auth login --force" to fix this'));
5737
5697
  }
5738
5698
  console.log(chalk.gray(`
5739
5699
  Data directory: ${types.configuration.zenfloHomeDir}`));
@@ -6247,38 +6207,38 @@ async function handleConnectCommand(args) {
6247
6207
  }
6248
6208
  function showConnectHelp() {
6249
6209
  console.log(`
6250
- ${chalk.bold("happy connect")} - Connect AI vendor API keys to Happy cloud
6210
+ ${chalk.bold("zenflo connect")} - Connect AI vendor API keys to ZenFlo cloud
6251
6211
 
6252
6212
  ${chalk.bold("Usage:")}
6253
- happy connect codex Store your Codex API key in Happy cloud
6254
- happy connect claude Store your Anthropic API key in Happy cloud
6255
- happy connect gemini Store your Gemini API key in Happy cloud
6256
- happy connect help Show this help message
6213
+ zenflo connect codex Store your Codex API key in ZenFlo cloud
6214
+ zenflo connect claude Store your Anthropic API key in ZenFlo cloud
6215
+ zenflo connect gemini Store your Gemini API key in ZenFlo cloud
6216
+ zenflo connect help Show this help message
6257
6217
 
6258
6218
  ${chalk.bold("Description:")}
6259
6219
  The connect command allows you to securely store your AI vendor API keys
6260
- in Happy cloud. This enables you to use these services through Happy
6220
+ in ZenFlo cloud. This enables you to use these services through ZenFlo
6261
6221
  without exposing your API keys locally.
6262
6222
 
6263
6223
  ${chalk.bold("Examples:")}
6264
- happy connect codex
6265
- happy connect claude
6266
- happy connect gemini
6224
+ zenflo connect codex
6225
+ zenflo connect claude
6226
+ zenflo connect gemini
6267
6227
 
6268
6228
  ${chalk.bold("Notes:")}
6269
- \u2022 You must be authenticated with Happy first (run 'happy auth login')
6270
- \u2022 API keys are encrypted and stored securely in Happy cloud
6229
+ \u2022 You must be authenticated with ZenFlo first (run 'zenflo auth login')
6230
+ \u2022 API keys are encrypted and stored securely in ZenFlo cloud
6271
6231
  \u2022 You can manage your stored keys at app.zenflo.dev
6272
6232
  `);
6273
6233
  }
6274
6234
  async function handleConnectVendor(vendor, displayName) {
6275
6235
  console.log(chalk.bold(`
6276
- \u{1F50C} Connecting ${displayName} to Happy cloud
6236
+ \u{1F50C} Connecting ${displayName} to ZenFlo cloud
6277
6237
  `));
6278
6238
  const credentials = await types.readCredentials();
6279
6239
  if (!credentials) {
6280
- console.log(chalk.yellow("\u26A0\uFE0F Not authenticated with Happy"));
6281
- console.log(chalk.gray(' Please run "happy auth login" first'));
6240
+ console.log(chalk.yellow("\u26A0\uFE0F Not authenticated with ZenFlo"));
6241
+ console.log(chalk.gray(' Please run "zenflo auth login" first'));
6282
6242
  process.exit(1);
6283
6243
  }
6284
6244
  const api = await types.ApiClient.create(credentials);
@@ -6313,7 +6273,7 @@ async function handleConnectVendor(vendor, displayName) {
6313
6273
  const subcommand = args[0];
6314
6274
  if (subcommand === "doctor") {
6315
6275
  if (args[1] === "clean") {
6316
- const result = await killRunawayHappyProcesses();
6276
+ const result = await killRunawayZenfloProcesses();
6317
6277
  console.log(`Cleaned up ${result.killed} runaway processes`);
6318
6278
  if (result.errors.length > 0) {
6319
6279
  console.log("Errors:", result.errors);
@@ -6346,7 +6306,7 @@ async function handleConnectVendor(vendor, displayName) {
6346
6306
  return;
6347
6307
  } else if (subcommand === "codex") {
6348
6308
  try {
6349
- const { runCodex } = await Promise.resolve().then(function () { return require('./runCodex-iG8dNNS8.cjs'); });
6309
+ const { runCodex } = await Promise.resolve().then(function () { return require('./runCodex-BhI-aMek.cjs'); });
6350
6310
  let startedBy = void 0;
6351
6311
  for (let i = 1; i < args.length; i++) {
6352
6312
  if (args[i] === "--started-by") {
@@ -6367,7 +6327,7 @@ async function handleConnectVendor(vendor, displayName) {
6367
6327
  return;
6368
6328
  } else if (subcommand === "ccr" || subcommand === "glm") {
6369
6329
  try {
6370
- const { runCCR } = await Promise.resolve().then(function () { return require('./runCCR-CGH5HTKg.cjs'); });
6330
+ const { runCCR } = await Promise.resolve().then(function () { return require('./runCCR-CAUBpsGG.cjs'); });
6371
6331
  let startedBy = void 0;
6372
6332
  for (let i = 1; i < args.length; i++) {
6373
6333
  if (args[i] === "--started-by") {
@@ -6387,7 +6347,7 @@ async function handleConnectVendor(vendor, displayName) {
6387
6347
  }
6388
6348
  return;
6389
6349
  } else if (subcommand === "logout") {
6390
- console.log(chalk.yellow('Note: "happy logout" is deprecated. Use "happy auth logout" instead.\n'));
6350
+ console.log(chalk.yellow('Note: "zenflo logout" is deprecated. Use "zenflo auth logout" instead.\n'));
6391
6351
  try {
6392
6352
  await handleAuthCommand(["logout"]);
6393
6353
  } catch (error) {
@@ -6470,13 +6430,13 @@ async function handleConnectVendor(vendor, displayName) {
6470
6430
  let statusModule;
6471
6431
  switch (process.platform) {
6472
6432
  case "darwin":
6473
- statusModule = await Promise.resolve().then(function () { return require('./status-CmPaH0SP.cjs'); });
6433
+ statusModule = await Promise.resolve().then(function () { return require('./status-DMFI5EdW.cjs'); });
6474
6434
  break;
6475
6435
  case "win32":
6476
- statusModule = await Promise.resolve().then(function () { return require('./status-BXVKEnXX.cjs'); });
6436
+ statusModule = await Promise.resolve().then(function () { return require('./status-ByHnu9oN.cjs'); });
6477
6437
  break;
6478
6438
  case "linux":
6479
- statusModule = await Promise.resolve().then(function () { return require('./status-0SavEMdm.cjs'); });
6439
+ statusModule = await Promise.resolve().then(function () { return require('./status-Dz3SVH5d.cjs'); });
6480
6440
  break;
6481
6441
  default:
6482
6442
  console.error(chalk.red(`Status command not supported on platform: ${process.platform}`));
@@ -6512,20 +6472,20 @@ async function handleConnectVendor(vendor, displayName) {
6512
6472
  }
6513
6473
  } else {
6514
6474
  console.log(`
6515
- ${chalk.bold("happy daemon")} - Daemon management
6475
+ ${chalk.bold("zenflo daemon")} - Daemon management
6516
6476
 
6517
6477
  ${chalk.bold("Usage:")}
6518
- happy daemon start Start the daemon (detached)
6519
- happy daemon stop Stop the daemon (sessions stay alive)
6520
- happy daemon status Show daemon status
6521
- happy daemon list List active sessions
6478
+ zenflo daemon start Start the daemon (detached)
6479
+ zenflo daemon stop Stop the daemon (sessions stay alive)
6480
+ zenflo daemon status Show daemon status
6481
+ zenflo daemon list List active sessions
6522
6482
 
6523
- If you want to kill all happy related processes run
6524
- ${chalk.cyan("happy doctor clean")}
6483
+ If you want to kill all zenflo related processes run
6484
+ ${chalk.cyan("zenflo doctor clean")}
6525
6485
 
6526
6486
  ${chalk.bold("Note:")} The daemon runs in the background and manages Claude sessions.
6527
6487
 
6528
- ${chalk.bold("To clean up runaway processes:")} Use ${chalk.cyan("happy doctor clean")}
6488
+ ${chalk.bold("To clean up runaway processes:")} Use ${chalk.cyan("zenflo doctor clean")}
6529
6489
  `);
6530
6490
  }
6531
6491
  return;
@@ -6563,29 +6523,28 @@ ${chalk.bold("To clean up runaway processes:")} Use ${chalk.cyan("happy doctor c
6563
6523
  }
6564
6524
  if (showHelp) {
6565
6525
  console.log(`
6566
- ${chalk.bold("happy")} - Claude Code On the Go
6526
+ ${chalk.bold("zenflo")} - Claude Code with ZenFlo
6567
6527
 
6568
6528
  ${chalk.bold("Usage:")}
6569
- happy [options] Start Claude with mobile control
6570
- happy auth Manage authentication
6571
- happy codex Start Codex mode
6572
- happy connect Connect AI vendor API keys
6573
- happy notify Send push notification
6574
- happy daemon Manage background service that allows
6529
+ zenflo [options] Start Claude with mobile control
6530
+ zenflo auth Manage authentication
6531
+ zenflo codex Start Codex mode
6532
+ zenflo connect Connect AI vendor API keys
6533
+ zenflo notify Send push notification
6534
+ zenflo daemon Manage background service that allows
6575
6535
  to spawn new sessions away from your computer
6576
- happy doctor System diagnostics & troubleshooting
6536
+ zenflo doctor System diagnostics & troubleshooting
6577
6537
 
6578
6538
  ${chalk.bold("Examples:")}
6579
- happy Start session
6580
- happy --yolo Start with bypassing permissions
6581
- happy sugar for --dangerously-skip-permissions
6582
- happy auth login --force Authenticate
6583
- happy doctor Run diagnostics
6539
+ zenflo Start session
6540
+ zenflo --yolo Start with bypassing permissions
6541
+ zenflo auth login --force Authenticate
6542
+ zenflo doctor Run diagnostics
6584
6543
 
6585
- ${chalk.bold("Happy supports ALL Claude options!")}
6586
- Use any claude flag with happy as you would with claude. Our favorite:
6544
+ ${chalk.bold("ZenFlo supports ALL Claude options!")}
6545
+ Use any claude flag with zenflo as you would with claude. Our favorite:
6587
6546
 
6588
- happy --resume
6547
+ zenflo --resume
6589
6548
 
6590
6549
  ${chalk.gray("\u2500".repeat(60))}
6591
6550
  ${chalk.bold.cyan("Claude Code Options (from `claude --help`):")}
@@ -6605,7 +6564,7 @@ ${chalk.bold.cyan("Claude Code Options (from `claude --help`):")}
6605
6564
  credentials
6606
6565
  } = await authAndSetupMachineIfNeeded();
6607
6566
  types.logger.debug("Ensuring ZenFlo background service is running & matches our version...");
6608
- if (!await isDaemonRunningCurrentlyInstalledHappyVersion()) {
6567
+ if (!await isDaemonRunningCurrentlyInstalledZenfloVersion()) {
6609
6568
  types.logger.debug("Starting ZenFlo background service...");
6610
6569
  const daemonProcess = spawnZenfloCLI(["daemon", "start-sync"], {
6611
6570
  detached: true,
@@ -6645,37 +6604,37 @@ async function handleNotifyCommand(args) {
6645
6604
  }
6646
6605
  if (showHelp) {
6647
6606
  console.log(`
6648
- ${chalk.bold("happy notify")} - Send notification
6607
+ ${chalk.bold("zenflo notify")} - Send notification
6649
6608
 
6650
6609
  ${chalk.bold("Usage:")}
6651
- happy notify -p <message> [-t <title>] Send notification with custom message and optional title
6652
- happy notify -h, --help Show this help
6610
+ zenflo notify -p <message> [-t <title>] Send notification with custom message and optional title
6611
+ zenflo notify -h, --help Show this help
6653
6612
 
6654
6613
  ${chalk.bold("Options:")}
6655
6614
  -p <message> Notification message (required)
6656
- -t <title> Notification title (optional, defaults to "Happy")
6615
+ -t <title> Notification title (optional, defaults to "ZenFlo")
6657
6616
 
6658
6617
  ${chalk.bold("Examples:")}
6659
- happy notify -p "Deployment complete!"
6660
- happy notify -p "System update complete" -t "Server Status"
6661
- happy notify -t "Alert" -p "Database connection restored"
6618
+ zenflo notify -p "Deployment complete!"
6619
+ zenflo notify -p "System update complete" -t "Server Status"
6620
+ zenflo notify -t "Alert" -p "Database connection restored"
6662
6621
  `);
6663
6622
  return;
6664
6623
  }
6665
6624
  if (!message) {
6666
6625
  console.error(chalk.red('Error: Message is required. Use -p "your message" to specify the notification text.'));
6667
- console.log(chalk.gray('Run "happy notify --help" for usage information.'));
6626
+ console.log(chalk.gray('Run "zenflo notify --help" for usage information.'));
6668
6627
  process.exit(1);
6669
6628
  }
6670
6629
  let credentials = await types.readCredentials();
6671
6630
  if (!credentials) {
6672
- console.error(chalk.red('Error: Not authenticated. Please run "happy auth login" first.'));
6631
+ console.error(chalk.red('Error: Not authenticated. Please run "zenflo auth login" first.'));
6673
6632
  process.exit(1);
6674
6633
  }
6675
6634
  console.log(chalk.blue("\u{1F4F1} Sending push notification..."));
6676
6635
  try {
6677
6636
  const api = await types.ApiClient.create(credentials);
6678
- const notificationTitle = title || "Happy";
6637
+ const notificationTitle = title || "ZenFlo";
6679
6638
  api.push().sendToAllDevices(
6680
6639
  notificationTitle,
6681
6640
  message,
@@ -1,7 +1,7 @@
1
1
  import chalk from 'chalk';
2
2
  import os$1, { homedir } from 'node:os';
3
3
  import { randomUUID, randomBytes } from 'node:crypto';
4
- import { l as logger, p as projectPath, e as backoff, f as delay, R as RawJSONLinesSchema, g as AsyncLock, c as configuration, r as readDaemonState, h as clearDaemonState, d as packageJson, b as readSettings, i as readCredentials, j as encodeBase64, u as updateSettings, k as encodeBase64Url, m as decodeBase64, w as writeCredentialsLegacy, n as writeCredentialsDataKey, o as acquireDaemonLock, q as writeDaemonState, A as ApiClient, s as releaseDaemonLock, t as clearCredentials, v as clearMachineId, x as getLatestDaemonLog } from './types-BZBppaDC.mjs';
4
+ import { l as logger, p as projectPath, e as backoff, f as delay, R as RawJSONLinesSchema, g as AsyncLock, c as configuration, r as readDaemonState, h as clearDaemonState, d as packageJson, b as readSettings, i as readCredentials, j as encodeBase64, u as updateSettings, k as encodeBase64Url, m as decodeBase64, w as writeCredentialsLegacy, n as writeCredentialsDataKey, o as acquireDaemonLock, q as writeDaemonState, A as ApiClient, s as releaseDaemonLock, t as clearCredentials, v as clearMachineId, x as getLatestDaemonLog } from './types-BPoWNAha.mjs';
5
5
  import { spawn, execSync, execFileSync } from 'node:child_process';
6
6
  import { resolve, join } from 'node:path';
7
7
  import { createInterface } from 'node:readline';
@@ -3452,7 +3452,7 @@ async function checkIfDaemonRunningAndCleanupStaleState() {
3452
3452
  return false;
3453
3453
  }
3454
3454
  }
3455
- async function isDaemonRunningCurrentlyInstalledHappyVersion() {
3455
+ async function isDaemonRunningCurrentlyInstalledZenfloVersion() {
3456
3456
  logger.debug("[DAEMON CONTROL] Checking if daemon is running same version");
3457
3457
  const runningDaemon = await checkIfDaemonRunningAndCleanupStaleState();
3458
3458
  if (!runningDaemon) {
@@ -3529,8 +3529,8 @@ async function findAllHappyProcesses() {
3529
3529
  for (const proc of processes) {
3530
3530
  const cmd = proc.cmd || "";
3531
3531
  const name = proc.name || "";
3532
- const isHappy = name.includes("happy") || name === "node" && (cmd.includes("happy-cli") || cmd.includes("dist/index.mjs")) || cmd.includes("happy.mjs") || cmd.includes("zenflo") || cmd.includes("tsx") && cmd.includes("src/index.ts") && cmd.includes("happy-cli");
3533
- if (!isHappy) continue;
3532
+ const isZenflo = name.includes("zenflo") || name === "node" && (cmd.includes("zenflo") || cmd.includes("dist/index.mjs")) || cmd.includes("zenflo.mjs") || cmd.includes("tsx") && cmd.includes("src/index.ts");
3533
+ if (!isZenflo) continue;
3534
3534
  let type = "unknown";
3535
3535
  if (proc.pid === process.pid) {
3536
3536
  type = "current";
@@ -3560,7 +3560,7 @@ async function findRunawayHappyProcesses() {
3560
3560
  (p) => p.pid !== process.pid && (p.type === "daemon" || p.type === "dev-daemon" || p.type === "daemon-spawned-session" || p.type === "dev-daemon-spawned" || p.type === "daemon-version-check" || p.type === "dev-daemon-version-check")
3561
3561
  ).map((p) => ({ pid: p.pid, command: p.command }));
3562
3562
  }
3563
- async function killRunawayHappyProcesses() {
3563
+ async function killRunawayZenfloProcesses() {
3564
3564
  const runawayProcesses = await findRunawayHappyProcesses();
3565
3565
  const errors = [];
3566
3566
  let killed = 0;
@@ -3778,8 +3778,8 @@ ${typeLabels[type] || type}:`));
3778
3778
  console.log(chalk.yellow("No log files found"));
3779
3779
  }
3780
3780
  console.log(chalk.bold("\n\u{1F41B} Support & Bug Reports"));
3781
- console.log(`Report issues: ${chalk.blue("https://github.com/slopus/happy-cli/issues")}`);
3782
- console.log(`Documentation: ${chalk.blue("https://happy.engineering/")}`);
3781
+ console.log(`Report issues: ${chalk.blue("https://github.com/zenflo/zenflo/issues")}`);
3782
+ console.log(`Documentation: ${chalk.blue("https://zenflo.dev/docs")}`);
3783
3783
  }
3784
3784
  console.log(chalk.green("\n\u2705 Doctor diagnosis complete!\n"));
3785
3785
  }
@@ -4286,7 +4286,7 @@ async function startDaemon() {
4286
4286
  });
4287
4287
  logger.debug("[DAEMON RUN] Starting daemon process...");
4288
4288
  logger.debugLargeJson("[DAEMON RUN] Environment", getEnvironmentInfo());
4289
- const runningDaemonVersionMatches = await isDaemonRunningCurrentlyInstalledHappyVersion();
4289
+ const runningDaemonVersionMatches = await isDaemonRunningCurrentlyInstalledZenfloVersion();
4290
4290
  if (!runningDaemonVersionMatches) {
4291
4291
  logger.debug("[DAEMON RUN] Daemon version mismatch detected, restarting daemon with current CLI version");
4292
4292
  await stopDaemon();
@@ -4633,7 +4633,7 @@ async function startDaemon() {
4633
4633
  }
4634
4634
  }
4635
4635
 
4636
- async function startZenfloServer(client, apiClient) {
4636
+ async function startZenfloServer(client) {
4637
4637
  const handler = async (title) => {
4638
4638
  logger.debug("[zenfloMCP] Changing title to:", title);
4639
4639
  try {
@@ -4650,7 +4650,7 @@ async function startZenfloServer(client, apiClient) {
4650
4650
  const mcp = new McpServer({
4651
4651
  name: "ZenFlo MCP",
4652
4652
  version: "1.0.0",
4653
- description: "ZenFlo CLI MCP server with chat session management tools"
4653
+ description: "ZenFlo CLI MCP server for chat session title management"
4654
4654
  });
4655
4655
  mcp.registerTool("change_title", {
4656
4656
  description: "Change the title of the current chat session",
@@ -4683,46 +4683,6 @@ async function startZenfloServer(client, apiClient) {
4683
4683
  };
4684
4684
  }
4685
4685
  });
4686
- mcp.registerTool("send_inbox_message", {
4687
- description: "Send a message to Quinn's ZenFlo app inbox for cross-session communication",
4688
- title: "Send Inbox Message",
4689
- inputSchema: {
4690
- title: z.string().describe('Message title (e.g., "Task completed", "Found a bug")'),
4691
- message: z.string().describe("Message content/details"),
4692
- sessionId: z.string().optional().describe("Optional session ID to link the message to (makes it clickable)"),
4693
- priority: z.enum(["low", "normal", "high"]).optional().describe("Message priority (affects icon and color)")
4694
- }
4695
- }, async (args) => {
4696
- logger.debug("[zenfloMCP] Sending inbox message:", args.title);
4697
- try {
4698
- await apiClient.sendInboxMessage({
4699
- title: args.title,
4700
- message: args.message,
4701
- sessionId: args.sessionId,
4702
- priority: args.priority || "normal"
4703
- });
4704
- return {
4705
- content: [
4706
- {
4707
- type: "text",
4708
- text: `Successfully sent inbox message: "${args.title}"`
4709
- }
4710
- ],
4711
- isError: false
4712
- };
4713
- } catch (error) {
4714
- logger.debug("[zenfloMCP] Error sending inbox message:", error);
4715
- return {
4716
- content: [
4717
- {
4718
- type: "text",
4719
- text: `Failed to send inbox message: ${error instanceof Error ? error.message : String(error)}`
4720
- }
4721
- ],
4722
- isError: true
4723
- };
4724
- }
4725
- });
4726
4686
  const transport = new StreamableHTTPServerTransport({
4727
4687
  // NOTE: Returning session id here will result in claude
4728
4688
  // sdk spawn to fail with `Invalid Request: Server already initialized`
@@ -4747,7 +4707,7 @@ async function startZenfloServer(client, apiClient) {
4747
4707
  });
4748
4708
  return {
4749
4709
  url: baseUrl.toString(),
4750
- toolNames: ["change_title", "send_inbox_message"],
4710
+ toolNames: ["change_title"],
4751
4711
  stop: () => {
4752
4712
  logger.debug("[zenfloMCP] Stopping server");
4753
4713
  mcp.close();
@@ -4782,7 +4742,7 @@ async function runClaude(credentials, options = {}) {
4782
4742
  const settings = await readSettings();
4783
4743
  let machineId = settings?.machineId;
4784
4744
  if (!machineId) {
4785
- console.error(`[START] No machine ID found in settings, which is unexepcted since authAndSetupMachineIfNeeded should have created it. Please report this issue on https://github.com/slopus/happy-cli/issues`);
4745
+ console.error(`[START] No machine ID found in settings, which is unexpected since authAndSetupMachineIfNeeded should have created it. Please report this issue on https://github.com/zenflo/zenflo/issues`);
4786
4746
  process.exit(1);
4787
4747
  }
4788
4748
  logger.debug(`Using machineId: ${machineId}`);
@@ -4835,7 +4795,7 @@ async function runClaude(credentials, options = {}) {
4835
4795
  }
4836
4796
  });
4837
4797
  const session = api.sessionSyncClient(response);
4838
- const zenfloServer = await startZenfloServer(session, api);
4798
+ const zenfloServer = await startZenfloServer(session);
4839
4799
  logger.debug(`[START] ZenFlo MCP server started at ${zenfloServer.url}`);
4840
4800
  const logPath = logger.logFilePath;
4841
4801
  logger.infoDeveloper(`Session: ${response.id}`);
@@ -5598,14 +5558,14 @@ async function handleAuthCommand(args) {
5598
5558
  }
5599
5559
  function showAuthHelp() {
5600
5560
  console.log(`
5601
- ${chalk.bold("happy auth")} - Authentication management
5561
+ ${chalk.bold("zenflo auth")} - Authentication management
5602
5562
 
5603
5563
  ${chalk.bold("Usage:")}
5604
- happy auth login [--force] Authenticate with Happy
5605
- happy auth logout Remove authentication and machine data
5606
- happy auth status Show authentication status
5607
- happy auth show-backup Display backup key for mobile/web clients
5608
- happy auth help Show this help message
5564
+ zenflo auth login [--force] Authenticate with ZenFlo
5565
+ zenflo auth logout Remove authentication and machine data
5566
+ zenflo auth status Show authentication status
5567
+ zenflo auth show-backup Display backup key for mobile/web clients
5568
+ zenflo auth help Show this help message
5609
5569
 
5610
5570
  ${chalk.bold("Options:")}
5611
5571
  --force Clear credentials, machine ID, and stop daemon before re-auth
@@ -5640,7 +5600,7 @@ async function handleAuthLogin(args) {
5640
5600
  console.log(chalk.green("\u2713 Already authenticated"));
5641
5601
  console.log(chalk.gray(` Machine ID: ${settings.machineId}`));
5642
5602
  console.log(chalk.gray(` Host: ${os$1.hostname()}`));
5643
- console.log(chalk.gray(` Use 'happy auth login --force' to re-authenticate`));
5603
+ console.log(chalk.gray(` Use 'zenflo auth login --force' to re-authenticate`));
5644
5604
  return;
5645
5605
  } else if (existingCreds && !settings?.machineId) {
5646
5606
  console.log(chalk.yellow("\u26A0\uFE0F Credentials exist but machine ID is missing"));
@@ -5658,14 +5618,14 @@ async function handleAuthLogin(args) {
5658
5618
  }
5659
5619
  }
5660
5620
  async function handleAuthLogout() {
5661
- const happyDir = configuration.zenfloHomeDir;
5621
+ const zenfloDir = configuration.zenfloHomeDir;
5662
5622
  const credentials = await readCredentials();
5663
5623
  if (!credentials) {
5664
5624
  console.log(chalk.yellow("Not currently authenticated"));
5665
5625
  return;
5666
5626
  }
5667
- console.log(chalk.blue("This will log you out of Happy"));
5668
- console.log(chalk.yellow("\u26A0\uFE0F You will need to re-authenticate to use Happy again"));
5627
+ console.log(chalk.blue("This will log you out of ZenFlo"));
5628
+ console.log(chalk.yellow("\u26A0\uFE0F You will need to re-authenticate to use ZenFlo again"));
5669
5629
  const rl = createInterface({
5670
5630
  input: process.stdin,
5671
5631
  output: process.stdout
@@ -5681,11 +5641,11 @@ async function handleAuthLogout() {
5681
5641
  console.log(chalk.gray("Stopped daemon"));
5682
5642
  } catch {
5683
5643
  }
5684
- if (existsSync(happyDir)) {
5685
- rmSync(happyDir, { recursive: true, force: true });
5644
+ if (existsSync(zenfloDir)) {
5645
+ rmSync(zenfloDir, { recursive: true, force: true });
5686
5646
  }
5687
5647
  console.log(chalk.green("\u2713 Successfully logged out"));
5688
- console.log(chalk.gray(' Run "happy auth login" to authenticate again'));
5648
+ console.log(chalk.gray(' Run "zenflo auth login" to authenticate again'));
5689
5649
  } catch (error) {
5690
5650
  throw new Error(`Failed to logout: ${error instanceof Error ? error.message : "Unknown error"}`);
5691
5651
  }
@@ -5699,7 +5659,7 @@ async function handleAuthStatus() {
5699
5659
  console.log(chalk.bold("\nAuthentication Status\n"));
5700
5660
  if (!credentials) {
5701
5661
  console.log(chalk.red("\u2717 Not authenticated"));
5702
- console.log(chalk.gray(' Run "happy auth login" to authenticate'));
5662
+ console.log(chalk.gray(' Run "zenflo auth login" to authenticate'));
5703
5663
  return;
5704
5664
  }
5705
5665
  console.log(chalk.green("\u2713 Authenticated"));
@@ -5711,7 +5671,7 @@ async function handleAuthStatus() {
5711
5671
  console.log(chalk.gray(` Host: ${os$1.hostname()}`));
5712
5672
  } else {
5713
5673
  console.log(chalk.yellow("\u26A0\uFE0F Machine not registered"));
5714
- console.log(chalk.gray(' Run "happy auth login --force" to fix this'));
5674
+ console.log(chalk.gray(' Run "zenflo auth login --force" to fix this'));
5715
5675
  }
5716
5676
  console.log(chalk.gray(`
5717
5677
  Data directory: ${configuration.zenfloHomeDir}`));
@@ -6225,38 +6185,38 @@ async function handleConnectCommand(args) {
6225
6185
  }
6226
6186
  function showConnectHelp() {
6227
6187
  console.log(`
6228
- ${chalk.bold("happy connect")} - Connect AI vendor API keys to Happy cloud
6188
+ ${chalk.bold("zenflo connect")} - Connect AI vendor API keys to ZenFlo cloud
6229
6189
 
6230
6190
  ${chalk.bold("Usage:")}
6231
- happy connect codex Store your Codex API key in Happy cloud
6232
- happy connect claude Store your Anthropic API key in Happy cloud
6233
- happy connect gemini Store your Gemini API key in Happy cloud
6234
- happy connect help Show this help message
6191
+ zenflo connect codex Store your Codex API key in ZenFlo cloud
6192
+ zenflo connect claude Store your Anthropic API key in ZenFlo cloud
6193
+ zenflo connect gemini Store your Gemini API key in ZenFlo cloud
6194
+ zenflo connect help Show this help message
6235
6195
 
6236
6196
  ${chalk.bold("Description:")}
6237
6197
  The connect command allows you to securely store your AI vendor API keys
6238
- in Happy cloud. This enables you to use these services through Happy
6198
+ in ZenFlo cloud. This enables you to use these services through ZenFlo
6239
6199
  without exposing your API keys locally.
6240
6200
 
6241
6201
  ${chalk.bold("Examples:")}
6242
- happy connect codex
6243
- happy connect claude
6244
- happy connect gemini
6202
+ zenflo connect codex
6203
+ zenflo connect claude
6204
+ zenflo connect gemini
6245
6205
 
6246
6206
  ${chalk.bold("Notes:")}
6247
- \u2022 You must be authenticated with Happy first (run 'happy auth login')
6248
- \u2022 API keys are encrypted and stored securely in Happy cloud
6207
+ \u2022 You must be authenticated with ZenFlo first (run 'zenflo auth login')
6208
+ \u2022 API keys are encrypted and stored securely in ZenFlo cloud
6249
6209
  \u2022 You can manage your stored keys at app.zenflo.dev
6250
6210
  `);
6251
6211
  }
6252
6212
  async function handleConnectVendor(vendor, displayName) {
6253
6213
  console.log(chalk.bold(`
6254
- \u{1F50C} Connecting ${displayName} to Happy cloud
6214
+ \u{1F50C} Connecting ${displayName} to ZenFlo cloud
6255
6215
  `));
6256
6216
  const credentials = await readCredentials();
6257
6217
  if (!credentials) {
6258
- console.log(chalk.yellow("\u26A0\uFE0F Not authenticated with Happy"));
6259
- console.log(chalk.gray(' Please run "happy auth login" first'));
6218
+ console.log(chalk.yellow("\u26A0\uFE0F Not authenticated with ZenFlo"));
6219
+ console.log(chalk.gray(' Please run "zenflo auth login" first'));
6260
6220
  process.exit(1);
6261
6221
  }
6262
6222
  const api = await ApiClient.create(credentials);
@@ -6291,7 +6251,7 @@ async function handleConnectVendor(vendor, displayName) {
6291
6251
  const subcommand = args[0];
6292
6252
  if (subcommand === "doctor") {
6293
6253
  if (args[1] === "clean") {
6294
- const result = await killRunawayHappyProcesses();
6254
+ const result = await killRunawayZenfloProcesses();
6295
6255
  console.log(`Cleaned up ${result.killed} runaway processes`);
6296
6256
  if (result.errors.length > 0) {
6297
6257
  console.log("Errors:", result.errors);
@@ -6324,7 +6284,7 @@ async function handleConnectVendor(vendor, displayName) {
6324
6284
  return;
6325
6285
  } else if (subcommand === "codex") {
6326
6286
  try {
6327
- const { runCodex } = await import('./runCodex-8gWeehcl.mjs');
6287
+ const { runCodex } = await import('./runCodex-Bor-iohW.mjs');
6328
6288
  let startedBy = void 0;
6329
6289
  for (let i = 1; i < args.length; i++) {
6330
6290
  if (args[i] === "--started-by") {
@@ -6345,7 +6305,7 @@ async function handleConnectVendor(vendor, displayName) {
6345
6305
  return;
6346
6306
  } else if (subcommand === "ccr" || subcommand === "glm") {
6347
6307
  try {
6348
- const { runCCR } = await import('./runCCR-Dlh0bRKi.mjs');
6308
+ const { runCCR } = await import('./runCCR-BSTeKn4P.mjs');
6349
6309
  let startedBy = void 0;
6350
6310
  for (let i = 1; i < args.length; i++) {
6351
6311
  if (args[i] === "--started-by") {
@@ -6365,7 +6325,7 @@ async function handleConnectVendor(vendor, displayName) {
6365
6325
  }
6366
6326
  return;
6367
6327
  } else if (subcommand === "logout") {
6368
- console.log(chalk.yellow('Note: "happy logout" is deprecated. Use "happy auth logout" instead.\n'));
6328
+ console.log(chalk.yellow('Note: "zenflo logout" is deprecated. Use "zenflo auth logout" instead.\n'));
6369
6329
  try {
6370
6330
  await handleAuthCommand(["logout"]);
6371
6331
  } catch (error) {
@@ -6448,13 +6408,13 @@ async function handleConnectVendor(vendor, displayName) {
6448
6408
  let statusModule;
6449
6409
  switch (process.platform) {
6450
6410
  case "darwin":
6451
- statusModule = await import('./status-DZYEDjQb.mjs');
6411
+ statusModule = await import('./status-DmbS7OtX.mjs');
6452
6412
  break;
6453
6413
  case "win32":
6454
- statusModule = await import('./status-Df-Nf8Eh.mjs');
6414
+ statusModule = await import('./status-Bh14_wDU.mjs');
6455
6415
  break;
6456
6416
  case "linux":
6457
- statusModule = await import('./status-CImKlTHF.mjs');
6417
+ statusModule = await import('./status-BpN5JCxI.mjs');
6458
6418
  break;
6459
6419
  default:
6460
6420
  console.error(chalk.red(`Status command not supported on platform: ${process.platform}`));
@@ -6490,20 +6450,20 @@ async function handleConnectVendor(vendor, displayName) {
6490
6450
  }
6491
6451
  } else {
6492
6452
  console.log(`
6493
- ${chalk.bold("happy daemon")} - Daemon management
6453
+ ${chalk.bold("zenflo daemon")} - Daemon management
6494
6454
 
6495
6455
  ${chalk.bold("Usage:")}
6496
- happy daemon start Start the daemon (detached)
6497
- happy daemon stop Stop the daemon (sessions stay alive)
6498
- happy daemon status Show daemon status
6499
- happy daemon list List active sessions
6456
+ zenflo daemon start Start the daemon (detached)
6457
+ zenflo daemon stop Stop the daemon (sessions stay alive)
6458
+ zenflo daemon status Show daemon status
6459
+ zenflo daemon list List active sessions
6500
6460
 
6501
- If you want to kill all happy related processes run
6502
- ${chalk.cyan("happy doctor clean")}
6461
+ If you want to kill all zenflo related processes run
6462
+ ${chalk.cyan("zenflo doctor clean")}
6503
6463
 
6504
6464
  ${chalk.bold("Note:")} The daemon runs in the background and manages Claude sessions.
6505
6465
 
6506
- ${chalk.bold("To clean up runaway processes:")} Use ${chalk.cyan("happy doctor clean")}
6466
+ ${chalk.bold("To clean up runaway processes:")} Use ${chalk.cyan("zenflo doctor clean")}
6507
6467
  `);
6508
6468
  }
6509
6469
  return;
@@ -6541,29 +6501,28 @@ ${chalk.bold("To clean up runaway processes:")} Use ${chalk.cyan("happy doctor c
6541
6501
  }
6542
6502
  if (showHelp) {
6543
6503
  console.log(`
6544
- ${chalk.bold("happy")} - Claude Code On the Go
6504
+ ${chalk.bold("zenflo")} - Claude Code with ZenFlo
6545
6505
 
6546
6506
  ${chalk.bold("Usage:")}
6547
- happy [options] Start Claude with mobile control
6548
- happy auth Manage authentication
6549
- happy codex Start Codex mode
6550
- happy connect Connect AI vendor API keys
6551
- happy notify Send push notification
6552
- happy daemon Manage background service that allows
6507
+ zenflo [options] Start Claude with mobile control
6508
+ zenflo auth Manage authentication
6509
+ zenflo codex Start Codex mode
6510
+ zenflo connect Connect AI vendor API keys
6511
+ zenflo notify Send push notification
6512
+ zenflo daemon Manage background service that allows
6553
6513
  to spawn new sessions away from your computer
6554
- happy doctor System diagnostics & troubleshooting
6514
+ zenflo doctor System diagnostics & troubleshooting
6555
6515
 
6556
6516
  ${chalk.bold("Examples:")}
6557
- happy Start session
6558
- happy --yolo Start with bypassing permissions
6559
- happy sugar for --dangerously-skip-permissions
6560
- happy auth login --force Authenticate
6561
- happy doctor Run diagnostics
6517
+ zenflo Start session
6518
+ zenflo --yolo Start with bypassing permissions
6519
+ zenflo auth login --force Authenticate
6520
+ zenflo doctor Run diagnostics
6562
6521
 
6563
- ${chalk.bold("Happy supports ALL Claude options!")}
6564
- Use any claude flag with happy as you would with claude. Our favorite:
6522
+ ${chalk.bold("ZenFlo supports ALL Claude options!")}
6523
+ Use any claude flag with zenflo as you would with claude. Our favorite:
6565
6524
 
6566
- happy --resume
6525
+ zenflo --resume
6567
6526
 
6568
6527
  ${chalk.gray("\u2500".repeat(60))}
6569
6528
  ${chalk.bold.cyan("Claude Code Options (from `claude --help`):")}
@@ -6583,7 +6542,7 @@ ${chalk.bold.cyan("Claude Code Options (from `claude --help`):")}
6583
6542
  credentials
6584
6543
  } = await authAndSetupMachineIfNeeded();
6585
6544
  logger.debug("Ensuring ZenFlo background service is running & matches our version...");
6586
- if (!await isDaemonRunningCurrentlyInstalledHappyVersion()) {
6545
+ if (!await isDaemonRunningCurrentlyInstalledZenfloVersion()) {
6587
6546
  logger.debug("Starting ZenFlo background service...");
6588
6547
  const daemonProcess = spawnZenfloCLI(["daemon", "start-sync"], {
6589
6548
  detached: true,
@@ -6623,37 +6582,37 @@ async function handleNotifyCommand(args) {
6623
6582
  }
6624
6583
  if (showHelp) {
6625
6584
  console.log(`
6626
- ${chalk.bold("happy notify")} - Send notification
6585
+ ${chalk.bold("zenflo notify")} - Send notification
6627
6586
 
6628
6587
  ${chalk.bold("Usage:")}
6629
- happy notify -p <message> [-t <title>] Send notification with custom message and optional title
6630
- happy notify -h, --help Show this help
6588
+ zenflo notify -p <message> [-t <title>] Send notification with custom message and optional title
6589
+ zenflo notify -h, --help Show this help
6631
6590
 
6632
6591
  ${chalk.bold("Options:")}
6633
6592
  -p <message> Notification message (required)
6634
- -t <title> Notification title (optional, defaults to "Happy")
6593
+ -t <title> Notification title (optional, defaults to "ZenFlo")
6635
6594
 
6636
6595
  ${chalk.bold("Examples:")}
6637
- happy notify -p "Deployment complete!"
6638
- happy notify -p "System update complete" -t "Server Status"
6639
- happy notify -t "Alert" -p "Database connection restored"
6596
+ zenflo notify -p "Deployment complete!"
6597
+ zenflo notify -p "System update complete" -t "Server Status"
6598
+ zenflo notify -t "Alert" -p "Database connection restored"
6640
6599
  `);
6641
6600
  return;
6642
6601
  }
6643
6602
  if (!message) {
6644
6603
  console.error(chalk.red('Error: Message is required. Use -p "your message" to specify the notification text.'));
6645
- console.log(chalk.gray('Run "happy notify --help" for usage information.'));
6604
+ console.log(chalk.gray('Run "zenflo notify --help" for usage information.'));
6646
6605
  process.exit(1);
6647
6606
  }
6648
6607
  let credentials = await readCredentials();
6649
6608
  if (!credentials) {
6650
- console.error(chalk.red('Error: Not authenticated. Please run "happy auth login" first.'));
6609
+ console.error(chalk.red('Error: Not authenticated. Please run "zenflo auth login" first.'));
6651
6610
  process.exit(1);
6652
6611
  }
6653
6612
  console.log(chalk.blue("\u{1F4F1} Sending push notification..."));
6654
6613
  try {
6655
6614
  const api = await ApiClient.create(credentials);
6656
- const notificationTitle = title || "Happy";
6615
+ const notificationTitle = title || "ZenFlo";
6657
6616
  api.push().sendToAllDevices(
6658
6617
  notificationTitle,
6659
6618
  message,
package/dist/index.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  require('chalk');
4
- require('./index-DorsFBUD.cjs');
5
- require('./types-DlbOjNGw.cjs');
4
+ require('./index-BCav_-KH.cjs');
5
+ require('./types-DzNSylqA.cjs');
6
6
  require('zod');
7
7
  require('node:child_process');
8
8
  require('node:os');
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import 'chalk';
2
- import './index-Cq3BnI2T.mjs';
3
- import './types-BZBppaDC.mjs';
2
+ import './index-D4H-IoO4.mjs';
3
+ import './types-BPoWNAha.mjs';
4
4
  import 'zod';
5
5
  import 'node:child_process';
6
6
  import 'node:os';
package/dist/lib.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var types = require('./types-DlbOjNGw.cjs');
3
+ var types = require('./types-DzNSylqA.cjs');
4
4
  require('axios');
5
5
  require('chalk');
6
6
  require('fs');
package/dist/lib.d.cts CHANGED
@@ -734,7 +734,7 @@ declare class PushNotificationClient {
734
734
  /**
735
735
  * Minimal persistence functions for ZenFlo CLI
736
736
  *
737
- * Handles settings and private key storage in ~/.happy/ or local .happy/
737
+ * Handles settings and private key storage in ~/.zenflo/ or local .zenflo/
738
738
  */
739
739
 
740
740
  type Credentials = {
package/dist/lib.d.mts CHANGED
@@ -734,7 +734,7 @@ declare class PushNotificationClient {
734
734
  /**
735
735
  * Minimal persistence functions for ZenFlo CLI
736
736
  *
737
- * Handles settings and private key storage in ~/.happy/ or local .happy/
737
+ * Handles settings and private key storage in ~/.zenflo/ or local .zenflo/
738
738
  */
739
739
 
740
740
  type Credentials = {
package/dist/lib.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { A as ApiClient, a as ApiSessionClient, R as RawJSONLinesSchema, c as configuration, l as logger } from './types-BZBppaDC.mjs';
1
+ export { A as ApiClient, a as ApiSessionClient, R as RawJSONLinesSchema, c as configuration, l as logger } from './types-BPoWNAha.mjs';
2
2
  import 'axios';
3
3
  import 'chalk';
4
4
  import 'fs';
@@ -1,5 +1,5 @@
1
- import { r as runClaude } from './index-Cq3BnI2T.mjs';
2
- import { l as logger } from './types-BZBppaDC.mjs';
1
+ import { r as runClaude } from './index-D4H-IoO4.mjs';
2
+ import { l as logger } from './types-BPoWNAha.mjs';
3
3
  import { execSync } from 'node:child_process';
4
4
  import 'chalk';
5
5
  import 'node:os';
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-DorsFBUD.cjs');
4
- var types = require('./types-DlbOjNGw.cjs');
3
+ var index = require('./index-BCav_-KH.cjs');
4
+ var types = require('./types-DzNSylqA.cjs');
5
5
  var node_child_process = require('node:child_process');
6
6
  require('chalk');
7
7
  require('node:os');
@@ -2,14 +2,14 @@
2
2
 
3
3
  var ink = require('ink');
4
4
  var React = require('react');
5
- var types = require('./types-DlbOjNGw.cjs');
5
+ var types = require('./types-DzNSylqA.cjs');
6
6
  var index_js = require('@modelcontextprotocol/sdk/client/index.js');
7
7
  var stdio_js = require('@modelcontextprotocol/sdk/client/stdio.js');
8
8
  var z = require('zod');
9
9
  var types_js = require('@modelcontextprotocol/sdk/types.js');
10
10
  var child_process = require('child_process');
11
11
  var node_crypto = require('node:crypto');
12
- var index = require('./index-DorsFBUD.cjs');
12
+ var index = require('./index-BCav_-KH.cjs');
13
13
  var os = require('node:os');
14
14
  var node_path = require('node:path');
15
15
  var fs = require('node:fs');
@@ -774,7 +774,7 @@ async function runCodex(opts) {
774
774
  const settings = await types.readSettings();
775
775
  let machineId = settings?.machineId;
776
776
  if (!machineId) {
777
- console.error(`[START] No machine ID found in settings, which is unexpected since authAndSetupMachineIfNeeded should have created it. Please report this issue on https://github.com/slopus/happy-cli/issues`);
777
+ console.error(`[START] No machine ID found in settings, which is unexpected since authAndSetupMachineIfNeeded should have created it. Please report this issue on https://github.com/zenflo/zenflo/issues`);
778
778
  process.exit(1);
779
779
  }
780
780
  types.logger.debug(`Using machineId: ${machineId}`);
@@ -1124,7 +1124,7 @@ async function runCodex(opts) {
1124
1124
  }
1125
1125
  }
1126
1126
  });
1127
- const zenfloServer = await index.startZenfloServer(session, api);
1127
+ const zenfloServer = await index.startZenfloServer(session);
1128
1128
  const bridgeCommand = node_path.join(types.projectPath(), "bin", "zenflo-mcp.mjs");
1129
1129
  const zenModeConfig = {
1130
1130
  command: "node",
@@ -1,13 +1,13 @@
1
1
  import { useStdout, useInput, Box, Text, render } from 'ink';
2
2
  import React, { useState, useRef, useEffect, useCallback } from 'react';
3
- import { l as logger, A as ApiClient, b as readSettings, p as projectPath, c as configuration, d as packageJson } from './types-BZBppaDC.mjs';
3
+ import { l as logger, A as ApiClient, b as readSettings, p as projectPath, c as configuration, d as packageJson } from './types-BPoWNAha.mjs';
4
4
  import { Client } from '@modelcontextprotocol/sdk/client/index.js';
5
5
  import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js';
6
6
  import { z } from 'zod';
7
7
  import { ElicitRequestSchema } from '@modelcontextprotocol/sdk/types.js';
8
8
  import { execSync } from 'child_process';
9
9
  import { randomUUID } from 'node:crypto';
10
- import { i as initialMachineMetadata, n as notifyDaemonSessionStarted, M as MessageQueue2, h as hashObject, a as registerKillSessionHandler, b as MessageBuffer, s as startZenfloServer, t as trimIdent, c as stopCaffeinate } from './index-Cq3BnI2T.mjs';
10
+ import { i as initialMachineMetadata, n as notifyDaemonSessionStarted, M as MessageQueue2, h as hashObject, a as registerKillSessionHandler, b as MessageBuffer, s as startZenfloServer, t as trimIdent, c as stopCaffeinate } from './index-D4H-IoO4.mjs';
11
11
  import os from 'node:os';
12
12
  import { resolve, join } from 'node:path';
13
13
  import fs from 'node:fs';
@@ -772,7 +772,7 @@ async function runCodex(opts) {
772
772
  const settings = await readSettings();
773
773
  let machineId = settings?.machineId;
774
774
  if (!machineId) {
775
- console.error(`[START] No machine ID found in settings, which is unexpected since authAndSetupMachineIfNeeded should have created it. Please report this issue on https://github.com/slopus/happy-cli/issues`);
775
+ console.error(`[START] No machine ID found in settings, which is unexpected since authAndSetupMachineIfNeeded should have created it. Please report this issue on https://github.com/zenflo/zenflo/issues`);
776
776
  process.exit(1);
777
777
  }
778
778
  logger.debug(`Using machineId: ${machineId}`);
@@ -1122,7 +1122,7 @@ async function runCodex(opts) {
1122
1122
  }
1123
1123
  }
1124
1124
  });
1125
- const zenfloServer = await startZenfloServer(session, api);
1125
+ const zenfloServer = await startZenfloServer(session);
1126
1126
  const bridgeCommand = join(projectPath(), "bin", "zenflo-mcp.mjs");
1127
1127
  const zenModeConfig = {
1128
1128
  command: "node",
@@ -1,5 +1,5 @@
1
1
  import { execSync } from 'child_process';
2
- import { r as readDaemonState, l as logger } from './types-BZBppaDC.mjs';
2
+ import { r as readDaemonState, l as logger } from './types-BPoWNAha.mjs';
3
3
  import chalk from 'chalk';
4
4
  import 'axios';
5
5
  import 'fs';
@@ -1,6 +1,6 @@
1
1
  import { existsSync } from 'fs';
2
2
  import { execSync } from 'child_process';
3
- import { r as readDaemonState, l as logger } from './types-BZBppaDC.mjs';
3
+ import { r as readDaemonState, l as logger } from './types-BPoWNAha.mjs';
4
4
  import os from 'os';
5
5
  import path from 'path';
6
6
  import chalk from 'chalk';
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var child_process = require('child_process');
4
- var types = require('./types-DlbOjNGw.cjs');
4
+ var types = require('./types-DzNSylqA.cjs');
5
5
  var chalk = require('chalk');
6
6
  require('axios');
7
7
  require('fs');
@@ -5,7 +5,7 @@ var child_process = require('child_process');
5
5
  var os = require('os');
6
6
  var path = require('path');
7
7
  var chalk = require('chalk');
8
- var types = require('./types-DlbOjNGw.cjs');
8
+ var types = require('./types-DzNSylqA.cjs');
9
9
  require('axios');
10
10
  require('node:fs');
11
11
  require('node:os');
@@ -3,7 +3,7 @@ import { execSync } from 'child_process';
3
3
  import os from 'os';
4
4
  import path from 'path';
5
5
  import chalk from 'chalk';
6
- import { r as readDaemonState } from './types-BZBppaDC.mjs';
6
+ import { r as readDaemonState } from './types-BPoWNAha.mjs';
7
7
  import 'axios';
8
8
  import 'node:fs';
9
9
  import 'node:os';
@@ -2,7 +2,7 @@
2
2
 
3
3
  var fs = require('fs');
4
4
  var child_process = require('child_process');
5
- var types = require('./types-DlbOjNGw.cjs');
5
+ var types = require('./types-DzNSylqA.cjs');
6
6
  var os = require('os');
7
7
  var path = require('path');
8
8
  var chalk = require('chalk');
@@ -21,7 +21,7 @@ import { platform } from 'os';
21
21
  import { Expo } from 'expo-server-sdk';
22
22
 
23
23
  var name = "zenflo";
24
- var version = "0.11.17";
24
+ var version = "0.12.1";
25
25
  var description = "Mobile and Web client for Claude Code and Codex - ZenFlo edition";
26
26
  var author = "Combined Memory";
27
27
  var license = "MIT";
@@ -1641,7 +1641,7 @@ class ApiMachineClient {
1641
1641
  stopSession,
1642
1642
  requestShutdown
1643
1643
  }) {
1644
- this.rpcHandlerManager.registerHandler("spawn-happy-session", async (params) => {
1644
+ this.rpcHandlerManager.registerHandler("spawn-zenflo-session", async (params) => {
1645
1645
  const { directory, sessionId, machineId, approvedNewDirectoryCreation, agent, token } = params || {};
1646
1646
  logger.debug(`[API MACHINE] Spawning session with params: ${JSON.stringify(params)}`);
1647
1647
  if (!directory) {
@@ -42,7 +42,7 @@ function _interopNamespaceDefault(e) {
42
42
  var z__namespace = /*#__PURE__*/_interopNamespaceDefault(z);
43
43
 
44
44
  var name = "zenflo";
45
- var version = "0.11.17";
45
+ var version = "0.12.1";
46
46
  var description = "Mobile and Web client for Claude Code and Codex - ZenFlo edition";
47
47
  var author = "Combined Memory";
48
48
  var license = "MIT";
@@ -1028,7 +1028,7 @@ class RpcHandlerManager {
1028
1028
  }
1029
1029
  }
1030
1030
 
1031
- const __dirname$1 = path.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('types-DlbOjNGw.cjs', document.baseURI).href))));
1031
+ const __dirname$1 = path.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('types-DzNSylqA.cjs', document.baseURI).href))));
1032
1032
  function projectPath() {
1033
1033
  const path$1 = path.resolve(__dirname$1, "..");
1034
1034
  return path$1;
@@ -1662,7 +1662,7 @@ class ApiMachineClient {
1662
1662
  stopSession,
1663
1663
  requestShutdown
1664
1664
  }) {
1665
- this.rpcHandlerManager.registerHandler("spawn-happy-session", async (params) => {
1665
+ this.rpcHandlerManager.registerHandler("spawn-zenflo-session", async (params) => {
1666
1666
  const { directory, sessionId, machineId, approvedNewDirectoryCreation, agent, token } = params || {};
1667
1667
  logger.debug(`[API MACHINE] Spawning session with params: ${JSON.stringify(params)}`);
1668
1668
  if (!directory) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zenflo",
3
- "version": "0.11.17",
3
+ "version": "0.12.1",
4
4
  "description": "Mobile and Web client for Claude Code and Codex - ZenFlo edition",
5
5
  "author": "Combined Memory",
6
6
  "license": "MIT",