docdex 0.2.48 → 0.2.50

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.50
4
+ - Attribute delegation savings to the actual expensive caller via `caller_agent_id`, `caller_model`, or `primary_cost_per_million`, and expose avoided primary cost plus effective per-1M telemetry rates.
5
+ - Canonicalize delegation pricing config to `primary_usd_per_million_tokens` and `local_usd_per_million_tokens` while preserving legacy `*_usd_per_1k_tokens` compatibility in packaged docs and telemetry.
6
+
7
+ ## 0.2.49
8
+ - Generate installer-managed MCP URLs with `127.0.0.1` so client configs match the daemon bind default.
9
+ - Update packaged MCP examples and add regression coverage for the postinstall URL helpers.
10
+
3
11
  ## 0.2.48
4
12
  - Exclude paid or expensive mcoda agents from automatic local delegation target selection.
5
13
  - Document the zero-cost local delegation rule in the packaged agent guidance.
package/README.md CHANGED
@@ -141,7 +141,7 @@ If you need to configure your client manually:
141
141
  {
142
142
  "mcpServers": {
143
143
  "docdex": {
144
- "url": "http://localhost:28491/v1/mcp/sse"
144
+ "url": "http://127.0.0.1:28491/v1/mcp/sse"
145
145
  }
146
146
  }
147
147
  }
@@ -155,7 +155,7 @@ If you need to configure your client manually:
155
155
  "mcpServers": {
156
156
  "docdex": {
157
157
  "type": "http",
158
- "url": "http://localhost:28491/v1/mcp"
158
+ "url": "http://127.0.0.1:28491/v1/mcp"
159
159
  }
160
160
  }
161
161
  }
@@ -166,7 +166,7 @@ If you need to configure your client manually:
166
166
 
167
167
  ```toml
168
168
  [mcp_servers]
169
- docdex = { url = "http://localhost:28491/v1/mcp" }
169
+ docdex = { url = "http://127.0.0.1:28491/v1/mcp" }
170
170
 
171
171
  ```
172
172
 
package/assets/agents.md CHANGED
@@ -1,4 +1,4 @@
1
- ---- START OF DOCDEX INFO V0.2.48 ----
1
+ ---- START OF DOCDEX INFO V0.2.50 ----
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`).
@@ -325,7 +325,7 @@ Do not guess fields; use these canonical shapes.
325
325
  - `docdex_memory_recall`: `{ project_root, query, top_k? }`
326
326
  - `docdex_get_profile`: `{ agent_id }`
327
327
  - `docdex_save_preference`: `{ agent_id, category, content }`
328
- - `docdex_local_completion`: `{ task_type, instruction, context, max_tokens?, timeout_ms?, mode?, max_context_chars?, agent? }`
328
+ - `docdex_local_completion`: `{ task_type, instruction, context, max_tokens?, timeout_ms?, mode?, max_context_chars?, agent?, caller_agent_id?, caller_model?, primary_cost_per_million? }`
329
329
  - `docdex_web_research`: `{ project_root, query, force_web, skip_local_search?, web_limit?, no_cache? }`
330
330
 
331
331
  ### 9) Common error fixes (do not guess)
@@ -75,11 +75,11 @@ function daemonLockPaths() {
75
75
  }
76
76
 
77
77
  function configUrlForPort(port) {
78
- return `http://localhost:${port}/sse`;
78
+ return `http://${DEFAULT_HOST}:${port}/sse`;
79
79
  }
80
80
 
81
81
  function configStreamableUrlForPort(port) {
82
- return `http://localhost:${port}/v1/mcp`;
82
+ return `http://${DEFAULT_HOST}:${port}/v1/mcp`;
83
83
  }
84
84
 
85
85
  function isPortAvailable(port, host) {
@@ -1359,6 +1359,11 @@ function upsertCodexConfig(pathname, url) {
1359
1359
  return true;
1360
1360
  }
1361
1361
 
1362
+ function warnCodexRestart(logger, changed) {
1363
+ if (!changed) return;
1364
+ logger?.warn?.("[docdex] Codex MCP config updated. Restart Codex to reload the MCP endpoint.");
1365
+ }
1366
+
1362
1367
  function clientConfigPaths() {
1363
1368
  const home = os.homedir();
1364
1369
  const appData = process.env.APPDATA || path.join(home, "AppData", "Roaming");
@@ -2831,7 +2836,8 @@ async function runPostInstallSetup({ binaryPath, logger, env, skipDaemon, distBa
2831
2836
  if (paths.zed) {
2832
2837
  upsertZedConfig(paths.zed, url);
2833
2838
  }
2834
- upsertCodexConfig(paths.codex, httpUrl);
2839
+ const codexChanged = upsertCodexConfig(paths.codex, httpUrl);
2840
+ warnCodexRestart(log, codexChanged);
2835
2841
  applyAgentInstructions({ logger: log });
2836
2842
  if (startupOk) {
2837
2843
  clearStartupFailure();
@@ -2861,6 +2867,7 @@ module.exports = {
2861
2867
  upsertMcpServerJson,
2862
2868
  upsertZedConfig,
2863
2869
  upsertCodexConfig,
2870
+ warnCodexRestart,
2864
2871
  configUrlForPort,
2865
2872
  configStreamableUrlForPort,
2866
2873
  parseEnvBool,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docdex",
3
- "version": "0.2.48",
3
+ "version": "0.2.50",
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": {