ttsc 0.31.1 → 0.31.2

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 (135) hide show
  1. package/lib/compiler/internal/build/BuildExecution.d.ts +4 -2
  2. package/lib/compiler/internal/build/BuildExecution.js +40 -12
  3. package/lib/compiler/internal/build/BuildExecution.js.map +1 -1
  4. package/lib/compiler/internal/startResidentTransform.js +5 -4
  5. package/lib/compiler/internal/startResidentTransform.js.map +1 -1
  6. package/lib/compiler/internal/transformProjectInMemory.js +9 -7
  7. package/lib/compiler/internal/transformProjectInMemory.js.map +1 -1
  8. package/lib/internal/javascriptRuntimeCapabilities.d.ts +13 -4
  9. package/lib/internal/javascriptRuntimeCapabilities.js +56 -6
  10. package/lib/internal/javascriptRuntimeCapabilities.js.map +1 -1
  11. package/lib/internal/pluginSource.d.ts +1 -0
  12. package/lib/internal/pluginSource.js +1 -0
  13. package/lib/internal/pluginSource.js.map +1 -1
  14. package/lib/internal/resolveNodeBinary.d.ts +6 -1
  15. package/lib/internal/resolveNodeBinary.js +6 -2
  16. package/lib/internal/resolveNodeBinary.js.map +1 -1
  17. package/lib/internal/runtimeExecutableIdentity.d.ts +22 -13
  18. package/lib/internal/runtimeExecutableIdentity.js +192 -102
  19. package/lib/internal/runtimeExecutableIdentity.js.map +1 -1
  20. package/lib/launcher/internal/runtime/installRuntimeHooks.js +58 -4
  21. package/lib/launcher/internal/runtime/installRuntimeHooks.js.map +1 -1
  22. package/lib/launcher/internal/ttscserver/captureLSPPluginSelectionInputs.d.ts +5 -1
  23. package/lib/launcher/internal/ttscserver/captureLSPPluginSelectionInputs.js +7 -2
  24. package/lib/launcher/internal/ttscserver/captureLSPPluginSelectionInputs.js.map +1 -1
  25. package/lib/launcher/internal/ttscserver/runTtscserver.js +8 -1
  26. package/lib/launcher/internal/ttscserver/runTtscserver.js.map +1 -1
  27. package/lib/plugin/internal/CapabilityResolutionFormat.d.ts +21 -62
  28. package/lib/plugin/internal/CapabilityResolutionFormat.js +15 -106
  29. package/lib/plugin/internal/CapabilityResolutionFormat.js.map +1 -1
  30. package/lib/plugin/internal/load/PluginDescriptorEvaluationCache.d.ts +6 -0
  31. package/lib/plugin/internal/load/PluginDescriptorEvaluationCache.js +4 -4
  32. package/lib/plugin/internal/load/PluginDescriptorEvaluationCache.js.map +1 -1
  33. package/lib/plugin/internal/load/loadProjectPlugins.d.ts +12 -1
  34. package/lib/plugin/internal/load/loadProjectPlugins.js +80 -20
  35. package/lib/plugin/internal/load/loadProjectPlugins.js.map +1 -1
  36. package/lib/plugin/internal/readCapabilityResolution.d.ts +6 -0
  37. package/lib/plugin/internal/readCapabilityResolution.js +8 -5
  38. package/lib/plugin/internal/readCapabilityResolution.js.map +1 -1
  39. package/lib/plugin/internal/source/GoEnvironmentReading.d.ts +9 -3
  40. package/lib/plugin/internal/source/GoEnvironmentReading.js +53 -7
  41. package/lib/plugin/internal/source/GoEnvironmentReading.js.map +1 -1
  42. package/lib/plugin/internal/source/NativeSourcePackages.d.ts +44 -6
  43. package/lib/plugin/internal/source/NativeSourcePackages.js +150 -8
  44. package/lib/plugin/internal/source/NativeSourcePackages.js.map +1 -1
  45. package/lib/plugin/internal/source/PluginBuildEnvironmentReadings.d.ts +21 -3
  46. package/lib/plugin/internal/source/PluginBuildEnvironmentReadings.js +32 -7
  47. package/lib/plugin/internal/source/PluginBuildEnvironmentReadings.js.map +1 -1
  48. package/lib/plugin/internal/source/PluginContentIdentities.d.ts +265 -0
  49. package/lib/plugin/internal/source/PluginContentIdentities.js +452 -0
  50. package/lib/plugin/internal/source/PluginContentIdentities.js.map +1 -0
  51. package/lib/plugin/internal/source/PluginLoadAnswers.d.ts +63 -0
  52. package/lib/plugin/internal/source/PluginLoadAnswers.js +128 -0
  53. package/lib/plugin/internal/source/PluginLoadAnswers.js.map +1 -0
  54. package/lib/plugin/internal/source/SourceBuildCacheLayout.d.ts +10 -0
  55. package/lib/plugin/internal/source/SourceBuildCacheLayout.js +12 -0
  56. package/lib/plugin/internal/source/SourceBuildCacheLayout.js.map +1 -1
  57. package/lib/plugin/internal/source/SourcePluginWorkspace.d.ts +5 -2
  58. package/lib/plugin/internal/source/SourcePluginWorkspace.js +5 -3
  59. package/lib/plugin/internal/source/SourcePluginWorkspace.js.map +1 -1
  60. package/lib/plugin/internal/source/buildSourcePlugin.d.ts +15 -2
  61. package/lib/plugin/internal/source/buildSourcePlugin.js +27 -4
  62. package/lib/plugin/internal/source/buildSourcePlugin.js.map +1 -1
  63. package/lib/plugin/internal/source/computeCacheKey.d.ts +21 -5
  64. package/lib/plugin/internal/source/computeCacheKey.js +71 -29
  65. package/lib/plugin/internal/source/computeCacheKey.js.map +1 -1
  66. package/lib/plugin/internal/source/hashPluginBuildEnvironment.d.ts +7 -3
  67. package/lib/plugin/internal/source/hashPluginBuildEnvironment.js +74 -35
  68. package/lib/plugin/internal/source/hashPluginBuildEnvironment.js.map +1 -1
  69. package/lib/plugin/internal/source/pluginBuildEnvironment.d.ts +8 -3
  70. package/lib/plugin/internal/source/pluginBuildEnvironment.js +8 -4
  71. package/lib/plugin/internal/source/pluginBuildEnvironment.js.map +1 -1
  72. package/lib/plugin/internal/source/pluginBuildEnvironmentWorker.js +12 -2
  73. package/lib/plugin/internal/source/pluginBuildEnvironmentWorker.js.map +1 -1
  74. package/lib/plugin/internal/source/pluginBuildVersions.d.ts +2 -2
  75. package/lib/plugin/internal/source/pluginBuildVersions.js +4 -17
  76. package/lib/plugin/internal/source/pluginBuildVersions.js.map +1 -1
  77. package/lib/plugin/internal/source/pluginSourceState.d.ts +6 -2
  78. package/lib/plugin/internal/source/pluginSourceState.js +20 -8
  79. package/lib/plugin/internal/source/pluginSourceState.js.map +1 -1
  80. package/lib/plugin/internal/source/pluginSourceStateHolds.d.ts +7 -2
  81. package/lib/plugin/internal/source/pluginSourceStateHolds.js +12 -7
  82. package/lib/plugin/internal/source/pluginSourceStateHolds.js.map +1 -1
  83. package/lib/plugin/internal/source/processPluginBuildEnvironment.d.ts +7 -2
  84. package/lib/plugin/internal/source/processPluginBuildEnvironment.js +8 -3
  85. package/lib/plugin/internal/source/processPluginBuildEnvironment.js.map +1 -1
  86. package/lib/plugin/internal/source/provenPluginSourceDigest.d.ts +28 -0
  87. package/lib/plugin/internal/source/provenPluginSourceDigest.js +41 -0
  88. package/lib/plugin/internal/source/provenPluginSourceDigest.js.map +1 -0
  89. package/lib/plugin/internal/source/pruneCacheFileRoot.d.ts +3 -2
  90. package/lib/plugin/internal/source/pruneCacheFileRoot.js +3 -2
  91. package/lib/plugin/internal/source/pruneCacheFileRoot.js.map +1 -1
  92. package/lib/plugin/internal/source/ttscPackageVersion.d.ts +26 -0
  93. package/lib/plugin/internal/source/ttscPackageVersion.js +47 -0
  94. package/lib/plugin/internal/source/ttscPackageVersion.js.map +1 -0
  95. package/lib/plugin/internal/writeCapabilityResolution.d.ts +6 -0
  96. package/lib/plugin/internal/writeCapabilityResolution.js +11 -7
  97. package/lib/plugin/internal/writeCapabilityResolution.js.map +1 -1
  98. package/lib/plugin/resolveCapabilityPlugins.js +67 -15
  99. package/lib/plugin/resolveCapabilityPlugins.js.map +1 -1
  100. package/package.json +8 -8
  101. package/src/compiler/internal/build/BuildExecution.ts +46 -13
  102. package/src/compiler/internal/startResidentTransform.ts +12 -3
  103. package/src/compiler/internal/transformProjectInMemory.ts +10 -2
  104. package/src/internal/javascriptRuntimeCapabilities.ts +71 -5
  105. package/src/internal/pluginSource.ts +1 -0
  106. package/src/internal/resolveNodeBinary.ts +12 -1
  107. package/src/internal/runtimeExecutableIdentity.ts +227 -141
  108. package/src/launcher/internal/runtime/installRuntimeHooks.ts +68 -3
  109. package/src/launcher/internal/ttscserver/captureLSPPluginSelectionInputs.ts +11 -2
  110. package/src/launcher/internal/ttscserver/runTtscserver.ts +18 -1
  111. package/src/plugin/internal/CapabilityResolutionFormat.ts +23 -107
  112. package/src/plugin/internal/load/PluginDescriptorEvaluationCache.ts +14 -4
  113. package/src/plugin/internal/load/loadProjectPlugins.ts +212 -94
  114. package/src/plugin/internal/readCapabilityResolution.ts +17 -6
  115. package/src/plugin/internal/source/GoEnvironmentReading.ts +74 -5
  116. package/src/plugin/internal/source/NativeSourcePackages.ts +262 -5
  117. package/src/plugin/internal/source/PluginBuildEnvironmentReadings.ts +41 -5
  118. package/src/plugin/internal/source/PluginContentIdentities.ts +563 -0
  119. package/src/plugin/internal/source/PluginLoadAnswers.ts +151 -0
  120. package/src/plugin/internal/source/SourceBuildCacheLayout.ts +14 -0
  121. package/src/plugin/internal/source/SourcePluginWorkspace.ts +6 -1
  122. package/src/plugin/internal/source/buildSourcePlugin.ts +43 -3
  123. package/src/plugin/internal/source/computeCacheKey.ts +103 -47
  124. package/src/plugin/internal/source/hashPluginBuildEnvironment.ts +144 -29
  125. package/src/plugin/internal/source/pluginBuildEnvironment.ts +9 -2
  126. package/src/plugin/internal/source/pluginBuildEnvironmentWorker.ts +18 -2
  127. package/src/plugin/internal/source/pluginBuildVersions.ts +5 -26
  128. package/src/plugin/internal/source/pluginSourceState.ts +28 -12
  129. package/src/plugin/internal/source/pluginSourceStateHolds.ts +15 -8
  130. package/src/plugin/internal/source/processPluginBuildEnvironment.ts +8 -2
  131. package/src/plugin/internal/source/provenPluginSourceDigest.ts +45 -0
  132. package/src/plugin/internal/source/pruneCacheFileRoot.ts +3 -2
  133. package/src/plugin/internal/source/ttscPackageVersion.ts +45 -0
  134. package/src/plugin/internal/writeCapabilityResolution.ts +29 -8
  135. package/src/plugin/resolveCapabilityPlugins.ts +87 -13
