@ataraxy-labs/sem 0.19.0 → 0.21.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,36 @@ All notable changes to sem are documented in this file.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.21.0] - 2026-07-10
8
+
9
+ ### Added
10
+
11
+ - **Cloud-enabled `sem diff` now creates an immutable, owner-private hosted review URL.** Snapshot uploads include changed-entity caller/callee relations and truthful Git provenance: branch, scope, base/head refs, and available SHAs. Working-tree reviews explicitly report `HEAD → WORKTREE` rather than implying that uncommitted changes exist on GitHub.
12
+ - **GitHub login can now be exchanged for a revocable CLI session.** Raw GitHub credentials are not persisted as sem credentials, and the CLI session resolves to the same stable principal used by web reviews.
13
+
14
+ ### Fixed
15
+
16
+ - **Hosted-review upload failures are visible without breaking the local diff.** `sem diff` still exits successfully with its complete local result, while stderr explains that the private review could not be uploaded.
17
+ - **Transitional cloud repository states refresh immediately.** `sem whoami` no longer leaves a repository stuck at a cached `pending` state after cloud indexing has completed.
18
+ - **`sem diff` now collapses contiguous line chunks on unsupported files into one summary line.** When a file has no grammar, sem falls back to fixed 20-line chunks, so deleting or adding one previously printed a wall of `⊖ chunk lines 1-20 [deleted]` / `21-40` / `41-60` … lines that ate context for no information. Contiguous chunks of the same change type now consolidate to a single line, e.g. `⊖ 13 chunks lines 1-246 [deleted]`. Verbose mode (`-v`) is unchanged, since it still prints per-chunk content. Thanks @graipher for the report (#466).
19
+
20
+ ### Performance
21
+
22
+ - **`sem context` now answers from an indexed point query instead of loading the whole graph, so it scales to millions of entities.** It previously hydrated every entity (plus decompressed bodies) just to answer about one, so on a 2.3M-entity repo each call took ~15s. The SQLite cache is already normalized and indexed, so when the git oracle proves the cache fresh (no filesystem walk) `sem context` now builds only the k-hop neighbourhood around the target straight from the store: batched `IN (...)` edge queries, bodies fetched per hop, stopping once there is enough content to cover the token budget so a hub entity's fan-out does not explode the fetch. It reuses the existing packer on that subgraph, so output is byte-for-byte identical to the full-graph path, and falls back to the full load whenever the oracle declines. On the Linux kernel (2.31M entities) `sem context` drops from ~15s to 0.44s per call; on Kubernetes (520k) from ~5s to ~1.2s.
23
+ - **Default (`All`-mode) `sem impact` now answers from the indexed cache too, instead of hydrating the whole graph.** A full cache stored entities and edges but not test flags, so All/Tests-mode impact (which includes the "covered by N tests" answer) fell through to a full-graph load — ~3.5s on Kubernetes, ~10.7s for an unbounded `--depth 0`, even for a tiny blast radius. The full save now records test flags (shared with the topology save) behind a metadata marker, so the existing point-query path can serve All-mode impact straight from indexed edge queries. Output is identical to the full-load path — verified byte-for-byte against it, including the tests field. On Kubernetes (520k entities) default `sem impact` drops from **~3.5s to 0.04s**, and `--depth 0` from **~10.7s to 0.04s**. Caches built before the marker still take the full path, so nothing regresses.
24
+ - **The resident MCP server no longer holds the whole graph in RAM by default, cutting idle memory dramatically.** It used to proactively build and keep the entire deserialized graph in memory on startup so the first query would be warm — ~671MB on Kubernetes, ~5GB on the Linux kernel. But `context` and `impact` now answer from the indexed cache directly, and the CLI's fast paths bypass the resident entirely, so that proactive hold is mostly wasted memory. Prewarm is now opt-in (`SEM_PREWARM`); by default the resident stays light and builds the full graph lazily, only when a query that genuinely needs it (graph/diff/text) runs. On Kubernetes an idle resident drops from **671MB to 10MB**.
25
+
26
+ ## [0.20.0] - 2026-07-05
27
+
28
+ ### Changed
29
+
30
+ - **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).
31
+ - **`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.
32
+
33
+ ### Added
34
+
35
+ - **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.
36
+
7
37
  ## [0.19.0] - 2026-07-05
8
38
 
9
39
  ### Removed
package/README.md CHANGED
@@ -20,6 +20,7 @@
20
20
  <a href="#install">Install</a> ·
21
21
  <a href="#commands">Commands</a> ·
22
22
  <a href="#use-with-ai-agents-mcp">Agents (MCP)</a> ·
23
+ <a href="docs/cloud-consent.html">Cloud consent</a> ·
23
24
  <a href="https://github.com/Ataraxy-Labs/sem/releases/latest">Releases</a>
24
25
  </p>
25
26
 
@@ -35,6 +36,8 @@ sem is a semantic version control tool that works on top of Git. It parses your
35
36
 
36
37
  It works in any Git repo with no setup.
37
38
 
39
+ Cloud-backed queries are opt-in per repo: logging in does not upload a repo or send a query. See the [cloud consent flow](docs/cloud-consent.html) for the public/private repo states, preview screen, local audit log, and forget controls.
40
+
38
41
  <p align="center">
39
42
  <img src="assets/terminal.svg" alt="sem diff" width="800" />
40
43
  </p>
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.19.0",
4
+ "version": "0.21.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",