docdex 0.2.85 → 0.2.90
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 +35 -1
- package/assets/agents.md +1 -1
- package/lib/install.js +2 -0
- package/lib/postinstall_setup.js +49 -9
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,38 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.2.90
|
|
6
|
+
- Fix packaged Streamable HTTP MCP startup for multi-repo daemons without a default repo by allowing unbound initialize/tool discovery and binding a repo only when repo-scoped tools run.
|
|
7
|
+
- Preserve packaged fail-closed behavior for repo tool calls that still omit `project_root` or `repo_path`, returning `missing_repo` instead of leaking an arbitrary mounted repo.
|
|
8
|
+
- Bump packaged release metadata to 0.2.90.
|
|
9
|
+
|
|
10
|
+
## 0.2.89
|
|
11
|
+
- Let the packaged tag-triggered release asset job publish with the workflow `GITHUB_TOKEN` by removing an admin-only immutable-release repository API precheck while retaining remote-tag and asset verification.
|
|
12
|
+
- Bump packaged release metadata to 0.2.89.
|
|
13
|
+
|
|
14
|
+
## 0.2.88
|
|
15
|
+
- Keep packaged tag-triggered release publication from failing when optional external feature-matrix adapters are not configured, while still recording blocked external lanes in the uploaded evidence ledger.
|
|
16
|
+
- Retain the stricter external `--release-gate` for explicitly configured validation runs.
|
|
17
|
+
- Bump packaged release metadata to 0.2.88.
|
|
18
|
+
|
|
19
|
+
## 0.2.87
|
|
20
|
+
- Harden packaged profile, DAG, conversation, knowledge, repo-memory, and personal-preferences SQLite connection setup behind a shared 5-second busy-timeout policy so concurrent agents tolerate transient local database writer contention.
|
|
21
|
+
- Move packaged DAG logging to WAL mode and add regression coverage for memory-adjacent stores that previously opened SQLite with no busy timeout.
|
|
22
|
+
- Bump packaged release metadata to 0.2.87.
|
|
23
|
+
|
|
24
|
+
## 0.2.86
|
|
25
|
+
- Enforce a packaged fail-closed outbound web policy across HTTP, CLI, discovery, and Chromium paths, keep browser sandboxing enabled by default, cap responses, restore bounded transient discovery retries, and shut down owned browser processes deterministically.
|
|
26
|
+
- Pin packaged Chromium TCP egress through a bounded host/IP allowlisting proxy, secure DevTools with an owned ephemeral endpoint and recursive target interception, deny service-worker/cache/download bypasses, and make managed-browser refresh, rollback, locking, and Windows process identity fail safe.
|
|
27
|
+
- Make packaged stale/read-only index handling non-destructive, report accurate paginated document totals, move public indexing work off async executors, and serialize rebuilds with a panic-safe gate.
|
|
28
|
+
- Isolate packaged MCP runtime options and per-session authentication/agent state, remove cross-session head-of-line blocking, bound in-flight work, and fail closed for ambiguous multi-repo initialization.
|
|
29
|
+
- Single-flight packaged concurrent repository mounts, preserve read-only watcher invariants, and bound/coalesce watcher queues with full reconciliation after overflow or directory-level events.
|
|
30
|
+
- Merge packaged repository and library search results deterministically and refill pages after stale-file filtering with a bounded second lookup.
|
|
31
|
+
- Update packaged vulnerable compatible dependencies and document the temporary `ring` advisory exception pending a coordinated Tree-sitter grammar migration.
|
|
32
|
+
- Harden packaged release publication around one tested npm tarball, synchronized version checks, integrity/SBOM evidence, resumable registry verification, and manual-only production deployment with pinned SSH host trust.
|
|
33
|
+
- Replace packaged false-positive-prone aggregate smoke coverage with isolated, locked, evidence-producing feature gates and explicit external-provider blockers.
|
|
34
|
+
- Make packaged release reruns immutable and resumable with SHA-256 asset comparison, fully pinned Actions, split least-privilege npm/MCP/GitHub publication jobs, strict feature-ledger/version/audit validation, and ephemeral pinned-host SSH credentials.
|
|
35
|
+
- Bump packaged release metadata to 0.2.86.
|
|
36
|
+
|
|
5
37
|
## 0.2.85
|
|
6
38
|
- Add a packaged disabled-by-default encrypted user-memory sync preview with config/status/dry-run support, bundle generation, and server-store register, push, feed, apply, and ack endpoints.
|
|
7
39
|
- Scope packaged hosted user-memory sync requests through external API-key introspection, including user-memory sync scope checks and a canonical hashed principal so multiple API keys for one user merge into one feed.
|
|
@@ -15,7 +47,9 @@
|
|
|
15
47
|
- Distinguish packaged daemon startup-in-progress locks from healthy already-running daemons so `docdexd daemon` tells clients to wait for `/healthz` and `/v1/mcp` readiness instead of advertising an unavailable MCP endpoint.
|
|
16
48
|
- Harden packaged npm postinstall daemon readiness checks by requiring both `/healthz` and the streamable MCP `/v1/mcp` route before treating a started or reused daemon as ready.
|
|
17
49
|
- Make packaged daemon singleton and mcoda registry tests deterministic by using a bounded full health response read, disabling cloud refresh for registry-only assertions, and allowing slower daemon binds in local/CI environments with `DOCDEX_DAEMON_AUTO_START_TIMEOUT_SECS`.
|
|
18
|
-
- Pin packaged GitHub Actions npm upgrades to npm 11.18.0 so trusted publishing remains compatible with the workflow's Node
|
|
50
|
+
- Pin packaged GitHub Actions npm upgrades to npm 11.18.0 so trusted publishing remains compatible with the workflow's Node 24 runtime.
|
|
51
|
+
- Box packaged MCP service dispatch futures at the proxy boundary so Rust 1.97 debug builds remain well below Linux's default test-thread stack while preserving per-session fairness, cancellation, and timeouts.
|
|
52
|
+
- Pin the Rust 1.97.0 toolchain and Node 24 GitHub Actions by immutable commit across CI, nightly, release, and deployment workflows.
|
|
19
53
|
- Bump packaged release metadata to 0.2.84.
|
|
20
54
|
|
|
21
55
|
## 0.2.81
|
package/assets/agents.md
CHANGED
package/lib/install.js
CHANGED
package/lib/postinstall_setup.js
CHANGED
|
@@ -83,6 +83,20 @@ function configStreamableUrlForPort(port) {
|
|
|
83
83
|
return `http://${DEFAULT_HOST}:${port}/v1/mcp`;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
+
function resolveDaemonPort(env = process.env) {
|
|
87
|
+
const raw = env?.DOCDEX_DAEMON_PORT;
|
|
88
|
+
if (raw == null || String(raw).trim() === "") {
|
|
89
|
+
return DEFAULT_DAEMON_PORT;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
const normalized = String(raw).trim();
|
|
93
|
+
const port = Number(normalized);
|
|
94
|
+
if (!/^[0-9]+$/.test(normalized) || !Number.isSafeInteger(port) || port < 1 || port > 65535) {
|
|
95
|
+
throw new Error("DOCDEX_DAEMON_PORT must be a base-10 integer between 1 and 65535");
|
|
96
|
+
}
|
|
97
|
+
return port;
|
|
98
|
+
}
|
|
99
|
+
|
|
86
100
|
function isPortAvailable(port, host) {
|
|
87
101
|
return new Promise((resolve) => {
|
|
88
102
|
const server = net.createServer();
|
|
@@ -2991,9 +3005,26 @@ function launchSetupWizard({
|
|
|
2991
3005
|
return { ok: false, reason: "unsupported_platform" };
|
|
2992
3006
|
}
|
|
2993
3007
|
|
|
2994
|
-
async function runPostInstallSetup({
|
|
3008
|
+
async function runPostInstallSetup({
|
|
3009
|
+
binaryPath,
|
|
3010
|
+
logger,
|
|
3011
|
+
env,
|
|
3012
|
+
skipDaemon,
|
|
3013
|
+
distBaseDir,
|
|
3014
|
+
isolatedDaemonLifecycle = false,
|
|
3015
|
+
deps
|
|
3016
|
+
} = {}) {
|
|
2995
3017
|
const log = logger || console;
|
|
2996
3018
|
const effectiveEnv = env || process.env;
|
|
3019
|
+
const lifecycle = {
|
|
3020
|
+
cleanupExistingDaemon,
|
|
3021
|
+
resolveDaemonPortState,
|
|
3022
|
+
isPortAvailable,
|
|
3023
|
+
startDaemonWithHealthCheck
|
|
3024
|
+
};
|
|
3025
|
+
if (deps && typeof deps === "object") {
|
|
3026
|
+
Object.assign(lifecycle, deps);
|
|
3027
|
+
}
|
|
2997
3028
|
const isNpm = isNpmLifecycle(effectiveEnv);
|
|
2998
3029
|
const distCandidates = resolveDistBaseCandidates({ env: effectiveEnv });
|
|
2999
3030
|
const resolvedDistBaseDir = distBaseDir || resolveDistBaseDir({ env: effectiveEnv, fsModule: fs });
|
|
@@ -3003,10 +3034,18 @@ async function runPostInstallSetup({ binaryPath, logger, env, skipDaemon, distBa
|
|
|
3003
3034
|
if (fs.existsSync(configPath)) {
|
|
3004
3035
|
existingConfig = fs.readFileSync(configPath, "utf8");
|
|
3005
3036
|
}
|
|
3006
|
-
const port =
|
|
3037
|
+
const port = resolveDaemonPort(effectiveEnv);
|
|
3007
3038
|
let portState = { available: true, reuseExisting: false };
|
|
3008
|
-
if (allowDaemon) {
|
|
3009
|
-
const
|
|
3039
|
+
if (allowDaemon && isolatedDaemonLifecycle) {
|
|
3040
|
+
const available = await lifecycle.isPortAvailable(port, DEFAULT_HOST);
|
|
3041
|
+
if (!available) {
|
|
3042
|
+
throw new Error(
|
|
3043
|
+
`[docdex] ${DEFAULT_HOST}:${port} is unavailable for the isolated daemon lifecycle`
|
|
3044
|
+
);
|
|
3045
|
+
}
|
|
3046
|
+
}
|
|
3047
|
+
if (allowDaemon && !isolatedDaemonLifecycle) {
|
|
3048
|
+
const cleaned = await lifecycle.cleanupExistingDaemon({
|
|
3010
3049
|
logger: log,
|
|
3011
3050
|
env: effectiveEnv,
|
|
3012
3051
|
distBaseDir: resolvedDistBaseDir,
|
|
@@ -3021,8 +3060,8 @@ async function runPostInstallSetup({ binaryPath, logger, env, skipDaemon, distBa
|
|
|
3021
3060
|
allowDaemon = false;
|
|
3022
3061
|
}
|
|
3023
3062
|
}
|
|
3024
|
-
if (allowDaemon) {
|
|
3025
|
-
portState = await resolveDaemonPortState({
|
|
3063
|
+
if (allowDaemon && !isolatedDaemonLifecycle) {
|
|
3064
|
+
portState = await lifecycle.resolveDaemonPortState({
|
|
3026
3065
|
host: DEFAULT_HOST,
|
|
3027
3066
|
port,
|
|
3028
3067
|
logger: log
|
|
@@ -3050,7 +3089,7 @@ async function runPostInstallSetup({ binaryPath, logger, env, skipDaemon, distBa
|
|
|
3050
3089
|
distBaseDir: resolvedDistBaseDir
|
|
3051
3090
|
});
|
|
3052
3091
|
let reuseExisting = allowDaemon ? portState.reuseExisting : false;
|
|
3053
|
-
if (reuseExisting && allowDaemon) {
|
|
3092
|
+
if (reuseExisting && allowDaemon && !isolatedDaemonLifecycle) {
|
|
3054
3093
|
const daemonInfo = await fetchDaemonInfo({ host: DEFAULT_HOST, port });
|
|
3055
3094
|
const daemonVersion = normalizeVersion(daemonInfo?.version);
|
|
3056
3095
|
const packageVersion = normalizeVersion(resolvePackageVersion());
|
|
@@ -3077,9 +3116,9 @@ async function runPostInstallSetup({ binaryPath, logger, env, skipDaemon, distBa
|
|
|
3077
3116
|
}
|
|
3078
3117
|
}
|
|
3079
3118
|
let startupOk = false;
|
|
3080
|
-
if (allowDaemon) {
|
|
3119
|
+
if (allowDaemon && !isolatedDaemonLifecycle) {
|
|
3081
3120
|
const allowStartNow = !(process.platform === "win32" && isNpm);
|
|
3082
|
-
const result = await startDaemonWithHealthCheck({
|
|
3121
|
+
const result = await lifecycle.startDaemonWithHealthCheck({
|
|
3083
3122
|
binaryPath: startupBinaries.binaryPath,
|
|
3084
3123
|
port,
|
|
3085
3124
|
host: DEFAULT_HOST,
|
|
@@ -3168,6 +3207,7 @@ module.exports = {
|
|
|
3168
3207
|
warnCodexRestart,
|
|
3169
3208
|
configUrlForPort,
|
|
3170
3209
|
configStreamableUrlForPort,
|
|
3210
|
+
resolveDaemonPort,
|
|
3171
3211
|
parseEnvBool,
|
|
3172
3212
|
resolveOllamaInstallMode,
|
|
3173
3213
|
resolveOllamaModelPromptMode,
|