@ttsc/graph 0.31.5 → 0.32.1

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 (37) hide show
  1. package/README.md +1 -1
  2. package/lib/TtscGraphLauncherArguments.js +4 -7
  3. package/lib/TtscGraphLauncherArguments.js.map +1 -1
  4. package/lib/internal/InstalledGraphBinary.d.ts +73 -0
  5. package/lib/internal/InstalledGraphBinary.js +103 -0
  6. package/lib/internal/InstalledGraphBinary.js.map +1 -0
  7. package/lib/model/TtscGraphProjection.js.map +1 -1
  8. package/lib/model/TtscGraphProtocol.js +2 -2
  9. package/lib/model/TtscGraphProtocol.js.map +1 -1
  10. package/lib/model/TtscGraphSession.js +6 -9
  11. package/lib/model/TtscGraphSession.js.map +1 -1
  12. package/lib/model/TtscGraphSessionOptions.d.ts +4 -1
  13. package/lib/model/TtscGraphSessionState.js +2 -2
  14. package/lib/model/TtscGraphSessionState.js.map +1 -1
  15. package/lib/model/loadGraph.d.ts +3 -3
  16. package/lib/model/loadGraph.js +8 -11
  17. package/lib/model/loadGraph.js.map +1 -1
  18. package/lib/resolveGraphBinary.d.ts +22 -24
  19. package/lib/resolveGraphBinary.js +26 -45
  20. package/lib/resolveGraphBinary.js.map +1 -1
  21. package/lib/runGraph.d.ts +1 -1
  22. package/lib/runGraph.js +4 -4
  23. package/lib/runGraph.js.map +1 -1
  24. package/lib/view.js +5 -6
  25. package/lib/view.js.map +1 -1
  26. package/package.json +13 -4
  27. package/src/TtscGraphLauncherArguments.ts +4 -8
  28. package/src/internal/InstalledGraphBinary.ts +102 -0
  29. package/src/model/TtscGraphProjection.ts +18 -16
  30. package/src/model/TtscGraphProtocol.ts +2 -2
  31. package/src/model/TtscGraphSession.ts +5 -12
  32. package/src/model/TtscGraphSessionOptions.ts +4 -1
  33. package/src/model/TtscGraphSessionState.ts +2 -2
  34. package/src/model/loadGraph.ts +9 -15
  35. package/src/resolveGraphBinary.ts +26 -45
  36. package/src/runGraph.ts +4 -4
  37. package/src/view.ts +5 -8
@@ -1,35 +1,33 @@
1
1
  /**
2
- * Resolve the per-platform `ttscgraph` binary, or `null` when it cannot be
3
- * located.
2
+ * Resolve the `ttscgraph` binary this `@ttsc/graph` release spawns, or `null`
3
+ * when it cannot be located.
4
4
  *
5
- * `ttsc` is a peer dependency pinned to this package's own version, installed
6
- * alongside `@ttsc/graph` in the user's project rather than nested under this
7
- * launcher, so resolution starts from the user's project, not from this
8
- * package's own tree.
9
- *
10
- * The pin is what keeps the two halves of the graph in step. `literals` and the
11
- * rest of the node facts are resolved by the Go builder and ride the dump, so a
12
- * newer `@ttsc/graph` reading an older `ttscgraph` would find those fields
13
- * simply absent and answer from a graph missing facts it believes are there.
5
+ * The binary ships in `@ttsc/graph-<platform>-<arch>`, which `@ttsc/graph`
6
+ * lists as an exact-version optional dependency, so it is resolved from this
7
+ * package's own installation. The JavaScript client and the native producer
8
+ * therefore always come from one release, wherever the launcher was started.
9
+ * That pairing matters because node facts such as `literals` are resolved by
10
+ * the producer and ride the dump: a client reading an older producer would find
11
+ * those fields absent and answer from a graph missing facts it believes are
12
+ * there.
14
13
  *
15
14
  * Resolution order:
16
15
  *
17
16
  * 1. `TTSC_GRAPH_BINARY` env var, when set to an absolute path.
18
- * 2. The per-platform npm package `@ttsc/<platform>-<arch>/bin/ttscgraph[.exe]`.
19
- * That package carries `ttsc`, `ttscserver`, and `ttscgraph` together and is
20
- * an `optionalDependency` of `ttsc`, so it is resolved from `ttsc`'s
21
- * location — found from `cwd`, the project the caller selected (via `--cwd`
22
- * or an API `cwd` option), defaulting to `process.cwd()` when no project was
23
- * named. A launcher started from an unrelated directory still resolves the
24
- * `ttsc` installed under the target project it was asked to graph.
17
+ * 2. `@ttsc/graph-<platform>-<arch>/bin/ttscgraph[.exe]`, resolved from the
18
+ * installed `@ttsc/graph` package.
19
+ *
20
+ * `cwd` is still accepted so existing callers keep compiling. It no longer
21
+ * affects resolution: the binary used to come from the target project's `ttsc`
22
+ * platform package, and now belongs to `@ttsc/graph` itself.
25
23
  *
26
- * @evidence contracts/common.md#principled-implementation Project-anchored module resolution locates the peer ttsc and then its platform binary; an explicit absolute override has precedence.
27
- * @evidence contracts/common.md#clear-and-simple-design One resolver owns override and peer-package lookup for all graph launchers.
28
- * @evidence contracts/common.md#prohibited-implementation-shortcuts Resolution uses installed package contracts rather than guessing binary paths from repository layouts.
29
- * @evidence contracts/common.md#meaningful-documentation Native paragraphs and the ordered list explain peer placement, override precedence and target-project anchoring.
30
- * @evidence contracts/portability.md#os-neutral-implementation Native path checks and module resolution select the platform/architecture package; only Windows's required executable suffix differs explicitly.
24
+ * @evidence contracts/common.md#principled-implementation The installed-package resolver locates the exact-version platform dependency from this module's own location; an explicit absolute override has precedence.
25
+ * @evidence contracts/common.md#clear-and-simple-design The public function delegates to the one resolver every launcher, loader and session uses, anchored at this package's installation.
26
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Resolution uses the installed package contract rather than repository layouts or the target project's packages.
27
+ * @evidence contracts/common.md#meaningful-documentation Native paragraphs and the ordered list explain package ownership, override precedence and the retained but ignored cwd argument.
28
+ * @evidence contracts/portability.md#os-neutral-implementation The delegated resolver selects the platform/architecture package through Node module resolution; only Windows's executable suffix differs.
31
29
  * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources returns a path string and opens no handle.
32
- * @evidenceExclude contracts/performance.md#efficient-algorithms performs a constant number of module resolutions (ttsc, then its platform package).
30
+ * @evidenceExclude contracts/performance.md#efficient-algorithms performs at most one module resolution.
33
31
  * @evidenceExclude contracts/performance.md#reuse-equivalent-work resolves on every call and caches nothing, so a reinstall between calls is honored.
34
32
  */
