@ataraxy-labs/sem 0.18.0 → 0.20.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/CHANGELOG.md CHANGED
@@ -4,6 +4,37 @@ All notable changes to sem are documented in this file.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.20.0] - 2026-07-05
8
+
9
+ ### Changed
10
+
11
+ - **Indexing now shows a staged loader with a real, whole-build progress bar, not a single "Building entity graph" spinner.** A cold graph build renders each phase sem-core reports as a persistent `◆` line — `Scanning files — N found`, `Parsing code — done` — and a **single filling bar with a live percentage spans the entire build**: the build is two passes over the file set (parse, then resolve), so the bar's length is 2×files and its position is (files parsed + files resolved). It tops out at ~50% when parsing finishes and only reaches 100% when resolution actually completes — so 100% means genuinely done, not "parsing done." Fed by two lock-free per-file counters (`graph_parse_done`, `graph_resolve_done`) via phase hooks. Ends with the existing `✓ N entities · M files in …ms` summary. Warm cache fires nothing and stays instant; TTY-only, so agents, pipes, the MCP server, and CI see nothing (the bar's poll thread never even spawns off a terminal).
12
+ - **`sem setup` now shows a staged progress loader instead of a flat list of check lines.** Setup runs as a small tree of steps — `git diff → sem diff`, `Claude Code hooks`, `pre-commit hook` — each with a live braille spinner that resolves to a green `◆` (did something), a dim `·` (nothing to do / not applicable, e.g. not in a git repo), or a yellow `⚠` (left a file untouched on purpose, e.g. an unparseable `settings.json`). It ends with a one-line summary and the `sem unsetup` revert hint. Same idempotent behaviour, just legible at a glance.
13
+
14
+ ### Added
15
+
16
+ - **sem-core: `set_build_phase_hook` / `clear_build_phase_hook` / `BuildPhase` + `graph_parse_done` + `graph_resolve_done`** — an optional per-thread callback at graph-build phase boundaries (parsing, resolving) plus a lock-free counter of files parsed, so a front-end can render staged progress and a live parse bar. No-op for every caller that doesn't read them.
17
+
18
+ ## [0.19.0] - 2026-07-05
19
+
20
+ ### Removed
21
+
22
+ - **Removed `sem orient` and all fuzzy/ranked retrieval.** The `orient` command and its `--pack` briefing, the sem-core ranking (lexical scoring, IDF, recall net, structural priming), the `sem_entities query=` intent-search mode, and the resident server's `orient` socket op are all gone. Ranking a natural-language task to the right entity proved unreliable — a 45-task validation showed the ranker's hit-rate (~47%) could not be lifted by heuristics without causing regressions — and it was the only non-deterministic thing in sem. sem is now purely deterministic: `context` (read an entity plus its callers/callees), `impact` (blast radius), `diff`, `entities` (list by path, or `text=` for exact-substring search), `blame`, `log`. To find code whose name you don't know, use a plain text search to get a candidate name, then hand it to `sem context` for the structure grep can't give. The prompt-submit hook keeps its deterministic exact-name prefetch and no longer shells out to the ranker.
23
+
24
+ ### Fixed
25
+
26
+ - **Dot-chain extraction is now linear, not quadratic, in file size.** `extract_dot_chains_with_positions` computed each match's line number by counting newlines from the start of the file every time, so on a large file dense with `a.b` chains the cost was O(matches times filelen). Since the regex yields matches in increasing byte order, it now tracks the line number incrementally and counts only the newlines since the previous match, which is linear overall and produces identical one-based line numbers. Verified byte-for-byte identical graph output on React (34,251 entities, 73,702 edges). No change for typical files; it removes a cliff on very large generated or minified sources.
27
+
28
+ - **Structural hashing no longer allocates a Vec per AST node.** The two structural-hash walkers (`hash_structural_tokens` and its name-excluding variant) collected every internal node's children into a fresh heap `Vec` (plus a fresh tree-sitter cursor) just to push them in reverse, despite a comment claiming zero allocations. They now reuse a single cursor and push children in place, reversing the appended slice, which is byte-for-byte identical output. On a cold graph build this removes roughly 300k allocations (structural hashing alone dropped from about 319k allocations to 13.5k, measured with dhat on deno). Peak RSS is unchanged and wall time is within noise under mimalloc, but the churn reduction helps memory-constrained and non-mimalloc builds. Hashes are verified identical across 3,337 entities, so rename detection and existing caches are unaffected.
29
+
30
+ ### Added
31
+
32
+ - **`sem setup` now makes sem a Claude Code session default (macOS/Linux).** Beyond the `git diff` alias, it installs two session hooks into `~/.claude/settings.json`: a warm resident graph (SessionStart runs `sem mcp --resident` detached, so structural queries answer in single-digit ms instead of rebuilding) and prompt-time context injection (`sem hook prompt-submit`). The JSON edit is idempotent, backs up `settings.json` first, refuses to touch a file it can't parse, and preserves every existing user hook and key; `sem unsetup` removes exactly the sem hooks and cleans up empty arrays. Local warmth is free and login-free — cloud (`sem login`) is repositioned in the README as the scale/team/CI upgrade, not the way to get warmth.
33
+
34
+ ### Documentation
35
+
36
+ - **Benchmarks page rebuilt on the July 2026 paired-run data.** The docs site's benchmarks page now reports the real agent A/B numbers (grep+read agent vs sem agent on SWE-bench Verified bugs, hidden-test graded): 50-65% faster code understanding, verify loop 2.90s to 0.59s per iteration when call-graph edges resolve (bimodal, 1.2x floor disclosed), token parity stated plainly, and an explicit "what sem does not do" section including the unchanged solve rate. Retired the stale "75% fewer tokens" and "2.3x agent accuracy" hero claims. Changelog page gains entries for v0.17-v0.18 work with the lessons that produced them.
37
+
7
38
  ## [0.18.0] - 2026-07-03
