Repository navigation
dctx v1.3.0
Install from the GitHub release archives. The npm, crates.io and PyPI packages and
the Go module are built and tested in CI, but registry publication is still pending;
until it happens, the release archives are the install path.
Added
dctx rpc: a versioned, newline-delimited JSON engine protocol over stdin/stdout
(protocol 1.0.0, schema indocs/protocol/). Every reply carriesengine_version;
operation output is exactly the CLI stdout bytes.dctx context TARGET...: minimal ranked context for a file, symbol name or stable
node id, with chunk ids,--budget,--jsonand--session ID --dedupe.
pack --for TEXT --jsonnow returns the same JSON context page.dctx doctor [--json] [--probe-project]: lists the dctx binaries visible from the
current folder with path, ownership scope, version, build commit, SHA-256 and cache
sizes. It changes nothing and uses no network.- MCP
--profile lean|threeand--tools NAME,...select a smaller tool set with
compact descriptions (lean start-up tool definitions: 6,278 -> 1,637 bytes). See
docs/guides/MCP.md. - Python, Node (npm) and Go client packages over
dctx rpc, each with CLI byte-parity
tests in CI. They are not published to a registry yet. - Release supply chain: keyless cosign signatures, CycloneDX SBOMs, GitHub build
provenance attestations, a reproducible Linux musl build check and offline
(air-gap) bundles. See docs/VERIFYING.md. CI runscargo audit.
SECURITY.md and SUPPORT.md describe the security and support policy. - Robustness tests and a fuzz smoke workflow in CI.
dctx pack --forprints a warning on stderr when the text names no identifiers;
the page is unchanged.dctx pack --clipboardsupportsxselon Linux.- Experimental
tools/catalog-benchfor huge-tree catalog measurements (not part of
the CLI).
Changed
dctx packprints itspack bytes=… files=… retention=… version=V1status line on
stderr. stdout is exactly the page and ends in a newline;pack --jsonstdout is
exactly one JSON document. Scripts that read the status line from stdout must read
stderr instead.- Indexes live in an engine
major.minorsubdirectory of the cache parent
(DCTX_CACHE_DIRor the platformdctx/v2root). 1.3 builds its own index on first
use; patch releases share it, and older unscoped cache data is ignored, not deleted. - Faster warm path: one fused inventory walk with directory-relative stats, rule files
validated by stamps and cheaper decoding (measured checkout 288 -> 94 ms, 4k-file
tree 88 -> 32 ms). Timestamp-only changes reuse the index generation. - Each place keeps its own warm index; targeted queries no longer admit the whole
place first; capacity errors name the exact limit and the flag that changes it. - Pack output streams with bounded memory and spools large pages. Pack history uses
compact manifest caches. - Language extraction audit with new goldens; the default parser id is now
dctx-structural/3. dctx pack --forkeeps bare short names such asmainandrun, and keeps the
case of capitalized words. Exact-case names and non-test code rank first, so
--for Sessionfinds theSessiontypes before test functions.dctx cache,dctx template,dctx contextand a baredctxfollow the exit-code
contract in docs/CLI-EXIT-CODES.md: 2 for usage errors,
3 for I/O errors (naming the path), each with ahint:line. RPCcache_status
returns the same codes.dctx contextwith no TARGET exits 2.- A bare
dctxwhose stdin or stdout is not a terminal prints short usage and exits 2
instead of starting the interactive menu. dctx pack --helpprints only the pack usage and flags.dctx plugin …anddctx gittext output is plain text. Refusals go to stderr as
❌ Error:with ahint:line; a missing consent names
dctx plugin enable <id> --approve. JSON output and exit codes are unchanged.dctx cache autotext shows a UTC time next tolast_auto_clean_msand
next_due_ms; JSON is unchanged.- Docs and package READMEs no longer present
npx dctx,npm install,
cargo install dctx-cli,pip install dctxorgo getas working install paths.
The Python missing-engine message no longer suggests a PyPI install. - Bundled SQLite is 3.54.1 (rusqlite 0.41).
Removed
dctx plugin runanddctx gitJSON replies no longer repeat the
facade_spawnsandfacade_git_childrenkeys. The facade counters remain once in
--jsonoutput and are gone from text output.- The cwd-relative plugin root fallback used when HOME was unset (see Security).
Fixed
- Pack headers show
ID="UNIQUE_ID"with clean quotes in the file-access
instructions, including stamped and tree-only output. This changes pack output bytes. - Pack rendering preserves literal template syntax in file bodies and paths, including
backslashes, for default, stamped and compiled templates. Variable substitution
applies only to template structure;pack --foralso preserves source CRLF bytes. - The last
</FILE_CONTENT_END …>marker of a pack page is no longer glued to the
status line. dctx pack --forwith no usable terms says so and suggests backticks, instead of
reporting that no name matched the index. Its flag refusal now lists--json.dctx mapcall edges stay within the caller's language family: a Rust.all(..)
no longer resolves to a Makefile target. A guessed method call such as
iter.map(..)links to a project method only when the caller can see that method's
type. Hubs, neighbors, path andpack --forlose these false edges.dctx plugin searchand the other text-mode plugin commands no longer mix JSON
fields or internal counters (facade_git= spawns= git_children=) into the output;
dctx git statuswithout consent no longer printsgit: ConsentRequired.dctx pack --clipboardwith no clipboard tool names the tools it tried and suggests
--output FILE.- A symlinked or non-regular
.gitignoreor.dctxignoreinside the project is
skipped with a warning instead of failing the command; rule-file errors no longer
print the absolute project path. - Cache policy saves no longer get stuck on a
policy.v1.tmpleft by a crash. dctx pluginanddctx gitwork when the plugin root sits below a symlinked
directory (macOS/varand/tmp, a linked home) instead of failing with
Interrupted; a symlinked plugin root itself and symlinks inside it stay refused.- Windows:
dctx plugin enable,disable,install,removeandupdatesay that the
plugin store is read-only on Windows (ReadOnlyStore) instead of failing with
Interrupted, and consent hints there no longer offer only a command that cannot work. dctx doctorshows each binary's build commit (commit:in text,"commit"in
JSON) and names an invalid argument.dctx --helplistsmap export; thedctx map --helpexamples map a file that has
symbols.- The Python wrapper raises
BinaryNotFoundError, notRuntimeError, when no home
directory is available (Windows withoutUSERPROFILE/LOCALAPPDATA). - Windows: durable file replacement, inode identity and racy-window directory stamps
in map refresh. macOS: symlinked ancestors of the project, config and cache roots
(such as/varand/tmp) are resolved at the boundary while in-tree symlinks stay
refused; file names that APFS refuses are handled. Other cross-platform test and
code fixes. - README CLI reference, map-mode guide, modalities, start, testing and exit-code docs
match the current binary and CI: all commands, 50 languages, neighbors depth 1..4,
exact--lines, the global ignore file path, and that.git/info/excludeand
core.excludesFileare not read. tools/sync-version.shalso syncs the Python, Go and npm package versions and the
release links in the docs and package READMEs.
Security
- Bundled SQLite upgraded to 3.54.1 (rusqlite 0.41, libsqlite3-sys 0.39.1) for
RUSTSEC-2026-0459. - Hardening across the engine and CLI, documented in
docs/SECURITY-MODEL.md. - Pack and diff output entity-encode
&,<,>,"and control or line-separator
characters in file paths, so a file name cannot forge file boundary markers.
Ordinary paths are unchanged and output stays byte-stable. dctx doctorno longer executes dctx binaries found in./node_modules/.bin,
$VIRTUAL_ENVor relative PATH entries, which an untrusted checkout can plant; they
are listed with path and SHA-256.--probe-projectopts in.- MCP tool arguments are passed after
--and taken literally, so a flag-shaped id or
query (for example--place) cannot change the place outside the server root. MCP
never forwards--placeor--output. pack --output,map export --outputandtemplate build --outputnever follow a
symlink or write into a non-regular target; pack and template write a fresh sibling
file and rename it into place.- Clipboard tools are looked up only in absolute PATH entries, so
.or empty entries
cannot run a repository's ownxcliporwl-copy. - The source reader checks an entry's type before opening it and never opens device
nodes, FIFOs or sockets (Unix opens useO_NOCTTY).StdFsmetadata, listings and
link reads no longer follow symlinked path components; Windows ancestor guards block
directory replacement. - The store adapter refuses symlinked, foreign-owned or group/other-writable store
roots and creates store directories with mode 0700. - The plugin root no longer falls back to a directory relative to the working
directory when HOME is unset; plugin commands refuse unless HOME or
DCTX_PLUGIN_ROOTis an absolute path. - The Python wrapper loads its
dctx_binary_<platform>engine package only from the
install directory that holdsdctx, never from the working directory or other
sys.pathentries. - The Python, Node and Go package READMEs warn that operation arguments carry full CLI
authority. - The no-follow open flag used by
map export --output, the map store and the desktop
snapshot rules now comes from the platform instead of a hard-coded x86 value, so it
also holds on Linux ARM64. - The npm wrapper tarball built in CI no longer lists the unpublished
@dctx/cli-*
platform packages, so installing it never resolves those names from the public
registry; error messages point to the release archive andDCTX_BIN. - The website playground rate limit can no longer be bypassed with a forged
X-Forwarded-Forheader. The website deploy builds without secrets and deploys only
frommainthrough a protected environment; the desktop release workflow is
disabled until the desktop app ships, with pinned toolchains, a frozen lockfile and
provenance attestations.