35
33
  export declare function resolveGraphBinary(env?: NodeJS.ProcessEnv, cwd?: string): string | null;
@@ -1,60 +1,41 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.resolveGraphBinary = resolveGraphBinary;
7
- const node_module_1 = require("node:module");
8
- const node_path_1 = __importDefault(require("node:path"));
4
+ const InstalledGraphBinary_1 = require("./internal/InstalledGraphBinary");
9
5
  /**
10
- * Resolve the per-platform `ttscgraph` binary, or `null` when it cannot be
11
- * located.
6
+ * Resolve the `ttscgraph` binary this `@ttsc/graph` release spawns, or `null`
7
+ * when it cannot be located.
12
8
  *
13
- * `ttsc` is a peer dependency pinned to this package's own version, installed
14
- * alongside `@ttsc/graph` in the user's project rather than nested under this
15
- * launcher, so resolution starts from the user's project, not from this
16
- * package's own tree.
17
- *
18
- * The pin is what keeps the two halves of the graph in step. `literals` and the
19
- * rest of the node facts are resolved by the Go builder and ride the dump, so a
20
- * newer `@ttsc/graph` reading an older `ttscgraph` would find those fields
21
- * simply absent and answer from a graph missing facts it believes are there.
9
+ * The binary ships in `@ttsc/graph-<platform>-<arch>`, which `@ttsc/graph`
10
+ * lists as an exact-version optional dependency, so it is resolved from this
11
+ * package's own installation. The JavaScript client and the native producer
12
+ * therefore always come from one release, wherever the launcher was started.
13
+ * That pairing matters because node facts such as `literals` are resolved by
14
+ * the producer and ride the dump: a client reading an older producer would find
15
+ * those fields absent and answer from a graph missing facts it believes are
16
+ * there.
22
17
  *
23
18
  * Resolution order:
24
19
  *
25
20
  * 1. `TTSC_GRAPH_BINARY` env var, when set to an absolute path.
26
- * 2. The per-platform npm package `@ttsc/<platform>-<arch>/bin/ttscgraph[.exe]`.
27
- * That package carries `ttsc`, `ttscserver`, and `ttscgraph` together and is
28
- * an `optionalDependency` of `ttsc`, so it is resolved from `ttsc`'s
29
- * location — found from `cwd`, the project the caller selected (via `--cwd`
30
- * or an API `cwd` option), defaulting to `process.cwd()` when no project was
31
- * named. A launcher started from an unrelated directory still resolves the
32
- * `ttsc` installed under the target project it was asked to graph.
21
+ * 2. `@ttsc/graph-<platform>-<arch>/bin/ttscgraph[.exe]`, resolved from the
22
+ * installed `@ttsc/graph` package.
23
+ *
24
+ * `cwd` is still accepted so existing callers keep compiling. It no longer
25
+ * affects resolution: the binary used to come from the target project's `ttsc`
26
+ * platform package, and now belongs to `@ttsc/graph` itself.
33
27
  *
34
- * @evidence contracts/common.md#principled-implementation Project-anchored module resolution locates the peer ttsc and then its platform binary; an explicit absolute override has precedence.
35
- * @evidence contracts/common.md#clear-and-simple-design One resolver owns override and peer-package lookup for all graph launchers.
36
- * @evidence contracts/common.md#prohibited-implementation-shortcuts Resolution uses installed package contracts rather than guessing binary paths from repository layouts.
37
- * @evidence contracts/common.md#meaningful-documentation Native paragraphs and the ordered list explain peer placement, override precedence and target-project anchoring.
38
- * @evidence contracts/portability.md#os-neutral-implementation Native path checks and module resolution select the platform/architecture package; only Windows's required executable suffix differs explicitly.
28
+ * @evidence contracts/common.md#principled-implementation The installed-package resolver locates the exact-version platform dependency from this module's own location; an explicit absolute override has precedence.
29
+ * @evidence contracts/common.md#clear-and-simple-design The public function delegates to the one resolver every launcher, loader and session uses, anchored at this package's installation.
30
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Resolution uses the installed package contract rather than repository layouts or the target project's packages.
31
+ * @evidence contracts/common.md#meaningful-documentation Native paragraphs and the ordered list explain package ownership, override precedence and the retained but ignored cwd argument.
32
+ * @evidence contracts/portability.md#os-neutral-implementation The delegated resolver selects the platform/architecture package through Node module resolution; only Windows's executable suffix differs.
39
33
  * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources returns a path string and opens no handle.
40
- * @evidenceExclude contracts/performance.md#efficient-algorithms performs a constant number of module resolutions (ttsc, then its platform package).
34
+ * @evidenceExclude contracts/performance.md#efficient-algorithms performs at most one module resolution.
41
35
  * @evidenceExclude contracts/performance.md#reuse-equivalent-work resolves on every call and caches nothing, so a reinstall between calls is honored.
42
36
  */
