kenzoboard 0.1.2 → 0.1.3

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 +73 -35
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -4114,15 +4114,22 @@ async function serveCommand(args, flags, options = {}) {
4114
4114
  app.get("/", (c) => c.text("Web UI not found. API available at /api/*"));
4115
4115
  }
4116
4116
  const url = `http://localhost:${port}`;
4117
- console.log(`Starting Kenzo on ${url}`);
4118
- console.log(`Data file: ${dataFile}`);
4119
- if (webDistPath) {
4120
- console.log(`Web UI: ${webDistPath}`);
4117
+ if (options.compact) {
4118
+ console.log("");
4119
+ console.log(`Kenzo is running at ${url}`);
4121
4120
  } else {
4122
- console.log("Web UI: not found (API only mode)");
4121
+ console.log(`Starting Kenzo on ${url}`);
4122
+ console.log(`Data file: ${dataFile}`);
4123
+ if (webDistPath) {
4124
+ console.log(`Web UI: ${webDistPath}`);
4125
+ } else {
4126
+ console.log("Web UI: not found (API only mode)");
4127
+ }
4123
4128
  }
4124
4129
  if (options.open || flags.open === true) {
4125
- console.log(`Opening ${url}`);
4130
+ if (!options.compact) {
4131
+ console.log(`Opening ${url}`);
4132
+ }
4126
4133
  openBrowser(url);
4127
4134
  }
4128
4135
  console.log("");
@@ -4539,20 +4546,24 @@ function ensureFluxIgnored() {
4539
4546
  ` : "";
4540
4547
  appendFileSync(gitignorePath, `${newline}${gitignoreEntry}
4541
4548
  `);
4542
- console.log(`Added .flux/ to ${gitRoot ? gitignorePath : ".gitignore"}`);
4549
+ return true;
4543
4550
  }
4551
+ return false;
4544
4552
  }
4545
4553
  async function ensureKenzoWorkspace() {
4546
4554
  const fluxDir = process.env.FLUX_DIR || resolve4(process.cwd(), ".flux");
4547
4555
  const configPath = resolve4(fluxDir, "config.json");
4548
4556
  const jsonPath = resolve4(fluxDir, "data.json");
4549
4557
  const sqlitePath = resolve4(fluxDir, "data.sqlite");
4558
+ let createdWorkspace = false;
4559
+ let createdProject = false;
4560
+ let gitignoreUpdated = false;
4550
4561
  if (!existsSync7(fluxDir)) {
4551
4562
  mkdirSync3(fluxDir, { recursive: true });
4552
4563
  writeConfig(fluxDir, {});
4553
4564
  writeFileSync5(jsonPath, JSON.stringify({ projects: [], epics: [], tasks: [] }, null, 2));
4554
- ensureFluxIgnored();
4555
- console.log(`Created local Kenzo workspace at ${fluxDir}`);
4565
+ gitignoreUpdated = ensureFluxIgnored();
4566
+ createdWorkspace = true;
4556
4567
  } else if (!existsSync7(configPath)) {
4557
4568
  writeConfig(fluxDir, {});
4558
4569
  }
@@ -4572,7 +4583,7 @@ async function ensureKenzoWorkspace() {
4572
4583
  const nextConfig = readConfigRaw(fluxDir);
4573
4584
  nextConfig.project = project.id;
4574
4585
  writeConfig(fluxDir, nextConfig);
4575
- console.log(`Created first project: ${project.name} (${project.id})`);
4586
+ createdProject = true;
4576
4587
  } else if (!projectId || !projects.some((project) => project.id === projectId)) {
4577
4588
  const project = projects[0];
4578
4589
  projectId = project.id;
@@ -4580,29 +4591,58 @@ async function ensureKenzoWorkspace() {
4580
4591
  const nextConfig = readConfigRaw(fluxDir);
4581
4592
  nextConfig.project = project.id;
4582
4593
  writeConfig(fluxDir, nextConfig);
4583
- console.log(`Using project: ${project.name} (${project.id})`);
4584
4594
  }
4585
- return { projectId, projectName };
4595
+ return { fluxDir, projectId, projectName, createdWorkspace, createdProject, gitignoreUpdated };
4586
4596
  }
4587
- function printMcpSetup(command = publicCommandName()) {
4588
- const npxMcpCommand = "npx -y --package kenzoboard kenzoboard-mcp";
4597
+ function codexCliCommand() {
4598
+ const macAppCli = "/Applications/Codex.app/Contents/Resources/codex";
4599
+ return process.platform === "darwin" && existsSync7(macAppCli) ? macAppCli : "codex";
4600
+ }
4601
+ function quoteShell(value) {
4602
+ return `"${value.replace(/(["\\$`])/g, "\\$1")}"`;
4603
+ }
4604
+ function mcpPackageCommand() {
4605
+ const localMcpPath = resolve4(process.cwd(), "packages/mcp/dist/index.js");
4606
+ return existsSync7(localMcpPath) ? `bun ${quoteShell(localMcpPath)}` : "npx -y --package kenzoboard kenzoboard-mcp";
4607
+ }
4608
+ function codexMcpCommand(fluxDir) {
4609
+ return `${codexCliCommand()} mcp add flux --env FLUX_DIR=${quoteShell(fluxDir)} -- ${mcpPackageCommand()}`;
4610
+ }
4611
+ function claudeMcpCommand(fluxDir) {
4612
+ return `claude mcp add flux --env FLUX_DIR=${quoteShell(fluxDir)} -- ${mcpPackageCommand()}`;
4613
+ }
4614
+ function printLaunchSummary(workspace, command = publicCommandName()) {
4615
+ const projectLabel = workspace.projectName && workspace.projectId ? `${workspace.projectName} (${workspace.projectId})` : "No project selected";
4616
+ console.log(`${c2.green}${c2.bold}Kenzo is ready.${c2.reset}`);
4617
+ console.log(`Project: ${projectLabel}`);
4618
+ if (workspace.createdWorkspace || workspace.createdProject || workspace.gitignoreUpdated) {
4619
+ const details = [
4620
+ workspace.createdWorkspace ? "local workspace" : undefined,
4621
+ workspace.createdProject ? "first project" : undefined,
4622
+ workspace.gitignoreUpdated ? ".flux/ in .gitignore" : undefined
4623
+ ].filter(Boolean).join(", ");
4624
+ console.log(`${c2.dim}Set up ${details}.${c2.reset}`);
4625
+ }
4626
+ console.log("");
4627
+ console.log(`${c2.bold}Connect Codex:${c2.reset}`);
4628
+ console.log(` ${codexMcpCommand(workspace.fluxDir)}`);
4629
+ console.log("");
4630
+ console.log(`${c2.bold}Then ask Codex:${c2.reset}`);
4631
+ console.log(" Pick the next ready Kenzo task, implement it, and mark it done.");
4632
+ console.log("");
4633
+ console.log(`CLI fallback: ${c2.cyan}${command} ready${c2.reset}`);
4634
+ console.log(`More setup: ${c2.cyan}${command} mcp${c2.reset}`);
4635
+ }
4636
+ function printMcpSetup(command = publicCommandName(), fluxDir = findFluxDir()) {
4589
4637
  const installedMcpCommand = "kenzoboard-mcp";
4590
4638
  const dockerCommand = 'docker run -i --rm -v "$(pwd)/.flux:/app/packages/data" -e FLUX_DATA=/app/packages/data/flux.sqlite flux-mcp bun packages/mcp/dist/index.js';
4591
- const localMcpPath = resolve4(process.cwd(), "packages/mcp/dist/index.js");
4592
- console.log(`${c2.bold}Agent setup${c2.reset} ${c2.dim}(MCP resources remain flux:// for compatibility)${c2.reset}
4639
+ console.log(`${c2.bold}Agent setup${c2.reset} ${c2.dim}(MCP resources remain flux:// for compatibility)${c2.reset}`);
4640
+ console.log(`${c2.dim}Using Kenzo workspace: ${fluxDir}${c2.reset}
4593
4641
  `);
4594
4642
  console.log(`${c2.bold}Codex:${c2.reset}`);
4595
- if (existsSync7(localMcpPath)) {
4596
- console.log(` codex mcp add flux -- bun ${localMcpPath}`);
4597
- } else {
4598
- console.log(` codex mcp add flux -- ${npxMcpCommand}`);
4599
- }
4643
+ console.log(` ${codexMcpCommand(fluxDir)}`);
4600
4644
  console.log(`${c2.bold}Claude Code:${c2.reset}`);
4601
- if (existsSync7(localMcpPath)) {
4602
- console.log(` claude mcp add flux -- bun ${localMcpPath}`);
4603
- } else {
4604
- console.log(` claude mcp add flux -- ${npxMcpCommand}`);
4605
- }
4645
+ console.log(` ${claudeMcpCommand(fluxDir)}`);
4606
4646
  console.log("");
4607
4647
  console.log(`${c2.bold}Global install:${c2.reset}`);
4608
4648
  console.log(` ${installedMcpCommand}`);
@@ -4610,18 +4650,16 @@ function printMcpSetup(command = publicCommandName()) {
4610
4650
  console.log(`${c2.bold}Advanced Docker:${c2.reset}`);
4611
4651
  console.log(` ${dockerCommand}`);
4612
4652
  console.log("");
4613
- console.log(`Run ${c2.cyan}${command} ready${c2.reset} to see agent-ready work.`);
4653
+ console.log(`${c2.bold}Agent workflow:${c2.reset}`);
4654
+ console.log(` 1. Run ${c2.cyan}${command} ready${c2.reset} or ask the MCP server for ready tasks.`);
4655
+ console.log(" 2. Start one task, implement it, add notes as needed, then mark it done.");
4656
+ console.log(" 3. If MCP is not connected yet, Codex can still use the CLI commands from AGENTS.md.");
4614
4657
  }
4615
4658
  async function launchKenzoApp() {
4616
4659
  const command = publicCommandName();
4617
- const { projectId, projectName } = await ensureKenzoWorkspace();
4618
- if (projectId && projectName) {
4619
- console.log(`Opening project: ${projectName} (${projectId})`);
4620
- }
4621
- console.log("");
4622
- console.log(`${c2.bold}Next step after Kenzo opens:${c2.reset}`);
4623
- printMcpSetup(command);
4624
- await serveCommand([], { port: String(defaultServePort()) }, { defaultPort: defaultServePort(), open: true });
4660
+ const workspace = await ensureKenzoWorkspace();
4661
+ printLaunchSummary(workspace, command);
4662
+ await serveCommand([], { port: String(defaultServePort()) }, { defaultPort: defaultServePort(), open: true, compact: true });
4625
4663
  }
4626
4664
  var FLUX_INSTRUCTIONS = `<!-- FLUX:START -->
4627
4665
  ## Flux Task Management
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kenzoboard",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Kenzo board for human-led AI work, powered by the Flux engine",
5
5
  "type": "module",
6
6
  "bin": {