@ataraxy-labs/sem 0.14.1 → 0.15.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.
Files changed (3) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +25 -1
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -4,6 +4,48 @@ All notable changes to sem are documented in this file.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.15.0] - 2026-06-30
8
+
9
+ ### Changed
10
+
11
+ - Whole-repo commands (`sem graph`) now skip the file-discovery walk when git proves the cache is fresh (HEAD unchanged and the working tree clean), serving the cached topology directly. On a 200K-file repo this is about 9x faster with git fsmonitor and about 4.5x faster without it; small repos and non-git repos are unchanged. The oracle only ever declines to accelerate, never serves stale results, and the `git status` check is time-bounded (`SEM_FRESHNESS_TIMEOUT_MS`) with `SEM_FRESHNESS=scan|git|auto` to override.
12
+
13
+ ### Added
14
+
15
+ - `sem xref` lists cross-repo dependencies across your indexed repos: entities in one repo that depend on entities in another. A single-repo local graph can't see this, so it's a cloud feature (requires `sem login`) and is gated to the team/enterprise tier. Adds `cross_deps()` to the shared cloud client.
16
+ - `sem diff` now prints a one-line hint, when run interactively and logged out, that `sem login` reveals what your changes break across repos (a cross-repo question a local single-repo diff can't answer). It is heavily throttled (at most once a week), shown only on a terminal with real entity changes, and stays completely silent in CI, pipes, `--json`/non-terminal output, and for logged-in users.
17
+
18
+ ### Performance
19
+
20
+ - Cache freshness checks now run the per-file `stat` + content-hash scan in parallel (rayon) instead of sequentially (#351). On touched-file cache hits over large repos, the freshness scan was the dominant remaining cost (~42ms of sequential filesystem/hash work on a 5K-file touched scenario); it now scales across cores. SQLite reads stay serial (the connection isn't shared across threads) and fingerprint-refresh writes remain serial and best-effort — only the pure filesystem+hash work is parallelized, so cache-hit validity is unchanged.
21
+
22
+ ### Documentation
23
+
24
+ - The bundled `/sem` agent skill no longer hardcodes a language count. It said "31 languages", which went stale as grammars were added and disagreed with the README ("32") and the crate description ("28"); it now says "30+ languages" so it can't drift, and an en-dash was replaced with a hyphen.
25
+ - README: documented the optional cloud acceleration flow (`sem login` serves `impact`/`context`/`entities` from a warm pre-built graph for large repos; local is unchanged and `SEM_LOCAL=1` forces local), and added Lua to the supported-languages table.
26
+
27
+ ### Added
28
+
29
+ - Lua support, via the `tree-sitter-lua` grammar (gated behind the `lang-lua` feature in `grammar-all`). Extracts global, `local`, table (`t.f`), and method (`t:f`) functions. Thanks @mmgeorge for the request (#393).
30
+ - `SemanticEntity` now carries optional `start_byte`/`end_byte` offsets, populated from the underlying tree-sitter node during code extraction. A consumer can slice the exact original bytes of an entity out of a file given only its `file_path` and span, without re-parsing. Persisted through the entity cache and surfaced in `sem entities --json`. Thanks to Thomas J. for the request.
31
+
32
+ ### Added
33
+
34
+ - `npx @ataraxy-labs/sem-skill`: one-command setup of sem for coding agents. Installs the sem skill into `~/.claude/skills/` and registers the `sem mcp` server, so an agent uses sem (impact / context / orient / diff) over grep for structural questions without manual setup. Builds on the skill contributed in #376.
35
+
36
+ ### Added
37
+
38
+ - An agent skill (`skills/sem/SKILL.md`) documenting sem's semantic diff, impact, blame, history, context, and graph workflows for coding agents. Thanks @linhlban150612 for the contribution (#376).
39
+ - `self-update` Cargo feature (on by default) gates the built-in `sem update` and the background update-available check. Distro and package-manager builds that own the binary's lifecycle can opt out with `cargo build --no-default-features`; `sem update` then prints a "update through your package manager" message instead of replacing the binary. Thanks @0323pin (pkgsrc/NetBSD) for the request (#390).
40
+
41
+ ### Added
42
+
43
+ - `sem context --hops N` bounds the related entities to N graph hops from the target (instead of filling to the token budget), so you can ask for "the entity and just its immediate neighborhood." The `sem_context` MCP tool gains the same `hops` parameter. 0 (the default) keeps the existing unbounded, budget-driven behavior.
44
+
45
+ ### Changed
46
+
47
+ - The `sem mcp` instructions now tell agents to read code with `sem_context` (which returns an entity's full source plus its callers/callees, addressed by name) rather than opening the file, reserving direct file reads for editing and non-code. Reading by entity is robust to line drift and arrives with the dependency context.
48
+
7
49
  ## [0.14.1] - 2026-06-23
8
50
 
9
51
  ### Fixed
package/README.md CHANGED
@@ -258,9 +258,26 @@ To disable and go back to normal git diff:
258
258
  sem unsetup
259
259
  ```
260
260
 
261
+ ## Cloud acceleration (optional)
262
+
263
+ 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.
264
+
265
+ `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.
266
+
267
+ ```bash
268
+ sem login # GitHub device flow, one time
269
+ sem impact myFunc --file src/foo.rs # served from the cloud's warm graph
270
+ ```
271
+
272
+ It is fully optional and transparent:
273
+
274
+ - Not logged in, or the cloud is unreachable? sem computes locally and prints the exact same output. No failures, no difference in results.
275
+ - `SEM_LOCAL=1` forces local computation even when logged in.
276
+ - Small repos see no change, local is already fast. The win is for large codebases where rebuilding the graph each time is the bottleneck.
277
+
261
278
  ## What it parses
262
279
 
263
- 31 programming languages with full entity extraction via tree-sitter:
280
+ 32 programming languages with full entity extraction via tree-sitter:
264
281
 
265
282
  | Language | Extensions | Entities |
266
283
  |----------|-----------|----------|
@@ -278,6 +295,7 @@ sem unsetup
278
295
  | Swift | `.swift` | functions, classes, protocols, structs, enums, properties |
279
296
  | Elixir | `.ex` `.exs` | modules, functions, macros, guards, protocols |
280
297
  | Bash | `.sh` | functions |
298
+ | Lua | `.lua` | functions (global, local, table, and method forms) |
281
299
  | HCL/Terraform | `.hcl` `.tf` `.tfvars` | blocks, attributes (qualified names for nested blocks) |
282
300
  | Kotlin | `.kt` `.kts` | classes, interfaces, objects, functions, properties, companion objects |
283
301
  | Fortran | `.f90` `.f95` `.f` | functions, subroutines, modules, programs |
@@ -348,6 +366,12 @@ Add it once, then talk to your agent normally. It calls the tools on its own.
348
366
  claude mcp add sem -- sem mcp
349
367
  ```
350
368
 
369
+ Or one command that also installs the skill, so the agent knows *when* to reach for sem:
370
+
371
+ ```bash
372
+ npx @ataraxy-labs/sem-skill
373
+ ```
374
+
351
375
  **Cursor, Claude Desktop, or any client with an `mcpServers` config:**
352
376
 
353
377
  ```json
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ataraxy-labs/sem",
3
- "version": "0.14.1",
3
+ "version": "0.15.0",
4
4
  "description": "npm wrapper for the sem CLI. Downloads the matching release binary and exposes the sem command in node_modules/.bin.",
5
5
  "license": "MIT OR Apache-2.0",
6
6
  "type": "module",