docdex 0.2.40 → 0.2.42

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.42
4
+ - Bump release metadata to 0.2.42.
5
+
6
+ ## 0.2.41
7
+ - Improve Windows npm postinstall UX with a plain setup hint, npm lifecycle non-interactive detection, and no empty cmd window from immediate daemon start.
8
+ - Fix setup TUI menu selection highlighting on Windows terminals.
9
+ - Propagate DAG session IDs in docs so `docdex_dag_export` is called with the `dag_session_id` from search results.
10
+
3
11
  ## 0.2.39
4
12
  - Bump release metadata to 0.2.39.
5
13
 
package/assets/agents.md CHANGED
@@ -1,4 +1,4 @@
1
- ---- START OF DOCDEX INFO V0.2.40 ----
1
+ ---- START OF DOCDEX INFO V0.2.42 ----
2
2
  Docdex URL: http://127.0.0.1:28491
3
3
  Use this base URL for Docdex HTTP endpoints.
4
4
  Health check endpoint: `GET /healthz` (not `/v1/health`).
@@ -246,6 +246,8 @@ Query params:
246
246
  - `format` (optional: json/text/dot; default json)
247
247
  - `max_nodes` (optional)
248
248
  - `repo_id` (required when multiple repos are mounted)
249
+ Notes:
250
+ - Use the `dag_session_id` from `/search` responses (or MCP `docdex_search`/`docdex_web_research`) as the `session_id`. `dag_session_id` is accepted as an alias.
249
251
 
250
252
  ### 7) MCP over HTTP/SSE
251
253
 
@@ -270,7 +272,7 @@ Do not guess fields; use these canonical shapes.
270
272
  - `docdex_ast`: `{ project_root, path, max_nodes? }`
271
273
  - `docdex_impact_diagnostics`: `{ project_root, file? }`
272
274
  - `docdex_impact_graph`: `{ project_root, file, max_edges?, max_depth?, edge_types? }`
273
- - `docdex_dag_export`: `{ project_root, session_id, format?, max_nodes? }`
275
+ - `docdex_dag_export`: `{ project_root, session_id|dag_session_id, format?, max_nodes? }`
274
276
  - `docdex_memory_save`: `{ project_root, text }`
275
277
  - `docdex_memory_recall`: `{ project_root, query, top_k? }`
276
278
  - `docdex_get_profile`: `{ agent_id }`
package/lib/install.js CHANGED
@@ -2294,6 +2294,16 @@ function printPostInstallBanner() {
2294
2294
  return false;
2295
2295
  }
2296
2296
  };
2297
+ if (process.platform === "win32") {
2298
+ const plain = [
2299
+ "[docdex] Docdex installed successfully.",
2300
+ "[docdex] Next step: run `docdex setup` to complete the installation.",
2301
+ "[docdex] Setup configures Ollama/models + browser."
2302
+ ].join("\r\n") + "\r\n";
2303
+ if (!writeDirect(plain)) {
2304
+ writeStderr(plain);
2305
+ }
2306
+ }
2297
2307
  let width = 0;
2298
2308
  const content = [
2299
2309
  "\x1b[31m _ _ \x1b[0m",
@@ -2472,7 +2472,11 @@ function startupFailureReported() {
2472
2472
  }
2473
2473
 
2474
2474
  function isNpmLifecycle(env = process.env) {
2475
- return Boolean(env?.npm_lifecycle_event);
2475
+ if (env?.npm_lifecycle_event) return true;
2476
+ const userAgent = String(env?.npm_config_user_agent || "");
2477
+ if (userAgent.includes("npm/")) return true;
2478
+ if (env?.npm_execpath) return true;
2479
+ return false;
2476
2480
  }
2477
2481
 
2478
2482
  function shouldSkipDaemonSideEffects({ env = process.env, skipDaemon } = {}) {
@@ -2590,6 +2594,9 @@ function launchSetupWizard({
2590
2594
  }
2591
2595
 
2592
2596
  if (platform === "win32") {
2597
+ if (!canPrompt(stdin, stdout)) {
2598
+ return { ok: false, reason: "non_interactive" };
2599
+ }
2593
2600
  const runnerPath = writeWindowsSetupRunner({
2594
2601
  binaryPath,
2595
2602
  args,
@@ -2616,6 +2623,7 @@ function launchSetupWizard({
2616
2623
  async function runPostInstallSetup({ binaryPath, logger, env, skipDaemon, distBaseDir } = {}) {
2617
2624
  const log = logger || console;
2618
2625
  const effectiveEnv = env || process.env;
2626
+ const isNpm = isNpmLifecycle(effectiveEnv);
2619
2627
  const distCandidates = resolveDistBaseCandidates({ env: effectiveEnv });
2620
2628
  const resolvedDistBaseDir = distBaseDir || resolveDistBaseDir({ env: effectiveEnv, fsModule: fs });
2621
2629
  let allowDaemon = !shouldSkipDaemonSideEffects({ env: effectiveEnv, skipDaemon });
@@ -2699,13 +2707,14 @@ async function runPostInstallSetup({ binaryPath, logger, env, skipDaemon, distBa
2699
2707
  }
2700
2708
  let startupOk = false;
2701
2709
  if (allowDaemon) {
2710
+ const allowStartNow = !(process.platform === "win32" && isNpm);
2702
2711
  const result = await startDaemonWithHealthCheck({
2703
2712
  binaryPath: startupBinaries.binaryPath,
2704
2713
  port,
2705
2714
  host: DEFAULT_HOST,
2706
2715
  logger: log,
2707
2716
  distBaseDir: resolvedDistBaseDir,
2708
- startNow: !reuseExisting
2717
+ startNow: !reuseExisting && allowStartNow
2709
2718
  });
2710
2719
  if (!result.ok) {
2711
2720
  log.warn?.(`[docdex] daemon failed to start on ${DEFAULT_HOST}:${port}.`);
@@ -2750,7 +2759,7 @@ async function runPostInstallSetup({ binaryPath, logger, env, skipDaemon, distBa
2750
2759
  clearStartupFailure();
2751
2760
  }
2752
2761
  const skipExplicit = shouldSkipSetup(effectiveEnv);
2753
- const skipWizard = isNpmLifecycle(effectiveEnv) || skipExplicit;
2762
+ const skipWizard = isNpm || skipExplicit;
2754
2763
  const setupLaunch = skipWizard
2755
2764
  ? { ok: false, reason: skipExplicit ? "skipped" : "npm_lifecycle" }
2756
2765
  : launchSetupWizard({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docdex",
3
- "version": "0.2.40",
3
+ "version": "0.2.42",
4
4
  "mcpName": "io.github.bekirdag/docdex",
5
5
  "description": "Local-first documentation and code indexer with HTTP/MCP search, AST, and agent memory.",
6
6
  "bin": {