@@ -79,16 +79,26 @@ export declare namespace PluginBuildEnvironmentReadings {
79
79
  * Read synchronously for clients whose API owns synchronous native work.
80
80
  * Explicit refresh preserves the original fresh-comparison semantics.
81
81
  *
82
+ * WARNING (#1725): the map above ends with the process, and every consumer
83
+ * that proves a plugin-source state starts a new one: a bundler worker, a
84
+ * capability host, the language server. Without the project's record store
85
+ * each of them walked and hashed the whole GOROOT (1.7 s for the bundled
86
+ * toolchain) on its first proof. A caller that names its project lets a miss
87
+ * prove the SDK and executables from the plugin cache's records.
88
+ *
89
+ * @param directory Plugin source directory whose build environment is read.
90
+ * @param refresh Bypass a cached reading.
91
+ * @param projectRoot Project whose plugin cache root holds the records.
82
92
  * @evidence contracts/common.md#principled-implementation The same native reader constructs a digest paired with its pre-read witness; optional cached reuse validates current variables/metadata. A fresh synchronous reading is published without a separate post-read qualification here and relies on the native reader's premises.
83
93
  * @evidence contracts/common.md#clear-and-simple-design The synchronous boundary shares cached authority and delegates fresh observation to its owning reader.
84
94
  * @evidence contracts/common.md#prohibited-implementation-shortcuts A requested refresh actually probes the selected native toolchain.
85
95
  * @evidence contracts/common.md#meaningful-documentation Native prose identifies the synchronous execution owner and explicit refresh meaning.
86
96
  * @evidence contracts/portability.md#os-neutral-implementation Native Go selection and filesystem witnesses remain delegated to the shared reader.
87
97
  * @evidence contracts/performance.md#efficient-algorithms Hits pay complete variable-text indexing and native witness queries. Misses/refresh merge environment values, perform actual toolchain/SDK/content work, then rebuild the full variable-text key for publication; native/path/file/name/value bytes contribute cost beyond invocation count.
88
- * @evidence contracts/performance.md#reuse-equivalent-work Synchronous and asynchronous clients share the same qualified readings.
98
+ * @evidence contracts/performance.md#reuse-equivalent-work Synchronous and asynchronous clients share the same qualified readings; a miss of a caller naming its project takes SDK and executable digests from the record store across processes.
89
99
  * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Retention belongs to the namespace; this call publishes one replacement record.
90
100
  */
91
- function read(directory: string, refresh?: boolean): string;
101
+ function read(directory: string, refresh?: boolean, projectRoot?: string): string;
92
102
  /**
93
103
  * Prepare native authority off the host thread, sharing equivalent concurrent
94
104
  * requests. A changed environment or witness during transfer refuses the
@@ -98,6 +108,14 @@ export declare namespace PluginBuildEnvironmentReadings {
98
108
  * requests can create a worker after retirement. Refresh bypasses a cached
99
109
  * reading but can still share an equivalent in-flight request.
100
110
  *
111
+ * A caller that names its project lets the worker prove the SDK and
112
+ * executables from the plugin cache's records (#1722). The worker is its own
113
+ * isolate, so without them it reads the whole GOROOT once per process, which
114
+ * a bundler or runtime restarting on every edit pays every time.
115
+ *
116
+ * @param directory Plugin source directory whose build environment is read.
117
+ * @param refresh Bypass a cached reading.
118
+ * @param projectRoot Project whose plugin cache root holds the records.
101
119
  * @evidence contracts/common.md#principled-implementation Worker results publish only under their exact current variable identity and still-current native pre-read witness; changed or unwitnessable transfer windows reject instead of publishing authority or retrying indefinitely.
102
120
  * @evidence contracts/common.md#clear-and-simple-design Qualified hits return immediately; equivalent misses share one pending promise and exclusive queued worker request.
103
121
  * @evidence contracts/common.md#prohibited-implementation-shortcuts Go/environment/SDK preparation occurs in the worker rather than blocking the async host or fabricating a digest from compiler output.
@@ -107,5 +125,5 @@ export declare namespace PluginBuildEnvironmentReadings {
107
125
  * @evidence contracts/performance.md#reuse-equivalent-work Pending identity is directory plus complete variables; the warm worker shares native toolchain memos while published authority still requires fresh witness validation.
108
126
  * @evidence contracts/performance.md#bound-retention-and-release-resources Pending identity entries are removed in finally at settlement and per-request worker listeners are removed by the terminal path. Idle worker remains unreferenced with lifetime retirement listeners; worker failure initiates termination without awaiting completion. Distinct queued contexts retain environment/witness/promise data without a population bound or timeout, and a stalled producer blocks later queued work.
109
127
  */
110
- function prepare(directory: string, refresh?: boolean): Promise<string>;
128
+ function prepare(directory: string, refresh?: boolean, projectRoot?: string): Promise<string>;
111
129
  }
@@ -9,6 +9,7 @@ const node_path_1 = __importDefault(require("node:path"));
9
9
  const node_worker_threads_1 = require("node:worker_threads");
10
10
  const SidecarEnvironment_1 = require("../../../compiler/internal/sharedHost/SidecarEnvironment");
11
11
  const PluginBuildEnvironmentWitness_1 = require("./PluginBuildEnvironmentWitness");
12
+ const PluginContentIdentities_1 = require("./PluginContentIdentities");
12
13
  const pluginBuildEnvironment_1 = require("./pluginBuildEnvironment");
13
14
  /**
14
15
  * Share native build-environment observations between synchronous clients and
@@ -101,22 +102,38 @@ var PluginBuildEnvironmentReadings;
101
102
  * Read synchronously for clients whose API owns synchronous native work.
102
103
  * Explicit refresh preserves the original fresh-comparison semantics.
103
104
  *
105
+ * WARNING (#1725): the map above ends with the process, and every consumer
106
+ * that proves a plugin-source state starts a new one: a bundler worker, a
107
+ * capability host, the language server. Without the project's record store
108
+ * each of them walked and hashed the whole GOROOT (1.7 s for the bundled
109
+ * toolchain) on its first proof. A caller that names its project lets a miss
110
+ * prove the SDK and executables from the plugin cache's records.
111
+ *
112
+ * @param directory Plugin source directory whose build environment is read.
113
+ * @param refresh Bypass a cached reading.
114
+ * @param projectRoot Project whose plugin cache root holds the records.
104
115
  * @evidence contracts/common.md#principled-implementation The same native reader constructs a digest paired with its pre-read witness; optional cached reuse validates current variables/metadata. A fresh synchronous reading is published without a separate post-read qualification here and relies on the native reader's premises.
105
116
  * @evidence contracts/common.md#clear-and-simple-design The synchronous boundary shares cached authority and delegates fresh observation to its owning reader.
106
117
  * @evidence contracts/common.md#prohibited-implementation-shortcuts A requested refresh actually probes the selected native toolchain.
107
118
  * @evidence contracts/common.md#meaningful-documentation Native prose identifies the synchronous execution owner and explicit refresh meaning.
108
119
  * @evidence contracts/portability.md#os-neutral-implementation Native Go selection and filesystem witnesses remain delegated to the shared reader.
109
120
  * @evidence contracts/performance.md#efficient-algorithms Hits pay complete variable-text indexing and native witness queries. Misses/refresh merge environment values, perform actual toolchain/SDK/content work, then rebuild the full variable-text key for publication; native/path/file/name/value bytes contribute cost beyond invocation count.
110
- * @evidence contracts/performance.md#reuse-equivalent-work Synchronous and asynchronous clients share the same qualified readings.
121
+ * @evidence contracts/performance.md#reuse-equivalent-work Synchronous and asynchronous clients share the same qualified readings; a miss of a caller naming its project takes SDK and executable digests from the record store across processes.
111
122
  * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Retention belongs to the namespace; this call publishes one replacement record.
112
123
  */
113
- function read(directory, refresh = false) {
124
+ function read(directory, refresh = false, projectRoot) {
114
125
  const known = refresh ? undefined : cached(directory);
115
126
  if (known !== undefined)
116
127
  return known;
117
128
  const env = SidecarEnvironment_1.SidecarEnvironment.merge(process.env);
118
129
  const witness = new Map();
119
- const environment = (0, pluginBuildEnvironment_1.pluginBuildEnvironment)(directory, env, witness);
130
+ const environment = (0, pluginBuildEnvironment_1.pluginBuildEnvironment)(directory, env, witness, projectRoot === undefined
131
+ ? undefined
132
+ : PluginContentIdentities_1.PluginContentIdentities.open({
133
+ projectRoot,
134
+ env,
135
+ sources: [directory],
136
+ }));
120
137
  readings.set(key(directory, env), { environment, witness });
121
138
  return environment;
122
139
  }
@@ -130,6 +147,14 @@ var PluginBuildEnvironmentReadings;
130
147
  * requests can create a worker after retirement. Refresh bypasses a cached
131
148
  * reading but can still share an equivalent in-flight request.
132
149
  *
150
+ * A caller that names its project lets the worker prove the SDK and
151
+ * executables from the plugin cache's records (#1722). The worker is its own
152
+ * isolate, so without them it reads the whole GOROOT once per process, which
153
+ * a bundler or runtime restarting on every edit pays every time.
154
+ *
155
+ * @param directory Plugin source directory whose build environment is read.
156
+ * @param refresh Bypass a cached reading.
157
+ * @param projectRoot Project whose plugin cache root holds the records.
133
158
  * @evidence contracts/common.md#principled-implementation Worker results publish only under their exact current variable identity and still-current native pre-read witness; changed or unwitnessable transfer windows reject instead of publishing authority or retrying indefinitely.
134
159
  * @evidence contracts/common.md#clear-and-simple-design Qualified hits return immediately; equivalent misses share one pending promise and exclusive queued worker request.
135
160
  * @evidence contracts/common.md#prohibited-implementation-shortcuts Go/environment/SDK preparation occurs in the worker rather than blocking the async host or fabricating a digest from compiler output.
@@ -139,7 +164,7 @@ var PluginBuildEnvironmentReadings;
139
164
  * @evidence contracts/performance.md#reuse-equivalent-work Pending identity is directory plus complete variables; the warm worker shares native toolchain memos while published authority still requires fresh witness validation.
140
165
  * @evidence contracts/performance.md#bound-retention-and-release-resources Pending identity entries are removed in finally at settlement and per-request worker listeners are removed by the terminal path. Idle worker remains unreferenced with lifetime retirement listeners; worker failure initiates termination without awaiting completion. Distinct queued contexts retain environment/witness/promise data without a population bound or timeout, and a stalled producer blocks later queued work.
141
166
  */
142
- async function prepare(directory, refresh = false) {
167
+ async function prepare(directory, refresh = false, projectRoot) {
143
168
  const known = refresh ? undefined : cached(directory);
144
169
  if (known !== undefined)
145
170
  return known;
@@ -149,7 +174,7 @@ var PluginBuildEnvironmentReadings;
149
174
  if (existing !== undefined)
150
175
  return existing;
151
176
  const request = (async () => {
152
- const reading = await observe(directory, env);
177
+ const reading = await observe(directory, env, projectRoot);
153
178
  if (identity !== key(directory, process.env) ||
154
179
  !PluginBuildEnvironmentWitness_1.PluginBuildEnvironmentWitness.holds(reading.witness))
155
180
  throw new Error(`ttsc: plugin build environment could not be qualified for ${directory}`);
@@ -173,7 +198,7 @@ var PluginBuildEnvironmentReadings;
173
198
  variables.update(`${name.length}:${name}${value.length}:${value}\0`);
174
199
  return `${directory}\0${variables.digest("hex")}`;
175
200
  }
176
- function observe(directory, env) {
201
+ function observe(directory, env, projectRoot) {
177
202
  const request = queue.then(() => new Promise((resolve, reject) => {
178
203
  const current = acquireWorker();
179
204
  current.ref();
@@ -214,7 +239,7 @@ var PluginBuildEnvironmentReadings;
214
239
  current.on("error", onError);
215
240
  current.on("exit", onExit);
216
241
  try {
217
- current.postMessage({ directory, env });
242
+ current.postMessage({ directory, env, projectRoot });
218
243
  }
219
244
  catch (error) {
220
245
  release(false);
@@ -1 +1 @@
1
- {"version":3,"file":"PluginBuildEnvironmentReadings.js","sourceRoot":"","sources":["../../../../src/plugin/internal/source/PluginBuildEnvironmentReadings.ts"],"names":[],"mappings":";;;;;;AAAA,8DAAiC;AACjC,0DAA6B;AAC7B,6DAAwD;AAExD,iGAA8F;AAC9F,mFAAgF;AAChF,qEAAkE;AAElE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,IAAiB,8BAA8B,CAkP9C;AAlPD,WAAiB,8BAA8B;IAkB7C,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAmB,CAAC;IAC5C,MAAM,OAAO,GAAG,IAAI,GAAG,EAA2B,CAAC;IAC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AAO,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAC5B,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC3B,OAAO,OAAO,CAAC;IACjB,CAAC;AACH,CAAC,EAlPgB,8BAA8B,aAA9B,8BAA8B,GAA9B,8BAA8B,QAkP9C"}
1
+ {"version":3,"file":"PluginBuildEnvironmentReadings.js","sourceRoot":"","sources":["../../../../src/plugin/internal/source/PluginBuildEnvironmentReadings.ts"],"names":[],"mappings":";;;;;;AAAA,8DAAiC;AACjC,0DAA6B;AAC7B,6DAAwD;AAExD,iGAA8F;AAC9F,mFAAgF;AAChF,uEAAoE;AACpE,qEAAkE;AAElE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,IAAiB,8BAA8B,CAqR9C;AArRD,WAAiB,8BAA8B;IAkB7C,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAmB,CAAC;IAC5C,MAAM,OAAO,GAAG,IAAI,GAAG,EAA2B,CAAC;IACnD,IAAI,MAA0B,CAAC;IAC/B,IAAI,KAAK,GAAkB,OAAO,CAAC,OAAO,EAAE,CAAC;IAE7C;;;;;;;;;;;;;;OAcG;IACH,SAAgB,MAAM,CAAC,SAAiB;QACtC,MAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;QACxD,OAAO,KAAK,KAAK,SAAS;YACxB,6DAA6B,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC;YAClD,CAAC,CAAC,KAAK,CAAC,WAAW;YACnB,CAAC,CAAC,SAAS,CAAC;IAChB,CAAC;IANe,+BAAA,MAAM,SAMrB,CAAA;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,SAAgB,SAAS,CACvB,WAA6B;QAE7B,IAAI,SAA6B,CAAC;QAClC,MAAM,OAAO,GAAG,IAAI,GAAG,EAAkB,CAAC;QAC1C,MAAM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AO,EAAE,OAAO,CAAC,CAAC;YAC7B,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;YAC3B,IAAI,CAAC;gBACH,OAAO,CAAC,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,WAAW,EAAE,CAAC,CAAC;YACvD,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,CAAC,KAAK,CAAC,CAAC;gBACf,MAAM,CAAC,KAAK,CAAC,CAAC;YAChB,CAAC;QACH,CAAC,CAAC,CACL,CAAC;QACF,KAAK,GAAG,OAAO,CAAC,IAAI,CAClB,GAAG,EAAE,CAAC,SAAS,EACf,GAAG,EAAE,CAAC,SAAS,CAChB,CAAC;QACF,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,SAAS,aAAa;QACpB,IAAI,MAAM,KAAK,SAAS;YAAE,OAAO,MAAM,CAAC;QACxC,MAAM,OAAO,GAAG,IAAI,4BAAM,CACxB,mBAAI,CAAC,IAAI,CAAC,SAAS,EAAE,iCAAiC,CAAC,EACvD,EAAE,GAAG,EAAE,+BAAS,EAAE,CACnB,CAAC;QACF,MAAM,GAAG,OAAO,CAAC;QACjB,MAAM,MAAM,GAAG,GAAG,EAAE;YAClB,IAAI,MAAM,KAAK,OAAO;gBAAE,MAAM,GAAG,SAAS,CAAC;QAC7C,CAAC,CAAC;QACF,uEAAuE;QACvE,uEAAuE;QACvE,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAC5B,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC3B,OAAO,OAAO,CAAC;IACjB,CAAC;AACH,CAAC,EArRgB,8BAA8B,aAA9B,8BAA8B,GAA9B,8BAA8B,QAqR9C"}
@@ -0,0 +1,265 @@
1
+ import fs from "node:fs";
2
+ /**
3
+ * Content identities a plugin load proves from metadata instead of bytes, kept
4
+ * in the plugin cache root so they outlive the process that read them.
5
+ *
6
+ * WARNING (#1721, #1722, #1723): a warm plugin load must not pay for its
7
+ * inputs' bytes. Before this owner existed, every launch, every `ttsx` process,
8
+ * every `@ttsc/unplugin` worker and the build-environment worker re-read the
9
+ * plugin module, the ttsc overlays, the whole GOROOT and the Go and JavaScript
10
+ * runtimes, because each earlier fix (#1186, #1712) kept its reuse inside one
11
+ * process. A process is not the unit of reuse: a CLI launch is one process. Any
12
+ * new content identity on the load path belongs here, and a memo that only
13
+ * lives in module state is not a fix for this class.
14
+ *
15
+ * A record pairs the digest of a selected population with the metadata
16
+ * signature of that population, and is trusted only under the separable-stamp
17
+ * rule settled by #1227 and #1344: every stamp must be strictly older than a
18
+ * reference minted on the same device by this store's own write, so no later
19
+ * write can share a recorded tick. References are minted on the cache root's
20
+ * volume and on the system temporary directory's volume, which together hold
21
+ * the project, its plugins and toolchain, and a system-installed runtime. A
22
+ * record is written only when the signature observed before the content read
23
+ * equals the one observed after it and both are separable. Reuse still assumes
24
+ * the filesystem reports writes in its metadata (identity, size, modification
25
+ * and change times); change time moves on every write and cannot be restored by
26
+ * an ordinary process. A population on a device without a reference, an
27
+ * unseparable stamp, a missing or foreign record, or any observation failure
28
+ * falls back to reading content, exactly as before this owner.
29
+ *
30
+ * Records live in single-file cache parts (`SourceBuildCacheLayout`), so the
31
+ * opportunistic collector ages them out and `ttsc clean` removes them. Their
32
+ * identity includes the record format and the ttsc version, so a release that
33
+ * changes a digest rule never reads another release's records.
34
+ *
35
+ * @evidence contracts/common.md#principled-implementation Metadata stands for recorded content only under the established separable-stamp rule, with before/after agreement around the content read; every unproved premise falls back to the content reader.
36
+ * @evidence contracts/common.md#clear-and-simple-design One store owns opening, record identity, reuse and publication; callers supply only the population observation and the content reader they already own.
37
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts No path-only or process-permanent memo stands for content; failures and unseparable stamps cause the real read rather than a guessed digest.
38
+ * @evidence contracts/common.md#meaningful-documentation Native paragraphs state the regression this owner prevents, the proof premises, the fallback and the storage lifetime.
39
+ * @evidence contracts/portability.md#os-neutral-implementation References are keyed by the native device that minted them and stamps are compared per device; no timestamp precision or platform name is assumed.
40
+ * @evidenceExclude contracts/performance.md#efficient-algorithms The namespace groups operations; each member states its own work.
41
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work Members define the reuse identity and its validity.
42
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Members define what they retain; the namespace holds no state.
43
+ */
44
+ export declare namespace PluginContentIdentities {
45
+ /**
46
+ * One opened record store: the physical cache root and the clock references
47
+ * minted when it was opened.
48
+ *
49
+ * @evidence contracts/common.md#principled-implementation The reference is minted by this store's own write before any observation it judges, so stamps strictly older than it cannot share a later write's tick.
50
+ * @evidence contracts/common.md#clear-and-simple-design Root, references and version travel together so every record of one load is judged against the references minted for it and one product version.
51
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The record stores observed state, not an expected digest.
52
+ * @evidence contracts/common.md#meaningful-documentation Members document their provenance and lifetime.
53
+ * @evidence contracts/portability.md#os-neutral-implementation The reference map is keyed by native device identifiers.
54
+ * @evidenceExclude contracts/performance.md#efficient-algorithms A record type runs no algorithm.
55
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work The type grants no reuse by itself; digest owns it.
56
+ * @evidence contracts/performance.md#bound-retention-and-release-resources The opener owns the store for one load or one build; at most two device references are retained.
57
+ */
58
+ interface Store {
59
+ /** Physical cache root that holds the identity and answer parts. */
60
+ readonly root: string;
61
+ /**
62
+ * Modification stamp of a probe written by this store, by device. A stamp
63
+ * on a device absent here is never separable.
64
+ */
65
+ readonly references: ReadonlyMap<bigint, bigint>;
66
+ /** Ttsc package version entering every record identity. */
67
+ readonly version: string;
68
+ }
69
+ /**
70
+ * One population's metadata signature and whether every stamp in it is
71
+ * separable from the store's reference.
72
+ *
73
+ * @evidence contracts/common.md#principled-implementation Signature and separability are observed together from the same metadata reading.
74
+ * @evidence contracts/common.md#clear-and-simple-design Two fields carry exactly what digest compares and admits.
75
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The signature is never treated as content; only the paired record digest is.
76
+ * @evidence contracts/common.md#meaningful-documentation Members state their meaning.
77
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation The observer that builds it owns native metadata semantics.
78
+ * @evidenceExclude contracts/performance.md#efficient-algorithms A record type runs no algorithm.
79
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work The type grants no reuse by itself.
80
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources The caller owns its short lifetime.
81
+ */
82
+ interface Observation {
83
+ /** Whether every stamp precedes the reference of its own device. */
84
+ readonly separable: boolean;
85
+ /** Metadata signature of the whole selected population. */
86
+ readonly signature: string;
87
+ }
88
+ /**
89
+ * Open the store under a plugin cache root and mint its clock reference, or
90
+ * return `undefined` when the root cannot hold records, so callers read
91
+ * content as they did without one.
92
+ *
93
+ * The root follows the plugin cache policy (`resolveSourceBuildCachePaths`):
94
+ * an explicit `cacheDir`, `TTSC_CACHE_DIR`, or the workspace-local default. A
95
+ * default root is marked as selected before its first write, as every other
96
+ * default writer does, so a later root search never mistakes the new payload
97
+ * for an older orphan. One reference is minted in the root's identity
98
+ * directory, and the store exists only when that write succeeds. Another is
99
+ * minted in a private per-user directory below the system temporary
100
+ * directory, so an executable or SDK on the system volume is separable even
101
+ * when the project lives on another volume.
102
+ *
103
+ * A root inside any of `sources` is refused before anything is written: the
104
+ * build rejects such a cache (`SourcePluginAdmission`), and a record written
105
+ * there would change the very source it describes.
106
+ *
107
+ * @param props.projectRoot Project whose cache root is selected.
108
+ * @param props.cacheDir Explicit caller cache root, when one was given.
109
+ * @param props.env Effective environment selecting `TTSC_CACHE_DIR`.
110
+ * @param props.sources Plugin source directories the root must lie outside.
111
+ * @evidence contracts/common.md#principled-implementation The plugin cache policy selects the root, default roots are marked before payload, and the reference comes from a fresh owned probe; any failure withholds the store so callers keep the content path.
112
+ * @evidence contracts/common.md#clear-and-simple-design Root policy and the probe are delegated to their existing owners; this function composes them once per load.
113
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts No wall clock or historical stamp substitutes for the minted reference.
114
+ * @evidence contracts/common.md#meaningful-documentation Native paragraphs state root selection, the marker ordering and the undefined fallback.
115
+ * @evidence contracts/portability.md#os-neutral-implementation Native path resolution and the probe's device identity carry platform semantics; Windows environment names are read case-insensitively by the shared reader.
116
+ * @evidence contracts/performance.md#efficient-algorithms Root selection can walk ancestors and read manifests; each of the two probes performs one directory creation, one write, one lstat and one removal; the temporary one also checks its directory's ownership. No plugin source is read.
117
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work Each load needs a freshly minted reference; reusing an older one would defeat the separation premise.
118
+ * @evidence contracts/performance.md#bound-retention-and-release-resources Each probe is removed in its owner's finally; the per-user temporary directory stays, empty, for later loads so the temporary directory itself does not move. The returned store retains at most two device references and two strings.
119
+ */
120
+ function open(props: {
121
+ projectRoot: string;
122
+ cacheDir?: string;
123
+ env: NodeJS.ProcessEnv;
124
+ sources?: readonly string[];
125
+ }): Store | undefined;
126
+ /**
127
+ * The store when its root lies outside every one of `sources`, otherwise
128
+ * `undefined`. A loader opens its store before descriptor evaluation names
129
+ * the plugin sources, then narrows it here before any source is proven, so a
130
+ * misplaced cache, which the build rejects, never receives records inside a
131
+ * user's source tree.
132
+ *
133
+ * @param store The opened store, if any.
134
+ * @param sources Plugin source directories the root must lie outside.
135
+ * @evidence contracts/common.md#principled-implementation The build's own containment predicate (`pluginSourceCovers`) decides, so a root below a pruned directory is admitted exactly as the build admits it.
136
+ * @evidence contracts/common.md#clear-and-simple-design One predicate shared by open and late narrowing.
137
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts A covered root withdraws persistence rather than writing into a source.
138
+ * @evidence contracts/common.md#meaningful-documentation Native prose explains the two-phase opening.
139
+ * @evidence contracts/portability.md#os-neutral-implementation Containment uses native path grammar.
140
+ * @evidence contracts/performance.md#efficient-algorithms One relative-path check per source.
141
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work A predicate over current arguments.
142
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Nothing is retained.
143
+ */
144
+ function outside(store: Store | undefined, sources: readonly string[]): Store | undefined;
145
+ /**
146
+ * The digest of one population: the recorded one while its metadata still
147
+ * holds and is separable, otherwise a fresh content reading, recorded when
148
+ * its metadata held still and separable around the read.
149
+ *
150
+ * A population whose selection would include the store's own root is never
151
+ * recorded, since writing a record would change what it describes; a root
152
+ * below a pruned directory such as `node_modules` is outside every
153
+ * selection.
154
+ *
155
+ * @param store The opened store, or `undefined` to read content only.
156
+ * @param kind Population family; records of different families never mix.
157
+ * @param subject Absolute population path identifying the record.
158
+ * @param observe Current signature of the population against references.
159
+ * @param read The owning content reader; its result is the digest.
160
+ * @evidence contracts/common.md#principled-implementation A record is used only when the current separable signature equals the recorded one; publication requires equal separable signatures before and after the actual content read.
161
+ * @evidence contracts/common.md#clear-and-simple-design The caller keeps population selection and content hashing; this function owns only lookup, admission and publication.
162
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Corrupt, foreign or unproved records cause the real read; the record cannot widen what the caller's reader covers.
163
+ * @evidence contracts/common.md#meaningful-documentation Native paragraphs state the reuse condition and the self-containment exclusion; parameters describe their roles.
164
+ * @evidence contracts/portability.md#os-neutral-implementation Separability is the observer's per-device judgement; record files use native path joins and atomic same-directory replacement.
165
+ * @evidence contracts/performance.md#efficient-algorithms A hit costs one population observation and one small record read; a miss adds the content read and a second observation. Record identity hashes fixed framing text.
166
+ * @evidence contracts/performance.md#reuse-equivalent-work Processes share a digest only for the same family, subject, version and current separable signature that the producing read was bracketed by.
167
+ * @evidence contracts/performance.md#bound-retention-and-release-resources One small file per subject is published atomically and aged out by the single-file collector; hits refresh its use time; nothing is retained in memory.
168
+ */
169
+ function digest(store: Store | undefined, kind: string, subject: string, observe: (references: ReadonlyMap<bigint, bigint>) => Observation | undefined, read: () => string): string;
170
+ /**
171
+ * The `pluginSourceDigest` of a plugin source directory, proven from the
172
+ * metadata of exactly the files that digest reads.
173
+ *
174
+ * @param store The opened store, or `undefined` to read content only.
175
+ * @param directory The source directory.
176
+ * @evidence contracts/common.md#principled-implementation The signature walks the same `collectPluginSourceFiles` population the digest reads, with the capability cache's separable-stamp evidence; additions, removals and renames change that population.
177
+ * @evidence contracts/common.md#clear-and-simple-design Selection and hashing remain with their owners; this adapter only names the family and subject.
178
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Links and unreadable files fail as the content reader would; no metadata stands for a file the digest does not read.
179
+ * @evidence contracts/common.md#meaningful-documentation Native prose names the shared population.
180
+ * @evidence contracts/portability.md#os-neutral-implementation Native lstat device/inode/link/mode/size/stamps form each file's signature.
181
+ * @evidence contracts/performance.md#efficient-algorithms A hit enumerates and stats F files without reading content; a miss also reads B bytes and stats again.
182
+ * @evidence contracts/performance.md#reuse-equivalent-work Loads in any process share a directory digest while its separable signature holds.
183
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Storage belongs to digest.
184
+ */
185
+ function sourceDirectory(store: Store | undefined, directory: string): string;
186
+ /**
187
+ * One regular file's metadata signature, following links, and whether its
188
+ * stamp is separable; `undefined` when it cannot be stated.
189
+ *
190
+ * @param references The store's device references.
191
+ * @param file The file, normally already resolved to its physical path.
192
+ * @evidence contracts/common.md#principled-implementation Device, inode, mode, size and both stamps move on replacement or write; separability requires a same-device reference strictly newer than the modification stamp.
193
+ * @evidence contracts/common.md#clear-and-simple-design One stat produces both fields used by digest.
194
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts A non-regular or unreadable file yields no observation, so the content reader decides.
195
+ * @evidence contracts/common.md#meaningful-documentation Native prose states the following-link semantics and undefined meaning.
196
+ * @evidence contracts/portability.md#os-neutral-implementation Node bigint stat supplies native identity and nanosecond stamps.
197
+ * @evidence contracts/performance.md#efficient-algorithms One native stat and fixed numeric formatting.
198
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work This is a fresh observation.
199
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Nothing is retained.
200
+ */
201
+ function fileObservation(references: ReadonlyMap<bigint, bigint>, file: string): Observation | undefined;
202
+ /**
203
+ * Whether a stamp is strictly older than the reference its device minted.
204
+ *
205
+ * @param references The store's device references.
206
+ * @param stats Observed metadata.
207
+ * @evidence contracts/common.md#principled-implementation Only a strictly newer same-device reference separates the recorded modification tick.
208
+ * @evidence contracts/common.md#clear-and-simple-design One lookup and one comparison.
209
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts A missing reference is never replaced by wall time.
210
+ * @evidence contracts/common.md#meaningful-documentation Native prose states the strict ordering.
211
+ * @evidence contracts/portability.md#os-neutral-implementation References are matched by native device identifier.
212
+ * @evidence contracts/performance.md#efficient-algorithms One map lookup and one bigint comparison.
213
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work A scalar predicate.
214
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Nothing is retained.
215
+ */
216
+ function separable(references: ReadonlyMap<bigint, bigint>, stats: fs.BigIntStats): boolean;
217
+ /**
218
+ * A clock reference minted by a write of the cache's own: the modification
219
+ * stamp a fresh probe file got in `directory`, by the device that reported
220
+ * it.
221
+ *
222
+ * A stamp strictly older than the same device's fresh reference satisfies the
223
+ * separation policy. Reuse still assumes the filesystem's reported metadata
224
+ * reflects writes; the comparison cannot certify arbitrary timestamp
225
+ * restoration or future clock behavior. The probe is the cache's own file,
226
+ * named for this call, and removal is attempted at once, so concurrent
227
+ * readers never lend each other a reference. A failed write, or a population
228
+ * on another device, leaves nothing separable, and the proof reads the
229
+ * files.
230
+ *
231
+ * @param directory Cache-owned directory the probe is written in.
232
+ * @evidence contracts/common.md#principled-implementation A unique freshly-written file supplies its native device/mtime reference; acquisition failure clears the witness, and observers require a matching device and strictly older reported stamp under the metadata policy.
233
+ * @evidence contracts/common.md#clear-and-simple-design The function returns only device-to-stamp evidence and owns its transient probe from creation through cleanup.
234
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Random probe identity avoids borrowing a concurrent call's witness; failed acquisition does not substitute wall-clock guesses for device evidence.
235
+ * @evidence contracts/common.md#meaningful-documentation Native JSDoc explains ended ticks, cross-device refusal and probe lifetime in separate paragraphs; tag separation follows the documentation skill.
236
+ * @evidence contracts/portability.md#os-neutral-implementation Native joins and bigint lstat use the actual filesystem's device/stamp values; no fixed timestamp precision or OS-specific temp path is assumed.
237
+ * @evidence contracts/performance.md#efficient-algorithms Probe path/UUID/hrtime text construction and mkdir/write/lstat/removal queries produce a witness without reading any population bytes.
238
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work Each proof needs a fresh clock reference; sharing an earlier probe would defeat the rollback/separation premise.
239
+ * @evidence contracts/performance.md#bound-retention-and-release-resources The unique call-owned probe is removed in finally even after acquisition failure; removal is best effort and the returned map contains at most its single observed device.
240
+ */
241
+ function mintReference(directory: string): ReadonlyMap<bigint, bigint>;
242
+ /**
243
+ * One plugin source file's metadata signature, and whether its stamp is
244
+ * separable from `references`, for `pluginSourceFilesSignature`.
245
+ *
246
+ * The files the digest reads are regular files (`collectPluginSourceFiles`),
247
+ * so these fields are the observer's metadata signature. Native metadata
248
+ * reflecting a write/replacement is a reuse premise; the signature is not
249
+ * itself a content hash or proof against arbitrary timestamp restoration.
250
+ *
251
+ * @param references The clock references minted for this proof.
252
+ * @evidence contracts/common.md#principled-implementation lstat device/inode/link/mode/size/timestamps form the regular-file metadata signature; strict mtime-before-reference marks separation for a matching device under the native metadata policy, without observing content.
253
+ * @evidence contracts/common.md#clear-and-simple-design A closure carries one proof's device references and maps each requested file to signature/separation together.
254
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Unreadable files return no witness, and unmatched device or same/newer stamps cannot authorize digest reuse.
255
+ * @evidence contracts/common.md#meaningful-documentation Native JSDoc states the regular-file premise and reference origin, with separate acknowledgment prose following the documentation skill.
256
+ * @evidence contracts/portability.md#os-neutral-implementation Metadata comes from native bigint lstat and actual device IDs; separators join numeric fields only and no host path is manually parsed.
257
+ * @evidence contracts/performance.md#efficient-algorithms Each invocation performs native path/lstat work and formats seven bigint fields without reading content.
258
+ * @evidence contracts/performance.md#reuse-equivalent-work The closure reuses one reference map across files in the same proof, while each file's current metadata is read anew.
259
+ * @evidence contracts/performance.md#bound-retention-and-release-resources The closure retains the supplied reference map until its consumer releases it; no file handle or global population is retained.
260
+ */
261
+ function sourceEvidence(references: ReadonlyMap<bigint, bigint>): (file: string) => {
262
+ separable: boolean;
263
+ signature: string;
264
+ } | undefined;
265
+ }