kandev 0.1.5 → 0.2.0

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
@@ -10,6 +10,13 @@ npx kandev
10
10
 
11
11
  Downloads the latest release, starts the backend + web app, and opens your browser. Data (worktrees, SQLite DB) is stored in `~/.kandev` by default.
12
12
 
13
+ ## Version and Updates
14
+
15
+ - `npx kandev` (run mode) uses the latest GitHub release bundle by default.
16
+ - At startup, the launcher prints the resolved release tag (for example: `[kandev] release: v0.2.3 (github latest)`).
17
+ - Use `--version <tag>` to pin a specific runtime bundle release.
18
+ - CLI package updates are checked from npm and shown as a prompt. They are not forced.
19
+
13
20
  ## What You Get
14
21
 
15
22
  - **Multi-agent support** - Claude Code, Codex, GitHub Copilot, Gemini CLI, Amp, Auggie, OpenCode
package/dist/dev.js CHANGED
@@ -13,9 +13,20 @@ const shared_1 = require("./shared");
13
13
  const web_1 = require("./web");
14
14
  async function runDev({ repoRoot, backendPort, webPort }) {
15
15
  const ports = await (0, shared_1.pickPorts)(backendPort, webPort);
16
- const backendEnv = (0, shared_1.buildBackendEnv)({ ports, extra: { KANDEV_MOCK_AGENT: "true" } });
16
+ const dbPath = node_path_1.default.join(repoRoot, "apps", "backend", "kandev.db");
17
+ const backendEnv = (0, shared_1.buildBackendEnv)({
18
+ ports,
19
+ extra: { KANDEV_MOCK_AGENT: "true", KANDEV_DATABASE_PATH: dbPath },
20
+ });
17
21
  const webEnv = (0, shared_1.buildWebEnv)({ ports, includeMcp: true, debug: true });
18
- (0, shared_1.logPortConfig)("dev", "using local repo", ports, true);
22
+ const logLevel = process.env.KANDEV_LOGGING_LEVEL?.trim() || process.env.KANDEV_LOG_LEVEL?.trim() || "info";
23
+ (0, shared_1.logStartupInfo)({
24
+ header: "dev mode: using local repo",
25
+ ports,
26
+ dbPath,
27
+ includeMcp: true,
28
+ logLevel,
29
+ });
19
30
  const supervisor = (0, process_1.createProcessSupervisor)();
20
31
  supervisor.attachSignalHandlers();
21
32
  const backendProc = (0, node_child_process_1.spawn)("make", ["-C", node_path_1.default.join("apps", "backend"), "dev"], {
package/dist/run.js CHANGED
@@ -44,17 +44,19 @@ async function prepareReleaseBundle({ version, backendPort, webPort, }) {
44
44
  const actualWebPort = webPort ?? (await (0, ports_1.pickAvailablePort)(constants_1.DEFAULT_WEB_PORT));
45
45
  const agentctlPort = await (0, ports_1.pickAvailablePort)(constants_1.DEFAULT_AGENTCTL_PORT);
46
46
  const backendUrl = `http://localhost:${actualBackendPort}`;
47
+ const logLevel = process.env.KANDEV_LOG_LEVEL?.trim() || "warn";
47
48
  node_fs_1.default.mkdirSync(constants_1.DATA_DIR, { recursive: true });
48
49
  const dbPath = node_path_1.default.join(constants_1.DATA_DIR, "kandev.db");
49
50
  // Note: Release mode doesn't configure MCP server ports as it uses
50
51
  // the bundled configuration. Only backend and agentctl ports are set.
51
- // Log level is set to warn for clean production output.
52
+ // Log level defaults to warn for clean output and can be overridden
53
+ // via KANDEV_LOG_LEVEL.
52
54
  const backendEnv = {
53
55
  ...process.env,
54
56
  KANDEV_SERVER_PORT: String(actualBackendPort),
55
57
  KANDEV_AGENT_STANDALONE_PORT: String(agentctlPort),
56
58
  KANDEV_DATABASE_PATH: dbPath,
57
- KANDEV_LOG_LEVEL: "warn",
59
+ KANDEV_LOG_LEVEL: logLevel,
58
60
  };
59
61
  const webEnv = {
60
62
  ...process.env,
@@ -69,14 +71,31 @@ async function prepareReleaseBundle({ version, backendPort, webPort, }) {
69
71
  backendUrl,
70
72
  backendEnv,
71
73
  webEnv,
74
+ releaseTag: tag,
75
+ requestedVersion: version,
72
76
  webPort: actualWebPort,
73
77
  agentctlPort,
78
+ dbPath,
79
+ logLevel,
74
80
  };
75
81
  }
76
82
  function launchReleaseApps(prepared) {
77
- console.log("[kandev] backend port:", prepared.backendEnv.KANDEV_SERVER_PORT);
78
- console.log("[kandev] web port:", prepared.webPort);
79
- console.log("[kandev] agentctl port:", prepared.agentctlPort);
83
+ const releaseSource = prepared.requestedVersion
84
+ ? `(requested: ${prepared.requestedVersion})`
85
+ : "(github latest)";
86
+ (0, shared_1.logStartupInfo)({
87
+ header: `release: ${prepared.releaseTag} ${releaseSource}`,
88
+ ports: {
89
+ backendPort: Number(prepared.backendEnv.KANDEV_SERVER_PORT),
90
+ webPort: prepared.webPort,
91
+ agentctlPort: prepared.agentctlPort,
92
+ mcpPort: 0,
93
+ backendUrl: prepared.backendUrl,
94
+ mcpUrl: "",
95
+ },
96
+ dbPath: prepared.dbPath,
97
+ logLevel: prepared.logLevel,
98
+ });
80
99
  const supervisor = (0, process_1.createProcessSupervisor)();
81
100
  supervisor.attachSignalHandlers();
82
101
  const backendProc = (0, node_child_process_1.spawn)(prepared.backendBin, [], {
package/dist/shared.js CHANGED
@@ -9,7 +9,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.pickPorts = pickPorts;
10
10
  exports.buildBackendEnv = buildBackendEnv;
11
11
  exports.buildWebEnv = buildWebEnv;
12
- exports.logPortConfig = logPortConfig;
12
+ exports.logStartupInfo = logStartupInfo;
13
13
  exports.attachBackendExitHandler = attachBackendExitHandler;
14
14
  const constants_1 = require("./constants");
15
15
  const ports_1 = require("./ports");
@@ -83,15 +83,11 @@ function buildWebEnv(options) {
83
83
  return env;
84
84
  }
85
85
  /**
86
- * Logs port configuration to the console.
87
- *
88
- * @param mode - The launch mode name (e.g., "dev", "production", "release")
89
- * @param modeDescription - Human-readable description of the mode
90
- * @param ports - Port configuration to log
91
- * @param includeMcp - Whether to log MCP-related ports
86
+ * Logs a unified startup info block to the console.
92
87
  */
93
- function logPortConfig(mode, modeDescription, ports, includeMcp = false) {
94
- console.log(`[kandev] ${mode} mode: ${modeDescription}`);
88
+ function logStartupInfo(options) {
89
+ const { header, ports, dbPath, includeMcp = false, logLevel } = options;
90
+ console.log(`[kandev] ${header}`);
95
91
  console.log("[kandev] backend port:", ports.backendPort);
96
92
  console.log("[kandev] web port:", ports.webPort);
97
93
  console.log("[kandev] agentctl port:", ports.agentctlPort);
@@ -99,6 +95,12 @@ function logPortConfig(mode, modeDescription, ports, includeMcp = false) {
99
95
  console.log("[kandev] mcp port:", ports.mcpPort);
100
96
  console.log("[kandev] mcp url:", ports.mcpUrl);
101
97
  }
98
+ if (dbPath) {
99
+ console.log("[kandev] db path:", dbPath);
100
+ }
101
+ if (logLevel) {
102
+ console.log("[kandev] log level:", logLevel);
103
+ }
102
104
  }
103
105
  /**
104
106
  * Attaches a standardized exit handler to a backend process.
package/dist/start.js CHANGED
@@ -75,15 +75,23 @@ async function runStart({ repoRoot, backendPort, webPort, verbose = false, debug
75
75
  // Production mode: use warn log level for clean output unless verbose/debug
76
76
  const showOutput = verbose || debug;
77
77
  const dbPath = node_path_1.default.join(constants_1.DATA_DIR, "kandev.db");
78
+ const logLevel = debug ? "debug" : verbose ? "info" : "warn";
78
79
  const backendEnv = (0, shared_1.buildBackendEnv)({
79
80
  ports,
80
- logLevel: debug ? "debug" : verbose ? "info" : "warn",
81
+ logLevel,
81
82
  extra: {
82
83
  KANDEV_DATABASE_PATH: dbPath,
83
84
  ...(debug ? { KANDEV_DEBUG_AGENT_MESSAGES: "true" } : {}),
84
85
  },
85
86
  });
86
87
  const webEnv = (0, shared_1.buildWebEnv)({ ports, includeMcp: true, production: true, debug });
88
+ (0, shared_1.logStartupInfo)({
89
+ header: "start mode: using local build",
90
+ ports,
91
+ dbPath,
92
+ includeMcp: true,
93
+ logLevel,
94
+ });
87
95
  const supervisor = (0, process_1.createProcessSupervisor)();
88
96
  supervisor.attachSignalHandlers();
89
97
  // Start backend with piped stdio (quiet mode unless verbose/debug)
@@ -112,13 +120,6 @@ async function runStart({ repoRoot, backendPort, webPort, verbose = false, debug
112
120
  label: "web",
113
121
  quiet: !showOutput,
114
122
  });
115
- // Print clean summary
116
- console.log("");
117
- console.log("[kandev] Server started successfully");
118
- console.log("");
119
- console.log(` Web: ${webUrl}`);
120
- console.log(` API: ${ports.backendUrl}`);
121
- console.log(` MCP: ${ports.mcpUrl}`);
122
- console.log(` Database: ${dbPath}`);
123
- console.log("");
123
+ console.log(`[kandev] backend ready at ${ports.backendUrl}`);
124
+ console.log(`[kandev] web ready at ${webUrl}`);
124
125
  }
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "kandev",
3
- "version": "0.1.5",
3
+ "version": "0.2.0",
4
4
  "private": false,
5
5
  "description": "NPX launcher for Kandev",
6
- "license": "UNLICENSED",
6
+ "license": "AGPL-3.0-only",
7
7
  "type": "commonjs",
8
8
  "bin": {
9
9
  "kandev": "bin/cli.js"