43
- function resolveGraphBinary(env = process.env, cwd = process.cwd()) {
44
- if (env.TTSC_GRAPH_BINARY && node_path_1.default.isAbsolute(env.TTSC_GRAPH_BINARY)) {
45
- return env.TTSC_GRAPH_BINARY;
46
- }
47
- const exe = process.platform === "win32" ? "ttscgraph.exe" : "ttscgraph";
48
- try {
49
- // Anchor package lookup at the absolute project root so a relative `--cwd`
50
- // resolves the same way the native process interprets it.
51
- const fromProject = (0, node_module_1.createRequire)(node_path_1.default.join(node_path_1.default.resolve(cwd), "package.json"));
52
- const ttscPackageJson = fromProject.resolve("ttsc/package.json");
53
- const fromTtsc = (0, node_module_1.createRequire)(ttscPackageJson);
54
- return fromTtsc.resolve(`@ttsc/${process.platform}-${process.arch}/bin/${exe}`);
55
- }
56
- catch {
57
- return null;
58
- }
37
+ function resolveGraphBinary(env = process.env, cwd) {
38
+ void cwd;
39
+ return InstalledGraphBinary_1.InstalledGraphBinary.resolve(env, __filename);
59
40
  }
60
41
  //# sourceMappingURL=resolveGraphBinary.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"resolveGraphBinary.js","sourceRoot":"","sources":["../src/resolveGraphBinary.ts"],"names":[],"mappings":";;;;;;AAAA,6CAA4C;AAC5C,0DAA6B;AAE7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,4BACE,GAAG,GAAsB,OAAO,CAAC,GAAG,EACpC,GAAG,GAAW,OAAO,CAAC,GAAG,EAAE;IAE3B,IAAI,GAAG,CAAC,iBAAiB,IAAI,mBAAI,CAAC,UAAU,CAAC,GAAG,CAAC,iBAAiB,CAAC,EAAE,CAAC;QACpE,OAAO,GAAG,CAAC,iBAAiB,CAAC;IAC/B,CAAC;IACD,MAAM,GAAG,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,WAAW,CAAC;IACzE,IAAI,CAAC;QACH,2EAA2E;QAC3E,0DAA0D;QAC1D,MAAM,WAAW,GAAG,IAAA,2BAAa,EAC/B,mBAAI,CAAC,IAAI,CAAC,mBAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,cAAc,CAAC,CAC7C,CAAC;QACF,MAAM,eAAe,GAAG,WAAW,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;QACjE,MAAM,QAAQ,GAAG,IAAA,2BAAa,EAAC,eAAe,CAAC,CAAC;QAChD,OAAO,QAAQ,CAAC,OAAO,CACrB,SAAS,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,IAAI,QAAQ,GAAG,EAAE,CACvD,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"resolveGraphBinary.js","sourceRoot":"","sources":["../src/resolveGraphBinary.ts"],"names":[],"mappings":";;;AAAA,0EAAuE;AAEvE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,4BACE,GAAG,GAAsB,OAAO,CAAC,GAAG,EACpC,GAAY;IAEZ,KAAK,GAAG,CAAC;IACT,OAAO,2CAAoB,CAAC,OAAO,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;AACvD,CAAC"}
package/lib/runGraph.d.ts CHANGED
@@ -13,7 +13,7 @@
13
13
  * @evidence contracts/common.md#clear-and-simple-design The launcher owns lane dispatch while viewer, server and native dump helpers own their respective execution boundaries.
14
14
  * @evidence contracts/common.md#prohibited-implementation-shortcuts A missing dump binary exposes only an explicitly qualified help summary; execution failures retain nonzero outcomes instead of fake graph answers.
15
15
  * @evidence contracts/common.md#meaningful-documentation Native lane bullets explain observable CLI behavior and resident refresh ownership with a blank line before tags.
16
- * @evidence contracts/portability.md#os-neutral-implementation Native lanes resolve the selected project's platform package and pass argv directly; stdio MCP uses Node transport APIs without shell path construction.
16
+ * @evidence contracts/portability.md#os-neutral-implementation Native lanes resolve this package's installed platform binary and pass argv directly; stdio MCP uses Node transport APIs without shell path construction.
17
17
  * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources starts the stdio server (owned by startServer), runs a synchronous dump child to completion or hands over to runView, and keeps no handle itself.
18
18
  * @evidenceExclude contracts/performance.md#efficient-algorithms dispatches on the first argv token to one lane and the lanes own the work.
19
19
  * @evidenceExclude contracts/performance.md#reuse-equivalent-work runs one launcher lane per process invocation, so there is nothing to share.
package/lib/runGraph.js CHANGED
@@ -26,7 +26,7 @@ const VERSION = require("../package.json")
26
26
  * @evidence contracts/common.md#clear-and-simple-design The launcher owns lane dispatch while viewer, server and native dump helpers own their respective execution boundaries.
27
27
  * @evidence contracts/common.md#prohibited-implementation-shortcuts A missing dump binary exposes only an explicitly qualified help summary; execution failures retain nonzero outcomes instead of fake graph answers.
28
28
  * @evidence contracts/common.md#meaningful-documentation Native lane bullets explain observable CLI behavior and resident refresh ownership with a blank line before tags.
29
- * @evidence contracts/portability.md#os-neutral-implementation Native lanes resolve the selected project's platform package and pass argv directly; stdio MCP uses Node transport APIs without shell path construction.
29
+ * @evidence contracts/portability.md#os-neutral-implementation Native lanes resolve this package's installed platform binary and pass argv directly; stdio MCP uses Node transport APIs without shell path construction.
30
30
  * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources starts the stdio server (owned by startServer), runs a synchronous dump child to completion or hands over to runView, and keeps no handle itself.
31
31
  * @evidenceExclude contracts/performance.md#efficient-algorithms dispatches on the first argv token to one lane and the lanes own the work.
32
32
  * @evidenceExclude contracts/performance.md#reuse-equivalent-work runs one launcher lane per process invocation, so there is nothing to share.
@@ -47,10 +47,10 @@ function runGraph(argv = process.argv.slice(2)) {
47
47
  * on this process's stdout. Returns the child's exit code.
48
48
  */
49
49
  function runDump(argv) {
50
- // Resolve the native binary from the target project the caller named with
51
- // `--cwd`, not from wherever the launcher process happened to start.
50
+ // The producer belongs to this package's installation; `--cwd` only selects
51
+ // the project the native process graphs.
52
52
  const { cwd, tsconfig, artifactsSpecified } = TtscGraphLauncherArguments_1.TtscGraphLauncherArguments.dump(argv);
53
- const binary = (0, resolveGraphBinary_1.resolveGraphBinary)(process.env, cwd);
53
+ const binary = (0, resolveGraphBinary_1.resolveGraphBinary)(process.env);
54
54
  if (binary === null) {
55
55
  // `ttscgraph` owns the flag contract, so a resolvable binary always answers
56
56
  // `--help` itself and stays the single source of truth. It cannot answer
@@ -1 +1 @@
1
- {"version":3,"file":"runGraph.js","sourceRoot":"","sources":["../src/runGraph.ts"],"names":[],"mappings":";;;AAAA,6EAA0E;AAC1E,oEAAiE;AACjE,mEAA8D;AAC9D,yDAAsD;AACtD,6DAA0D;AAC1D,sDAAmD;AACnD,iCAAiC;AAEjC,4EAA4E;AAC5E,MAAM,OAAO,GAAY,OAAO,CAAC,iBAAiB,CAAyB;KACxE,OAAO,CAAC;AAEX;;;;;;;;;;;;;;;;;;;GAmBG;AACH,kBACE,IAAI,GAAsB,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAE/C,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,MAAM;QAAE,OAAO,IAAA,cAAO,EAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACtD,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,MAAM;QAAE,OAAO,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAEtD,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,uDAA0B,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACnE,KAAK,IAAA,yBAAW,EAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC,KAAK,CACzD,CAAC,KAAc,EAAE,EAAE;QACjB,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,gBAAgB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAC3E,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CACF,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,SAAS,OAAO,CAAC,IAAuB;IACtC,0EAA0E;IAC1E,qEAAqE;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AS;QACrC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IAC9C,OAAO,UAAU,CAAC,IAAI,CAAC;AACzB,CAAC"}
package/lib/view.js CHANGED
@@ -10,6 +10,7 @@ const node_path_1 = __importDefault(require("node:path"));
10
10
  const TtscGraphLauncherArguments_1 = require("./TtscGraphLauncherArguments");
11
11
  const TtscGraphViewSnapshot_1 = require("./TtscGraphViewSnapshot");
12
12
  const GraphProcessTrace_1 = require("./internal/GraphProcessTrace");
13
+ const InstalledGraphBinary_1 = require("./internal/InstalledGraphBinary");
13
14
  const publishedArtifacts_1 = require("./model/publishedArtifacts");
14
15
  const nativeExecutable_1 = require("./nativeExecutable");
15
16
  const reduce_1 = require("./reduce");
@@ -31,13 +32,11 @@ const resolveGraphBinary_1 = require("./resolveGraphBinary");
31
32
  */
32
33
  function runView(argv) {
33
34
  const opts = TtscGraphLauncherArguments_1.TtscGraphLauncherArguments.view(argv);
34
- // Anchor binary resolution at the project selected by `--cwd`, so `view` from
35
- // an unrelated directory still finds the `ttsc` installed under the target.
36
- const binary = (0, resolveGraphBinary_1.resolveGraphBinary)(process.env, opts.cwd);
35
+ // The producer belongs to this package's installation; `--cwd` only selects
36
+ // the project the native process graphs.
37
+ const binary = (0, resolveGraphBinary_1.resolveGraphBinary)(process.env);
37
38
  if (binary === null) {
38
- process.stderr.write("@ttsc/graph: could not resolve the ttscgraph binary. " +
39
- "Install `ttsc` so its platform package is present, " +
40
- "or set TTSC_GRAPH_BINARY to an absolute path.\n");
39
+ process.stderr.write(`${InstalledGraphBinary_1.InstalledGraphBinary.missingMessage()}\n`);
41
40
  return 1;
42
41
  }
43
42
  (0, nativeExecutable_1.ensureExecutable)(binary);
package/lib/view.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"view.js","sourceRoot":"","sources":["../src/view.ts"],"names":[],"mappings":";;;;;;AAAA,sDAAyB;AACzB,0DAA6B;AAE7B,0DAA6B;AAE7B,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+1,6 @@
1
1
  {
2
2
  "name": "@ttsc/graph",
3
- "version": "0.31.5",
3
+ "version": "0.32.1",
4
4
  "description": "Checker-resolved architecture graph over MCP for coding agents, backed by ttsc's in-process TypeScript-Go compiler.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -20,7 +20,16 @@
20
20
  "typia": "^15.1.0"
21
21
  },
22
22
  "peerDependencies": {
23
- "ttsc": "^0.31.5"
23
+ "ttsc": "^0.32.1"
24
+ },
25
+ "optionalDependencies": {
26
+ "@ttsc/graph-linux-x64": "0.32.1",
27
+ "@ttsc/graph-darwin-x64": "0.32.1",
28
+ "@ttsc/graph-win32-x64": "0.32.1",
29
+ "@ttsc/graph-darwin-arm64": "0.32.1",
30
+ "@ttsc/graph-linux-arm64": "0.32.1",
31
+ "@ttsc/graph-win32-arm64": "0.32.1",
32
+ "@ttsc/graph-linux-arm": "0.32.1"
24
33
  },
25
34
  "keywords": [
26
35
  "ttsc",
@@ -35,7 +44,7 @@
35
44
  "src"
36
45
  ],
37
46
  "devDependencies": {
38
- "@wrtnlabs/evidence": "^0.3.1",
47
+ "@wrtnlabs/evidence": "^0.5.1",
39
48
  "@types/node": "^25.3.0",
40
49
  "@types/three": "^0.184.1",
41
50
  "esbuild": "^0.25.12",
@@ -43,7 +52,7 @@
43
52
  "three": "^0.184.0",
44
53
  "three-forcegraph": "^1.43.4",
45
54
  "typescript": "^7.0.2",
46
- "ttsc": "0.31.5"
55
+ "ttsc": "0.32.1"
47
56
  },
48
57
  "repository": {
49
58
  "type": "git",
@@ -1,4 +1,5 @@
1
1
  import type { IProjectOptions } from "./IProjectOptions";
2
+ import { InstalledGraphBinary } from "./internal/InstalledGraphBinary";
2
3
  import {
3
4
  PROJECT_OPTIONS,
4
5
  nonNegativeIntegerOption,
@@ -162,13 +163,7 @@ export namespace TtscGraphLauncherArguments {
162
163
  } {
163
164
  if (argv.some((argument) => DUMP_HELP_FLAGS.has(argument)))
164
165
  return { code: 0, stdout: DUMP_HELP_SUMMARY };
165
- return {
166
- code: 1,
167
- stderr:
168
- "@ttsc/graph: could not resolve the ttscgraph binary. " +
169
- "Install `ttsc` so its platform package is present, " +
170
- "or set TTSC_GRAPH_BINARY to an absolute path.\n",
171
- };
166
+ return { code: 1, stderr: `${InstalledGraphBinary.missingMessage()}\n` };
172
167
  }
173
168
  }
174
169
 
@@ -202,6 +197,7 @@ const DUMP_HELP_SUMMARY = [
202
197
  " --pretty Indent the JSON output.",
203
198
  "",
204
199
  "The native `ttscgraph` binary owns these flags and is not installed here,",
205
- "so this summary may lag it. Install `ttsc` and rerun for the exact list.",
200
+ "so this summary may lag it. Install @ttsc/graph with its optional",
201
+ "dependencies and rerun for the exact list.",
206
202
  "",
207
203
  ].join("\n");
@@ -0,0 +1,102 @@
1
+ import { createRequire } from "node:module";
2
+ import path from "node:path";
3
+
4
+ /**
5
+ * The native `ttscgraph` producer installed with this `@ttsc/graph` release.
6
+ *
7
+ * `@ttsc/graph` lists one `@ttsc/graph-<platform>-<arch>` package per supported
8
+ * target as an exact-version optional dependency. The producer is therefore
9
+ * resolved from `@ttsc/graph`'s own installation, not from the project being
10
+ * graphed: the JavaScript client and its native producer always come from one
11
+ * release, and the directory a launcher starts in does not affect which binary
12
+ * runs.
13
+ *
14
+ * @evidence contracts/common.md#principled-implementation Node module resolution from a file inside the installed package finds the optional platform dependency wherever the package manager placed it; an explicit absolute override keeps precedence.
15
+ * @evidence contracts/common.md#clear-and-simple-design One owner holds the resolution order and the two remedies every launcher, loader and session reports, so their wording cannot drift.
16
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Resolution uses the installed package contract rather than repository layouts, the target project's packages or guessed paths.
17
+ * @evidence contracts/common.md#meaningful-documentation Native paragraphs explain why the producer belongs to this package and what the anchor means.
18
+ * @evidence contracts/portability.md#os-neutral-implementation The platform and architecture name the package and Windows alone adds the executable suffix; Node module resolution handles symlinked and hoisted layouts on every host.
19
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Resolution returns a path string and opens no handle.
20
+ * @evidenceExclude contracts/performance.md#efficient-algorithms Each member performs at most one module resolution or builds one string.
21
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work Resolution runs once per launch and caches nothing, so a reinstall between launches is honored.
22
+ */
23
+ export namespace InstalledGraphBinary {
24
+ /**
25
+ * Resolve the producer, or `null` when nothing supplies one.
26
+ *
27
+ * 1. `TTSC_GRAPH_BINARY` when it is an absolute path. It is returned without a
28
+ * filesystem probe, so the spawn owns its executable error; a relative
29
+ * value is ignored.
30
+ * 2. `@ttsc/graph-<platform>-<arch>/bin/ttscgraph[.exe]`, resolved by Node
31
+ * module resolution from `anchor`, a file inside the installed
32
+ * `@ttsc/graph` package.
33
+ *
34
+ * @evidence contracts/common.md#principled-implementation An absolute override is honored before module resolution walks up from the anchor to the package manager's placement of the platform dependency.
35
+ * @evidence contracts/common.md#clear-and-simple-design The function owns precedence and lookup; callers own the failure presentation through the shared remedies.
36
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts A missing package resolves to null instead of a guessed path, and the override is not probed on the caller's behalf.
37
+ * @evidence contracts/common.md#meaningful-documentation The numbered list states the precedence, the anchor's meaning and the unprobed override.
38
+ * @evidence contracts/portability.md#os-neutral-implementation path.isAbsolute applies the host's absolute-path rule, and the package and executable names come from process.platform and process.arch.
39
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Returns a path string and opens no handle.
40
+ * @evidenceExclude contracts/performance.md#efficient-algorithms Performs at most one module resolution.
41
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work Resolves on every call so a reinstall is honored.
42
+ */
43
+ export function resolve(
44
+ env: NodeJS.ProcessEnv,
45
+ anchor: string,
46
+ ): string | null {
47
+ const override = env.TTSC_GRAPH_BINARY;
48
+ if (override && path.isAbsolute(override)) return override;
49
+ try {
50
+ return createRequire(anchor).resolve(
51
+ `${packageName()}/bin/${process.platform === "win32" ? "ttscgraph.exe" : "ttscgraph"}`,
52
+ );
53
+ } catch {
54
+ return null;
55
+ }
56
+ }
57
+
58
+ /**
59
+ * The platform package this process's target selects.
60
+ *
61
+ * @evidence contracts/common.md#principled-implementation The npm platform and architecture strings are the package name's only variable parts.
62
+ * @evidence contracts/common.md#clear-and-simple-design Resolution and the missing-package diagnostic share this one name.
63
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts No platform table or alias substitutes for the actual target names.
64
+ * @evidence contracts/common.md#meaningful-documentation The native headline states what the name selects.
65
+ * @evidence contracts/portability.md#os-neutral-implementation process.platform and process.arch already carry npm's os and cpu spellings, which the platform manifests declare.
66
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Builds a string and holds nothing.
67
+ * @evidenceExclude contracts/performance.md#efficient-algorithms Concatenates two process properties.
68
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work A constant-time string needs no sharing.
69
+ */
70
+ export function packageName(): string {
71
+ return `@ttsc/graph-${process.platform}-${process.arch}`;
72
+ }
73
+
74
+ /**
75
+ * The diagnostic a launcher, loader or session reports when resolution fails.
76
+ *
77
+ * @evidence contracts/common.md#principled-implementation The remedy names the actual package that resolution looked for and the override that bypasses it.
78
+ * @evidence contracts/common.md#clear-and-simple-design Every failing entry point reports this one text.
79
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The text describes the real installation contract rather than a repository path.
80
+ * @evidence contracts/common.md#meaningful-documentation The native headline states when the diagnostic applies.
81
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation Builds a message; the package name carries the only platform-dependent part.
82
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Builds a string and holds nothing.
83
+ * @evidenceExclude contracts/performance.md#efficient-algorithms Concatenates constant text with the package name.
84
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work Called once per failed resolution.
85
+ */
86
+ export function missingMessage(): string {
87
+ return (
88
+ "@ttsc/graph: could not resolve the ttscgraph binary. " +
89
+ `Install @ttsc/graph with its optional dependencies so ${packageName()} is present, ` +
90
+ "or set TTSC_GRAPH_BINARY to an absolute path."
91
+ );
92
+ }
93
+
94
+ /**
95
+ * The remedy appended to a serve-protocol or dump-schema mismatch. The
96
+ * installed platform package always matches its `@ttsc/graph` release, so a
97
+ * mismatch means a stale installation or an override naming another build.
98
+ */
99
+ export const MISMATCH_REMEDY =
100
+ "Reinstall @ttsc/graph so its platform package matches this client, " +
101
+ "or point TTSC_GRAPH_BINARY at a matching ttscgraph.";
102
+ }
@@ -351,22 +351,24 @@ function synthesize(
351
351
  // small — the two copies are 17% of the document, 55 MB of VS Code's 323 MB,
352
352
  // paid again in the encode, the pipe, the parse and the validation. Nothing
353
353
  // downstream of this line sees a span without its file.
354
- const nodes: SynthesizedNode[] = dump.nodes.flatMap((n): SynthesizedNode[] => {
355
- if (n.kind === "module") return [];
356
- const { evidence, implementation, ...rest } = n;
357
- return [
358
- {
359
- ...rest,
360
- kind: n.kind,
361
- ...(evidence !== undefined
362
- ? { evidence: spanIn(evidence, n.file) }
363
- : {}),
364
- ...(implementation !== undefined
365
- ? { implementation: spanIn(implementation, n.file) }
366
- : {}),
367
- },
368
- ];
369
- });
354
+ const nodes: SynthesizedNode[] = dump.nodes.flatMap(
355
+ (n): SynthesizedNode[] => {
356
+ if (n.kind === "module") return [];
357
+ const { evidence, implementation, ...rest } = n;
358
+ return [
359
+ {
360
+ ...rest,
361
+ kind: n.kind,
362
+ ...(evidence !== undefined
363
+ ? { evidence: spanIn(evidence, n.file) }
364
+ : {}),
365
+ ...(implementation !== undefined
366
+ ? { implementation: spanIn(implementation, n.file) }
367
+ : {}),
368
+ },
369
+ ];
370
+ },
371
+ );
370
372
  const edges: TtscGraphReadonly<ITtscGraphEdge>[] = dump.edges.map((edge) => {
371
373
  const { evidence, ...rest } = edge;
372
374
  const from = moduleIds.get(edge.from);
@@ -1,5 +1,6 @@
1
1
  import typia from "typia";
2
2
 
3
+ import { InstalledGraphBinary } from "../internal/InstalledGraphBinary";
3
4
  import { ITtscGraphSnapshot } from "../structures/ITtscGraphSnapshot";
4
5
 
5
6
  /**
@@ -63,8 +64,7 @@ export namespace TtscGraphProtocol {
63
64
  `@ttsc/graph: ttscgraph speaks serve protocol ${
64
65
  version === undefined ? "an unknown version" : `v${String(version)}`
65
66
  }, this client speaks v${String(PROTOCOL_VERSION)}. ` +
66
- "Install a matching `ttsc` (the binary resolves from the target " +
67
- "project, or from TTSC_GRAPH_BINARY).",
67
+ InstalledGraphBinary.MISMATCH_REMEDY,
68
68
  );
69
69
  }
70
70
 
@@ -1,5 +1,6 @@
1
1
  import { CapabilityPluginResolver } from "ttsc";
2
2
 
3
+ import { InstalledGraphBinary } from "../internal/InstalledGraphBinary";
3
4
  import { ensureExecutable } from "../nativeExecutable";
4
5
  import { resolveGraphBinary } from "../resolveGraphBinary";
5
6
  import type { IPublishedArtifactsResident } from "./IPublishedArtifactsResident";
@@ -70,18 +71,10 @@ export class TtscGraphSession {
70
71
  private readonly retiredDaemons = new Set<Promise<void>>();
71
72
 
72
73
  public constructor(options: TtscGraphSessionOptions) {
73
- // Resolve the platform binary from the project this session serves, so the
74
- // MCP server started from an unrelated directory still finds the target's
75
- // installed `ttsc`.
76
- const binary =
77
- options.binary ?? resolveGraphBinary(process.env, options.cwd);
78
- if (binary === null) {
79
- throw new Error(
80
- "@ttsc/graph: could not resolve the ttscgraph binary. " +
81
- "Install `ttsc` so its platform package is present, " +
82
- "or set TTSC_GRAPH_BINARY to an absolute path.",
83
- );
84
- }
74
+ // The producer belongs to this package's installation, so an MCP server
75
+ // started from any directory spawns the binary of its own release.
76
+ const binary = options.binary ?? resolveGraphBinary(process.env);
77
+ if (binary === null) throw new Error(InstalledGraphBinary.missingMessage());
85
78
  ensureExecutable(binary);
86
79
  this.cwd = options.cwd;
87
80
  this.tsconfig = options.tsconfig;
@@ -17,6 +17,9 @@ export interface TtscGraphSessionOptions {
17
17
  /** Project tsconfig passed to `ttscgraph serve`. */
18
18
  tsconfig: string;
19
19
 
20
- /** Absolute native binary path, resolved from `cwd` when omitted. */
20
+ /**
21
+ * Absolute native binary path; omitted, the installed
22
+ * `@ttsc/graph-<platform>-<arch>` binary runs.
23
+ */
21
24
  binary?: string;
22
25
  }
@@ -1,3 +1,4 @@
1
+ import { InstalledGraphBinary } from "../internal/InstalledGraphBinary";
1
2
  import { ITtscGraphSnapshot } from "../structures/ITtscGraphSnapshot";
2
3
  import { TtscGraphLinePeer } from "./TtscGraphLinePeer";
3
4
  import { TtscGraphMemory } from "./TtscGraphMemory";
@@ -385,8 +386,7 @@ export class TtscGraphSessionState {
385
386
  response.dump?.provenance.schemaVersion ??
386
387
  response.snapshot?.schemaVersion,
387
388
  )}, this client reads v${String(DUMP_SCHEMA_VERSION)}. ` +
388
- "Install a matching `ttsc` (the binary resolves from the target " +
389
- "project, or from TTSC_GRAPH_BINARY).",
389
+ InstalledGraphBinary.MISMATCH_REMEDY,
390
390
  ),
391
391
  );
392
392
  return;