8
39
 
9
40
  ### Fixed
package/README.md CHANGED
@@ -270,7 +270,9 @@ sem setup
270
270
 
271
271
  Now `git diff` shows entity-level changes instead of line-level. No prompts, no agent configuration needed. Everything that calls `git diff` gets sem output automatically. Also installs a pre-commit hook that shows entity-level blast radius of staged changes.
272
272
 
273
- To disable and go back to normal git diff:
273
+ On macOS and Linux, `sem setup` also wires sem into your Claude Code sessions (free, local, no login): a **warm resident graph** so structural queries answer in single-digit milliseconds instead of rebuilding each time, and **prompt-time context** so the code an agent would otherwise forage for arrives at the start of the turn. It edits `~/.claude/settings.json` idempotently, backs it up first, and leaves any hooks you already have untouched.
274
+
275
+ To disable and go back to normal git diff (also removes the session hooks):
274
276
 
275
277
  ```bash
276
278
  sem unsetup
@@ -299,11 +301,11 @@ jobs:
299
301
 
300
302
  No config, no API keys, never fails your build. See [action/](action/) for details.
301
303
 
302
- ## Cloud acceleration (optional)
304
+ ## Cloud acceleration (for scale and teams)
303
305
 
304
- sem builds an entity dependency graph to answer `impact`, `context`, and `entities`. On a small or medium repo that's instant. On a very large codebase, building the graph locally can take hundreds of milliseconds to a few seconds.
306
+ Local is always free and, after `sem setup`, always warm the resident graph keeps your repo hot on your own machine, so day-to-day queries are instant with no login. You do not pay to make your laptop fast.
305
307
 
306
- `sem login` connects sem to sem cloud, which keeps a warm, pre-built graph for your registered repos. When you're logged in, those queries are served from the warm cache instead of rebuilt locally, so they stay fast no matter how big the repo gets.
308
+ Cloud is for what a laptop can't do. On a very large monorepo the first local graph build can take a few seconds; a shared team graph shouldn't be rebuilt per developer; and CI wants the graph without checking anything out. `sem login` connects those cases to sem cloud, which keeps a warm, pre-built graph for your registered repos and serves the heavy queries from it (on a large repo like deno, an `impact` query is ~86ms from the cloud vs ~573ms rebuilt locally).
307
309
 
308
310
  ```bash
309
311
  sem login # GitHub device flow, one time
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ataraxy-labs/sem",
3
3
  "mcpName": "io.github.Ataraxy-Labs/sem",
4
- "version": "0.18.0",
4
+ "version": "0.20.0",
5
5
  "description": "npm wrapper for the sem CLI. Downloads the matching release binary and exposes the sem command in node_modules/.bin.",
6
6
  "license": "MIT OR Apache-2.0",
7
7
  "type": "module",