tessera-codegraph 0.0.0-stage → 1.2.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/README.md CHANGED
@@ -1,3 +1,39 @@
1
- # Temporary Holding Version
1
+ # tessera-codegraph
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ The npm distribution of [Tessera](https://github.com/iamsaquib8/tessera):
4
+ deterministic edit safety for AI coding agents. It installs the prebuilt
5
+ `tessera` binary for your platform. No Rust toolchain or install script is
6
+ needed.
7
+
8
+ ```sh
9
+ npx tessera-codegraph find <symbol> # one-off
10
+ npm i -g tessera-codegraph # then: tessera status
11
+ ```
12
+
13
+ ## How it works
14
+
15
+ The `tessera-codegraph` package is a small launcher. The binary ships in one
16
+ optional dependency per platform, and npm installs only the one that matches
17
+ your machine:
18
+
19
+ | Package | Platform |
20
+ | --- | --- |
21
+ | `tessera-codegraph-darwin-arm64` | macOS, Apple silicon |
22
+ | `tessera-codegraph-darwin-x64` | macOS, Intel |
23
+ | `tessera-codegraph-linux-x64-musl` | Linux x64, any distribution (static) |
24
+ | `tessera-codegraph-linux-arm64-musl` | Linux arm64, any distribution (static) |
25
+ | `tessera-codegraph-win32-x64` | Windows x64 |
26
+
27
+ Nothing is downloaded at install time, so it works behind proxies and with
28
+ `--ignore-scripts`. If you install with `--omit=optional`, the launcher tells
29
+ you which package is missing.
30
+
31
+ Other platforms can build from source with `cargo install tessera-codegraph`.
32
+
33
+ ## Maintainers
34
+
35
+ `.github/workflows/release.yml` publishes these packages after a GitHub release
36
+ is published, using the `NPM_TOKEN` secret.
37
+ `npm/scripts/build-platform-packages.js <version> <archives-dir>` unpacks the
38
+ release archives and stamps the version. Run the tests with
39
+ `node --test npm/test/`.
package/bin/tessera.js ADDED
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+
4
+ const { spawnSync } = require("child_process");
5
+ const { resolveBinary } = require("../lib/resolve");
6
+
7
+ let bin;
8
+ try {
9
+ bin = resolveBinary();
10
+ } catch (error) {
11
+ console.error(`[tessera] ${error.message}`);
12
+ process.exit(1);
13
+ }
14
+
15
+ const result = spawnSync(bin, process.argv.slice(2), { stdio: "inherit" });
16
+ if (result.error) {
17
+ console.error(`[tessera] failed to launch ${bin}: ${result.error.message}`);
18
+ process.exit(1);
19
+ }
20
+ process.exit(result.status === null ? 1 : result.status);
package/lib/resolve.js ADDED
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+
3
+ const PACKAGES = {
4
+ "darwin-arm64": "tessera-codegraph-darwin-arm64",
5
+ "darwin-x64": "tessera-codegraph-darwin-x64",
6
+ "linux-x64-musl": "tessera-codegraph-linux-x64-musl",
7
+ "linux-arm64-musl": "tessera-codegraph-linux-arm64-musl",
8
+ "win32-x64": "tessera-codegraph-win32-x64",
9
+ };
10
+
11
+ function currentHost() {
12
+ return { platform: process.platform, arch: process.arch };
13
+ }
14
+
15
+ // Linux always gets the static musl build: it runs on every distribution,
16
+ // including glibc versions older than the ones release runners link against.
17
+ function platformPackage(host = currentHost()) {
18
+ let key = `${host.platform}-${host.arch}`;
19
+ if (host.platform === "linux") key += "-musl";
20
+ const name = PACKAGES[key];
21
+ if (!name) {
22
+ throw new Error(
23
+ `no prebuilt tessera binary for ${host.platform}/${host.arch}; ` +
24
+ "install with `cargo install tessera-codegraph` instead"
25
+ );
26
+ }
27
+ return name;
28
+ }
29
+
30
+ function resolveBinary(host = currentHost(), resolve = require.resolve) {
31
+ const name = platformPackage(host);
32
+ const exe = host.platform === "win32" ? "tessera.exe" : "tessera";
33
+ try {
34
+ return resolve(`${name}/bin/${exe}`);
35
+ } catch (error) {
36
+ throw new Error(
37
+ `Install failed: package ${name} is missing. ` +
38
+ "Reinstall without --no-optional / --omit=optional, or use `cargo install tessera-codegraph`."
39
+ );
40
+ }
41
+ }
42
+
43
+ module.exports = { PACKAGES, platformPackage, resolveBinary };
package/package.json CHANGED
@@ -1,6 +1,40 @@
1
1
  {
2
2
  "name": "tessera-codegraph",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.2.0",
4
+ "description": "Deterministic edit safety for AI coding agents: blast radius before an edit, verification after it. Prebuilt tessera binary, no Rust toolchain required.",
5
+ "bin": {
6
+ "tessera": "bin/tessera.js"
7
+ },
8
+ "files": [
9
+ "bin/tessera.js",
10
+ "lib/resolve.js"
11
+ ],
12
+ "keywords": [
13
+ "mcp",
14
+ "mcp-server",
15
+ "ai-agents",
16
+ "claude-code",
17
+ "cursor",
18
+ "codex",
19
+ "code-graph",
20
+ "tree-sitter",
21
+ "refactoring",
22
+ "static-analysis"
23
+ ],
24
+ "homepage": "https://github.com/iamsaquib8/tessera",
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "git+https://github.com/iamsaquib8/tessera.git"
28
+ },
29
+ "license": "Apache-2.0",
30
+ "engines": {
31
+ "node": ">=18"
32
+ },
33
+ "optionalDependencies": {
34
+ "tessera-codegraph-darwin-arm64": "1.2.0",
35
+ "tessera-codegraph-darwin-x64": "1.2.0",
36
+ "tessera-codegraph-linux-x64-musl": "1.2.0",
37
+ "tessera-codegraph-linux-arm64-musl": "1.2.0",
38
+ "tessera-codegraph-win32-x64": "1.2.0"
39
+ }
40
+ }