@ttsc/unplugin 0.32.0 → 0.33.0-next.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 (93) hide show
  1. package/lib/core/options/ResolvedTtscUnpluginOptions.d.cts +2 -0
  2. package/lib/core/options/ResolvedTtscUnpluginOptions.d.mts +2 -0
  3. package/lib/core/options/ResolvedTtscUnpluginOptions.d.ts +2 -0
  4. package/lib/core/options/TtscUnpluginOptions.d.cts +12 -2
  5. package/lib/core/options/TtscUnpluginOptions.d.mts +12 -2
  6. package/lib/core/options/TtscUnpluginOptions.d.ts +12 -2
  7. package/lib/core/options/resolveOptions.d.cts +4 -3
  8. package/lib/core/options/resolveOptions.d.mts +4 -3
  9. package/lib/core/options/resolveOptions.d.ts +4 -3
  10. package/lib/core/options/resolveOptions.js +5 -3
  11. package/lib/core/options/resolveOptions.js.map +1 -1
  12. package/lib/core/options/resolveOptions.mjs +5 -3
  13. package/lib/core/options/resolveOptions.mjs.map +1 -1
  14. package/lib/core/transform/TtscPrecompilation.d.cts +52 -0
  15. package/lib/core/transform/TtscPrecompilation.d.mts +52 -0
  16. package/lib/core/transform/TtscPrecompilation.d.ts +52 -0
  17. package/lib/core/transform/TtscPrecompilation.js +101 -0
  18. package/lib/core/transform/TtscPrecompilation.js.map +1 -0
  19. package/lib/core/transform/TtscPrecompilation.mjs +101 -0
  20. package/lib/core/transform/TtscPrecompilation.mjs.map +1 -0
  21. package/lib/core/transform/cache/selectCachedGenerationAction.d.cts +2 -0
  22. package/lib/core/transform/cache/selectCachedGenerationAction.d.mts +2 -0
  23. package/lib/core/transform/cache/selectCachedGenerationAction.d.ts +2 -0
  24. package/lib/core/transform/cache/selectCachedGenerationAction.js +1 -1
  25. package/lib/core/transform/cache/selectCachedGenerationAction.js.map +1 -1
  26. package/lib/core/transform/cache/selectCachedGenerationAction.mjs +1 -1
  27. package/lib/core/transform/cache/selectCachedGenerationAction.mjs.map +1 -1
  28. package/lib/core/transform/cache/withdrawTtscTransformGenerations.js +2 -0
  29. package/lib/core/transform/cache/withdrawTtscTransformGenerations.js.map +1 -1
  30. package/lib/core/transform/cache/withdrawTtscTransformGenerations.mjs +2 -0
  31. package/lib/core/transform/cache/withdrawTtscTransformGenerations.mjs.map +1 -1
  32. package/lib/core/transform/generation/captureTransformGeneration.d.cts +2 -0
  33. package/lib/core/transform/generation/captureTransformGeneration.d.mts +2 -0
  34. package/lib/core/transform/generation/captureTransformGeneration.d.ts +2 -0
  35. package/lib/core/transform/generation/captureTransformGeneration.js +7 -2
  36. package/lib/core/transform/generation/captureTransformGeneration.js.map +1 -1
  37. package/lib/core/transform/generation/captureTransformGeneration.mjs +7 -2
  38. package/lib/core/transform/generation/captureTransformGeneration.mjs.map +1 -1
  39. package/lib/core/transform/generation/transformProject.d.cts +2 -0
  40. package/lib/core/transform/generation/transformProject.d.mts +2 -0
  41. package/lib/core/transform/generation/transformProject.d.ts +2 -0
  42. package/lib/core/transform/generation/transformProject.js.map +1 -1
  43. package/lib/core/transform/generation/transformProject.mjs.map +1 -1
  44. package/lib/core/transform/transformTtsc.d.cts +8 -24
  45. package/lib/core/transform/transformTtsc.d.mts +8 -24
  46. package/lib/core/transform/transformTtsc.d.ts +8 -24
  47. package/lib/core/transform/transformTtsc.js +51 -31
  48. package/lib/core/transform/transformTtsc.js.map +1 -1
  49. package/lib/core/transform/transformTtsc.mjs +51 -31
  50. package/lib/core/transform/transformTtsc.mjs.map +1 -1
  51. package/lib/core/transform/validation/captureUniversalHostInputValidation.d.cts +1 -1
  52. package/lib/core/transform/validation/captureUniversalHostInputValidation.d.mts +1 -1
  53. package/lib/core/transform/validation/captureUniversalHostInputValidation.d.ts +1 -1
  54. package/lib/core/transform/validation/captureUniversalHostInputValidation.js +12 -4
  55. package/lib/core/transform/validation/captureUniversalHostInputValidation.js.map +1 -1
  56. package/lib/core/transform/validation/captureUniversalHostInputValidation.mjs +12 -4
  57. package/lib/core/transform/validation/captureUniversalHostInputValidation.mjs.map +1 -1
  58. package/lib/core/transform/validation/matchesCachedSource.d.cts +9 -2
  59. package/lib/core/transform/validation/matchesCachedSource.d.mts +9 -2
  60. package/lib/core/transform/validation/matchesCachedSource.d.ts +9 -2
  61. package/lib/core/transform/validation/matchesCachedSource.js +11 -3
  62. package/lib/core/transform/validation/matchesCachedSource.js.map +1 -1
  63. package/lib/core/transform/validation/matchesCachedSource.mjs +11 -3
  64. package/lib/core/transform/validation/matchesCachedSource.mjs.map +1 -1
  65. package/lib/core/transform/watch/TtscTransformHooks.d.cts +9 -0
  66. package/lib/core/transform/watch/TtscTransformHooks.d.mts +9 -0
  67. package/lib/core/transform/watch/TtscTransformHooks.d.ts +9 -0
  68. package/lib/core/unplugin.js +14 -0
  69. package/lib/core/unplugin.js.map +1 -1
  70. package/lib/core/unplugin.mjs +14 -0
  71. package/lib/core/unplugin.mjs.map +1 -1
  72. package/lib/core/vite/installViteDependencyScanPlugins.d.cts +46 -0
  73. package/lib/core/vite/installViteDependencyScanPlugins.d.mts +46 -0
  74. package/lib/core/vite/installViteDependencyScanPlugins.d.ts +46 -0
  75. package/lib/core/vite/installViteDependencyScanPlugins.js +186 -0
  76. package/lib/core/vite/installViteDependencyScanPlugins.js.map +1 -0
  77. package/lib/core/vite/installViteDependencyScanPlugins.mjs +184 -0
  78. package/lib/core/vite/installViteDependencyScanPlugins.mjs.map +1 -0
  79. package/package.json +5 -4
  80. package/src/core/options/ResolvedTtscUnpluginOptions.ts +3 -0
  81. package/src/core/options/TtscUnpluginOptions.ts +13 -2
  82. package/src/core/options/resolveOptions.ts +6 -3
  83. package/src/core/transform/TtscPrecompilation.ts +103 -0
  84. package/src/core/transform/cache/selectCachedGenerationAction.ts +3 -0
  85. package/src/core/transform/cache/withdrawTtscTransformGenerations.ts +2 -0
  86. package/src/core/transform/generation/captureTransformGeneration.ts +12 -2
  87. package/src/core/transform/generation/transformProject.ts +3 -0
  88. package/src/core/transform/transformTtsc.ts +81 -36
  89. package/src/core/transform/validation/captureUniversalHostInputValidation.ts +12 -4
  90. package/src/core/transform/validation/matchesCachedSource.ts +9 -2
  91. package/src/core/transform/watch/TtscTransformHooks.ts +10 -0
  92. package/src/core/unplugin.ts +32 -0
  93. package/src/core/vite/installViteDependencyScanPlugins.ts +219 -0
@@ -35,29 +35,13 @@ import type { TtscTransformHooks } from "./watch/TtscTransformHooks.mjs";
35
35
  * @param hooks - Optional adapter callbacks; see {@link TtscTransformHooks}.
36
36
  * Dependency notifications fire on cache hits too; watch registrations are
37
37
  * per build, not per compilation.
38
- * @evidence contracts/common.md#principled-implementation Project selection and generation-qualified cache admission preserve compiler disk authority; fresh-only success additionally needs an explicit nonwatching lifecycle, coherent project declaration and actual host-cache withdrawal, because incomplete observation cannot support watch invalidation.
39
- * @evidence contracts/common.md#clear-and-simple-design One delivery coordinator composes project selection, cache admission, compilation, output selection and host notifications; dedicated owners handle proof and lifetime internals.
40
- * @evidence contracts/common.md#prohibited-implementation-shortcuts Wrapper modules cannot poison source baselines; incomplete local results can share only explicitly nonwatching first deliveries in their exact pass. Unknown/watching lifecycles or unsupported withdrawal reject and evict them rather than invent persistent records or dependency closure.
41
- * @evidence contracts/common.md#meaningful-documentation Native paragraphs and argument tags explain project scope, no-transform outcomes, cache epochs and per-build notification responsibilities with links to maintained reference context.
42
- * @evidence contracts/performance.md#efficient-algorithms
43
- * Selection/key construction pays ancestor/config/alias/option/path text work.
44
- * Each iteration may prepare toolchain state, settle native notifications and
45
- * replay source/project/external/universal proofs before selecting output.
46
- * In-flight/valid completed reuse avoids compilation, not those checks or
47
- * output/map/notification/record work. Capture misses pay whole native compile
48
- * and input populations. The common proof owner skips redundant environment
49
- * preparation for proven first deliveries and shares synchronous native proof
50
- * queries; persistent/repeated delivery establishes fresh authority. Concurrent supersession can repeat the outer loop
51
- * without a delivery-level retry/time bound here.
52
- * @evidence contracts/performance.md#reuse-equivalent-work Cache identity covers config/options/plugins/aliases; current generations, pass-qualified terminal verdicts and in-flight Promises are shared only while their source and dependency proof remains valid.
53
- * @evidence contracts/performance.md#bound-retention-and-release-resources
54
- * Optional cache state retains current generation Promises/results and
55
- * per-key dependency/case facts without a byte/key cap here. Native tasks
56
- * belong to compiler/capture owners; uncached captures retain no notification
57
- * or persistent clock probe. Fresh-only delivery releases capture resources,
58
- * retaining only an explicitly admitted local pass result; rejected or failed
59
- * incomplete handoff detaches its generation. Eviction/disposal attempt independent resource release
60
- * and native failures need not close every handle or remove every probe.
61
- * @evidence contracts/portability.md#os-neutral-implementation Native module paths and project coordinates use supported path/filesystem abstractions, while actual case policy and watcher capability come from generation proof rather than OS-name assumptions.
38
+ * @evidence contracts/common.md#principled-implementation Project selection and generation-qualified admission preserve compiler disk authority; preparation shares selection, keys, capture and input proofs with delivery, while host effects and first-delivery permission remain exclusive to actual delivery. Fresh-only success still requires an explicit nonwatching lifecycle, coherent project declaration and supported host-cache withdrawal because incomplete observation cannot establish watch invalidation.
39
+ * @evidence contracts/common.md#clear-and-simple-design One coordinator mode shares project selection, admission, compilation and output selection between preparation and delivery; dedicated owners retain proof and lifetime internals, and delivery alone performs host notification.
40
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Wrapper modules cannot poison source baselines. Preparation skips handoff rather than postcompile proof, and superseded preparation stops without reviving withdrawn generations. Incomplete local results share only explicitly nonwatching first deliveries in their exact pass; unknown/watching lifecycles or unsupported withdrawal reject and evict without invented persistent records or dependency closure.
41
+ * @evidence contracts/common.md#meaningful-documentation Native paragraphs and argument tags explain project scope, no-transform outcomes, cache epochs and per-build notifications; coordinator prose identifies delivery-only effects and postpreparation admission, with maintained invalidation reference context.
42
+ * @evidence contracts/performance.md#efficient-algorithms Selection and keys pay ancestor/config/alias/option/path-text work. Each iteration may prepare toolchains, settle notifications and replay source/project/external/universal proofs; reuse avoids compilation rather than those checks or output/map/notification/record work. Misses pay native compilation and input populations. Proven first deliveries skip redundant environment preparation and share synchronous proof queries; repeated delivery establishes fresh authority. Startup schedules explicit entries concurrently and skips delivery output/map/registration work. Supersession can repeat the outer loop without a retry or time bound.
43
+ * @evidence contracts/performance.md#reuse-equivalent-work Config/options/plugins/aliases key the ordinary project Promise shared by preparation, simultaneous loads and sibling entries; completed generations, pass-qualified terminal verdicts and in-flight work remain reusable only under current source and dependency proof.
44
+ * @evidence contracts/performance.md#bound-retention-and-release-resources Optional cache state retains generation Promises/results and per-key dependency/case facts without a byte/key cap. Native tasks belong to compiler/capture owners; uncached captures retain no notification or persistent clock probe. Fresh-only delivery releases capture resources while retaining an admitted local pass result; failed or rejected incomplete handoff detaches its generation. Superseded preparation preserves the new owner, and withdrawal schedules disposal of its pending fulfilled result. Eviction/disposal attempt independent release; native failure need not close every handle or remove every probe.
45
+ * @evidence contracts/portability.md#os-neutral-implementation Preparation and delivery use the same native project selection, path identity and cache-owned filesystem boundaries, with exact startup entry paths. Generation proof supplies case and watcher policy rather than OS-name assumptions.
62
46
  */
63
47
  export declare function transformTtsc(id: string, source: string, options: ResolvedTtscUnpluginOptions, aliases?: unknown, cache?: TtscTransformCache, hooks?: TtscTransformHooks): Promise<TtscTransformResult | undefined>;
@@ -35,29 +35,13 @@ import type { TtscTransformHooks } from "./watch/TtscTransformHooks";
35
35
  * @param hooks - Optional adapter callbacks; see {@link TtscTransformHooks}.
36
36
  * Dependency notifications fire on cache hits too; watch registrations are
37
37
  * per build, not per compilation.
38
- * @evidence contracts/common.md#principled-implementation Project selection and generation-qualified cache admission preserve compiler disk authority; fresh-only success additionally needs an explicit nonwatching lifecycle, coherent project declaration and actual host-cache withdrawal, because incomplete observation cannot support watch invalidation.
39
- * @evidence contracts/common.md#clear-and-simple-design One delivery coordinator composes project selection, cache admission, compilation, output selection and host notifications; dedicated owners handle proof and lifetime internals.
40
- * @evidence contracts/common.md#prohibited-implementation-shortcuts Wrapper modules cannot poison source baselines; incomplete local results can share only explicitly nonwatching first deliveries in their exact pass. Unknown/watching lifecycles or unsupported withdrawal reject and evict them rather than invent persistent records or dependency closure.
41
- * @evidence contracts/common.md#meaningful-documentation Native paragraphs and argument tags explain project scope, no-transform outcomes, cache epochs and per-build notification responsibilities with links to maintained reference context.
42
- * @evidence contracts/performance.md#efficient-algorithms
43
- * Selection/key construction pays ancestor/config/alias/option/path text work.
44
- * Each iteration may prepare toolchain state, settle native notifications and
45
- * replay source/project/external/universal proofs before selecting output.
46
- * In-flight/valid completed reuse avoids compilation, not those checks or
47
- * output/map/notification/record work. Capture misses pay whole native compile
48
- * and input populations. The common proof owner skips redundant environment
49
- * preparation for proven first deliveries and shares synchronous native proof
50
- * queries; persistent/repeated delivery establishes fresh authority. Concurrent supersession can repeat the outer loop
51
- * without a delivery-level retry/time bound here.
52
- * @evidence contracts/performance.md#reuse-equivalent-work Cache identity covers config/options/plugins/aliases; current generations, pass-qualified terminal verdicts and in-flight Promises are shared only while their source and dependency proof remains valid.
53
- * @evidence contracts/performance.md#bound-retention-and-release-resources
54
- * Optional cache state retains current generation Promises/results and
55
- * per-key dependency/case facts without a byte/key cap here. Native tasks
56
- * belong to compiler/capture owners; uncached captures retain no notification
57
- * or persistent clock probe. Fresh-only delivery releases capture resources,
58
- * retaining only an explicitly admitted local pass result; rejected or failed
59
- * incomplete handoff detaches its generation. Eviction/disposal attempt independent resource release
60
- * and native failures need not close every handle or remove every probe.
61
- * @evidence contracts/portability.md#os-neutral-implementation Native module paths and project coordinates use supported path/filesystem abstractions, while actual case policy and watcher capability come from generation proof rather than OS-name assumptions.
38
+ * @evidence contracts/common.md#principled-implementation Project selection and generation-qualified admission preserve compiler disk authority; preparation shares selection, keys, capture and input proofs with delivery, while host effects and first-delivery permission remain exclusive to actual delivery. Fresh-only success still requires an explicit nonwatching lifecycle, coherent project declaration and supported host-cache withdrawal because incomplete observation cannot establish watch invalidation.
39
+ * @evidence contracts/common.md#clear-and-simple-design One coordinator mode shares project selection, admission, compilation and output selection between preparation and delivery; dedicated owners retain proof and lifetime internals, and delivery alone performs host notification.
40
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Wrapper modules cannot poison source baselines. Preparation skips handoff rather than postcompile proof, and superseded preparation stops without reviving withdrawn generations. Incomplete local results share only explicitly nonwatching first deliveries in their exact pass; unknown/watching lifecycles or unsupported withdrawal reject and evict without invented persistent records or dependency closure.
41
+ * @evidence contracts/common.md#meaningful-documentation Native paragraphs and argument tags explain project scope, no-transform outcomes, cache epochs and per-build notifications; coordinator prose identifies delivery-only effects and postpreparation admission, with maintained invalidation reference context.
42
+ * @evidence contracts/performance.md#efficient-algorithms Selection and keys pay ancestor/config/alias/option/path-text work. Each iteration may prepare toolchains, settle notifications and replay source/project/external/universal proofs; reuse avoids compilation rather than those checks or output/map/notification/record work. Misses pay native compilation and input populations. Proven first deliveries skip redundant environment preparation and share synchronous proof queries; repeated delivery establishes fresh authority. Startup schedules explicit entries concurrently and skips delivery output/map/registration work. Supersession can repeat the outer loop without a retry or time bound.
43
+ * @evidence contracts/performance.md#reuse-equivalent-work Config/options/plugins/aliases key the ordinary project Promise shared by preparation, simultaneous loads and sibling entries; completed generations, pass-qualified terminal verdicts and in-flight work remain reusable only under current source and dependency proof.
44
+ * @evidence contracts/performance.md#bound-retention-and-release-resources Optional cache state retains generation Promises/results and per-key dependency/case facts without a byte/key cap. Native tasks belong to compiler/capture owners; uncached captures retain no notification or persistent clock probe. Fresh-only delivery releases capture resources while retaining an admitted local pass result; failed or rejected incomplete handoff detaches its generation. Superseded preparation preserves the new owner, and withdrawal schedules disposal of its pending fulfilled result. Eviction/disposal attempt independent release; native failure need not close every handle or remove every probe.
45
+ * @evidence contracts/portability.md#os-neutral-implementation Preparation and delivery use the same native project selection, path identity and cache-owned filesystem boundaries, with exact startup entry paths. Generation proof supplies case and watcher policy rather than OS-name assumptions.
62
46
  */
63
47
  export declare function transformTtsc(id: string, source: string, options: ResolvedTtscUnpluginOptions, aliases?: unknown, cache?: TtscTransformCache, hooks?: TtscTransformHooks): Promise<TtscTransformResult | undefined>;
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var path = require('node:path');
4
+ var TtscPrecompilation = require('./TtscPrecompilation.js');
4
5
  var createAliasPaths = require('./alias/createAliasPaths.js');
5
6
  var TERMINAL_TRANSFORM_GENERATIONS = require('./cache/TERMINAL_TRANSFORM_GENERATIONS.js');
6
7
  var TRANSFORM_CACHE_CASE_POLICIES = require('./cache/TRANSFORM_CACHE_CASE_POLICIES.js');
@@ -64,32 +65,25 @@ var recordedDependencyWitnesses = require('./watch/recordedDependencyWitnesses.j
64
65
  * @param hooks - Optional adapter callbacks; see {@link TtscTransformHooks}.
65
66
  * Dependency notifications fire on cache hits too; watch registrations are
66
67
  * per build, not per compilation.
67
- * @evidence contracts/common.md#principled-implementation Project selection and generation-qualified cache admission preserve compiler disk authority; fresh-only success additionally needs an explicit nonwatching lifecycle, coherent project declaration and actual host-cache withdrawal, because incomplete observation cannot support watch invalidation.
68
- * @evidence contracts/common.md#clear-and-simple-design One delivery coordinator composes project selection, cache admission, compilation, output selection and host notifications; dedicated owners handle proof and lifetime internals.
69
- * @evidence contracts/common.md#prohibited-implementation-shortcuts Wrapper modules cannot poison source baselines; incomplete local results can share only explicitly nonwatching first deliveries in their exact pass. Unknown/watching lifecycles or unsupported withdrawal reject and evict them rather than invent persistent records or dependency closure.
70
- * @evidence contracts/common.md#meaningful-documentation Native paragraphs and argument tags explain project scope, no-transform outcomes, cache epochs and per-build notification responsibilities with links to maintained reference context.
71
- * @evidence contracts/performance.md#efficient-algorithms
72
- * Selection/key construction pays ancestor/config/alias/option/path text work.
73
- * Each iteration may prepare toolchain state, settle native notifications and
74
- * replay source/project/external/universal proofs before selecting output.
75
- * In-flight/valid completed reuse avoids compilation, not those checks or
76
- * output/map/notification/record work. Capture misses pay whole native compile
77
- * and input populations. The common proof owner skips redundant environment
78
- * preparation for proven first deliveries and shares synchronous native proof
79
- * queries; persistent/repeated delivery establishes fresh authority. Concurrent supersession can repeat the outer loop
80
- * without a delivery-level retry/time bound here.
81
- * @evidence contracts/performance.md#reuse-equivalent-work Cache identity covers config/options/plugins/aliases; current generations, pass-qualified terminal verdicts and in-flight Promises are shared only while their source and dependency proof remains valid.
82
- * @evidence contracts/performance.md#bound-retention-and-release-resources
83
- * Optional cache state retains current generation Promises/results and
84
- * per-key dependency/case facts without a byte/key cap here. Native tasks
85
- * belong to compiler/capture owners; uncached captures retain no notification
86
- * or persistent clock probe. Fresh-only delivery releases capture resources,
87
- * retaining only an explicitly admitted local pass result; rejected or failed
88
- * incomplete handoff detaches its generation. Eviction/disposal attempt independent resource release
89
- * and native failures need not close every handle or remove every probe.
90
- * @evidence contracts/portability.md#os-neutral-implementation Native module paths and project coordinates use supported path/filesystem abstractions, while actual case policy and watcher capability come from generation proof rather than OS-name assumptions.
68
+ * @evidence contracts/common.md#principled-implementation Project selection and generation-qualified admission preserve compiler disk authority; preparation shares selection, keys, capture and input proofs with delivery, while host effects and first-delivery permission remain exclusive to actual delivery. Fresh-only success still requires an explicit nonwatching lifecycle, coherent project declaration and supported host-cache withdrawal because incomplete observation cannot establish watch invalidation.
69
+ * @evidence contracts/common.md#clear-and-simple-design One coordinator mode shares project selection, admission, compilation and output selection between preparation and delivery; dedicated owners retain proof and lifetime internals, and delivery alone performs host notification.
70
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Wrapper modules cannot poison source baselines. Preparation skips handoff rather than postcompile proof, and superseded preparation stops without reviving withdrawn generations. Incomplete local results share only explicitly nonwatching first deliveries in their exact pass; unknown/watching lifecycles or unsupported withdrawal reject and evict without invented persistent records or dependency closure.
71
+ * @evidence contracts/common.md#meaningful-documentation Native paragraphs and argument tags explain project scope, no-transform outcomes, cache epochs and per-build notifications; coordinator prose identifies delivery-only effects and postpreparation admission, with maintained invalidation reference context.
72
+ * @evidence contracts/performance.md#efficient-algorithms Selection and keys pay ancestor/config/alias/option/path-text work. Each iteration may prepare toolchains, settle notifications and replay source/project/external/universal proofs; reuse avoids compilation rather than those checks or output/map/notification/record work. Misses pay native compilation and input populations. Proven first deliveries skip redundant environment preparation and share synchronous proof queries; repeated delivery establishes fresh authority. Startup schedules explicit entries concurrently and skips delivery output/map/registration work. Supersession can repeat the outer loop without a retry or time bound.
73
+ * @evidence contracts/performance.md#reuse-equivalent-work Config/options/plugins/aliases key the ordinary project Promise shared by preparation, simultaneous loads and sibling entries; completed generations, pass-qualified terminal verdicts and in-flight work remain reusable only under current source and dependency proof.
74
+ * @evidence contracts/performance.md#bound-retention-and-release-resources Optional cache state retains generation Promises/results and per-key dependency/case facts without a byte/key cap. Native tasks belong to compiler/capture owners; uncached captures retain no notification or persistent clock probe. Fresh-only delivery releases capture resources while retaining an admitted local pass result; failed or rejected incomplete handoff detaches its generation. Superseded preparation preserves the new owner, and withdrawal schedules disposal of its pending fulfilled result. Eviction/disposal attempt independent release; native failure need not close every handle or remove every probe.
75
+ * @evidence contracts/portability.md#os-neutral-implementation Preparation and delivery use the same native project selection, path identity and cache-owned filesystem boundaries, with exact startup entry paths. Generation proof supplies case and watcher policy rather than OS-name assumptions.
91
76
  */
92
- async function transformTtsc(id, source, options, aliases, cache, hooks) {
77
+ function transformTtsc(id, source, options, aliases, cache, hooks) {
78
+ return runTransformTtsc(id, source, options, aliases, cache, hooks, false);
79
+ }
80
+ /**
81
+ * Coordinate capture and actual delivery through the same project cache.
82
+ * Preparation stops before handoff: it cannot mark a module served, publish a
83
+ * host record, acknowledge volatility or emit module diagnostics. A prepared
84
+ * generation must still pass ordinary admission when the host requests it.
85
+ */
86
+ async function runTransformTtsc(id, source, options, aliases, cache, hooks, preparing) {
93
87
  const filesystem = transformFilesystem.transformFilesystem(cache);
94
88
  const exact = hooks?.exactPath === true;
95
89
  const clean = exact ? id : stripQuery.stripQuery(id);
@@ -113,7 +107,9 @@ async function transformTtsc(id, source, options, aliases, cache, hooks) {
113
107
  // Acquire host-owned storage before any generation observes directory inputs.
114
108
  // Writing the delivered record must not create a new member of that proof.
115
109
  prepareProjectRecordDirectories.prepareProjectRecordDirectories(hooks?.project);
116
- const selection = resolveProjectSelection.resolveProjectSelection(file, options.project, filesystem);
110
+ const selection = hooks?.projectSelection === undefined
111
+ ? resolveProjectSelection.resolveProjectSelection(file, options.project, filesystem)
112
+ : { tsconfig: path.resolve(hooks.projectSelection), consulted: [] };
117
113
  const tsconfig = selection.tsconfig;
118
114
  const selectedProjectRoot = path.resolve(options.projectRoot ?? path.dirname(tsconfig));
119
115
  // Reported config reads and failed discovery candidates are watch inputs:
@@ -128,6 +124,9 @@ async function transformTtsc(id, source, options, aliases, cache, hooks) {
128
124
  tsconfig,
129
125
  };
130
126
  const aliasPaths = createAliasPaths.createAliasPaths(aliases);
127
+ if (!preparing && cache !== undefined) {
128
+ TtscPrecompilation.TtscPrecompilation.start(cache, options, aliasPaths, (entry, text) => runTransformTtsc(entry, text, options, aliases, cache, { ...hooks, exactPath: true, projectSelection: undefined }, true));
129
+ }
131
130
  const key = createTransformCacheKey.createTransformCacheKey({
132
131
  aliasPaths,
133
132
  compilerOptions: options.compilerOptions,
@@ -148,8 +147,11 @@ async function transformTtsc(id, source, options, aliases, cache, hooks) {
148
147
  if (terminal !== undefined) {
149
148
  if (terminal instanceof TtscUnstableGenerationError.TtscUnstableGenerationError) {
150
149
  await preparePluginBuildEnvironments.preparePluginBuildEnvironments(terminal.validation.cached.result, filesystem, undefined, terminal.validation.cached.projectRoot);
151
- if (cache?.get(key) !== transformed)
150
+ if (cache?.get(key) !== transformed) {
151
+ if (preparing)
152
+ return undefined;
152
153
  continue;
154
+ }
153
155
  }
154
156
  // A terminal verdict is an answer about one observed environment, not an
155
157
  // invitation for every later module to repeat the whole compile.
@@ -158,7 +160,8 @@ async function transformTtsc(id, source, options, aliases, cache, hooks) {
158
160
  currentSource: source,
159
161
  filesystem,
160
162
  })) {
161
- notifyRejectedGenerationInputs.notifyRejectedGenerationInputs(hooks, terminal, file, watchSelection);
163
+ if (!preparing)
164
+ notifyRejectedGenerationInputs.notifyRejectedGenerationInputs(hooks, terminal, file, watchSelection);
162
165
  throw terminal;
163
166
  }
164
167
  evictGeneration.evictGeneration(cache, key, transformed);
@@ -170,13 +173,16 @@ async function transformTtsc(id, source, options, aliases, cache, hooks) {
170
173
  }
171
174
  if (transformed !== undefined) {
172
175
  const cached = await awaitOrEvict.awaitOrEvict(cache, key, transformed).catch((rejection) => {
173
- notifyRejectedGenerationInputs.notifyRejectedGenerationInputs(hooks, rejection, file, watchSelection);
176
+ if (!preparing)
177
+ notifyRejectedGenerationInputs.notifyRejectedGenerationInputs(hooks, rejection, file, watchSelection);
174
178
  throw rejection;
175
179
  });
176
180
  TRANSFORM_RESULT_FILESYSTEM.TRANSFORM_RESULT_FILESYSTEM.set(cached.result, filesystem);
177
181
  // While this caller awaited the old Promise, another caller may have
178
182
  // invalidated it and installed a newer authoritative generation.
179
183
  if (cache?.get(key) !== transformed) {
184
+ if (preparing)
185
+ return undefined;
180
186
  continue;
181
187
  }
182
188
  // A generation captured while native notifications were trusted keeps
@@ -189,12 +195,17 @@ async function transformTtsc(id, source, options, aliases, cache, hooks) {
189
195
  if (epoch === undefined) {
190
196
  await settleProjectMutationEvents.settleProjectMutationEvents(cached);
191
197
  if (cache?.get(key) !== transformed) {
198
+ if (preparing)
199
+ return undefined;
192
200
  continue;
193
201
  }
194
202
  }
195
203
  await TtscGenerationProof.TtscGenerationProof.prepare(cached, file, epoch);
196
- if (cache?.get(key) !== transformed)
204
+ if (cache?.get(key) !== transformed) {
205
+ if (preparing)
206
+ return undefined;
197
207
  continue;
208
+ }
198
209
  // No await between this observation and synchronous admission.
199
210
  const proof = TtscGenerationProof.TtscGenerationProof.create(cached, file, epoch);
200
211
  const action = selectCachedGenerationAction.selectCachedGenerationAction({
@@ -206,11 +217,14 @@ async function transformTtsc(id, source, options, aliases, cache, hooks) {
206
217
  generation: transformed,
207
218
  key,
208
219
  source,
220
+ reportDivergence: !preparing,
209
221
  });
210
222
  if (action === "retry") {
211
223
  continue;
212
224
  }
213
225
  if (action === "serve") {
226
+ if (preparing)
227
+ return undefined;
214
228
  return deliverCachedTransform.deliverCachedTransform({
215
229
  cache,
216
230
  cached,
@@ -232,6 +246,7 @@ async function transformTtsc(id, source, options, aliases, cache, hooks) {
232
246
  projectRoot: selectedProjectRoot,
233
247
  currentFile: file,
234
248
  currentSource: source,
249
+ reportDivergence: !preparing,
235
250
  // Stamp the pass this compile was started for, not the one it happens
236
251
  // to finish in: a boundary crossed mid-compile leaves the generation
237
252
  // belonging to the earlier pass, so the next pass re-proves it.
@@ -263,10 +278,13 @@ async function transformTtsc(id, source, options, aliases, cache, hooks) {
263
278
  }
264
279
  const generation = transformed;
265
280
  const cached = await awaitOrEvict.awaitOrEvict(cache, key, generation).catch((rejection) => {
266
- notifyRejectedGenerationInputs.notifyRejectedGenerationInputs(hooks, rejection, file, watchSelection);
281
+ if (!preparing)
282
+ notifyRejectedGenerationInputs.notifyRejectedGenerationInputs(hooks, rejection, file, watchSelection);
267
283
  throw rejection;
268
284
  });
269
285
  if (cache !== undefined && cache.get(key) !== generation) {
286
+ if (preparing)
287
+ return undefined;
270
288
  continue;
271
289
  }
272
290
  if (cache !== undefined) {
@@ -286,6 +304,8 @@ async function transformTtsc(id, source, options, aliases, cache, hooks) {
286
304
  policies.set(key, reported);
287
305
  }
288
306
  }
307
+ if (preparing)
308
+ return undefined;
289
309
  return deliverCachedTransform.deliverCachedTransform({
290
310
  cache,
291
311
  cached,
@@ -1 +1 @@
1
- {"version":3,"file":"transformTtsc.js","sources":["../../../src/core/transform/transformTtsc.ts"],"sourcesContent":[null],"names":["transformFilesystem","stripQuery","isHostWrapperQuery","isDeclarationFile","pluginsAreDisabled","prepareProjectRecordDirectories","resolveProjectSelection","createAliasPaths","createTransformCacheKey","transformCacheEpoch","TERMINAL_TRANSFORM_GENERATIONS","TtscUnstableGenerationError","preparePluginBuildEnvironments","replaysTerminalGeneration","notifyRejectedGenerationInputs","evictGeneration","awaitOrEvict","TRANSFORM_RESULT_FILESYSTEM","transformCacheTrustsNotifications","withdrawGenerationNotifications","settleProjectMutationEvents","TtscGenerationProof","selectCachedGenerationAction","deliverCachedTransform","transformPro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AE,QAAQ,CAAC;gBACpD;AACA,gBAAA,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC;YAC7B;QACF;AACA,QAAA,OAAOH,6CAAsB,CAAC;YAC5B,KAAK;YACL,MAAM;YACN,UAAU;YACV,GAAG;YACH,KAAK;YACL,IAAI;YACJ,MAAM;YACN,KAAK;AACL,YAAA,SAAS,EAAE,cAAc;AAC1B,SAAA,CAAC;IACJ;AACF;;;;"}
1
+ {"version":3,"file":"transformTtsc.js","sources":["../../../src/core/transform/transformTtsc.ts"],"sourcesContent":[null],"names":["transformFilesystem","stripQuery","isHostWrapperQuery","isDeclarationFile","pluginsAreDisabled","prepareProjectRecordDirectories","resolveProjectSelection","createAliasPaths","TtscPrecompilation","createTransformCacheKey","transformCacheEpoch","TERMINAL_TRANSFORM_GENERATIONS","TtscUnstableGenerationError","preparePluginBuildEnvironments","replaysTerminalGeneration","notifyRejectedGenerationInputs","evictGeneration","awaitOrEvict","TRANSFORM_RESULT_FILESYSTEM","transformCacheTrustsNotifications","withdrawGenerationNotifications","settleProjectMutationEvents","TtscGenerationProof","selectCachedGenerationAction","deliverCachedTransform","transformProject","TRANSFORM_CACHE_SESSIONS","TRANSFORM_CACHE_CASE_POLICIES","TRANSFORM_CACHE_DEPENDENCY_WITNESSES","recordedDependencyWitnesses"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCG;AACG,SAAU,aAAa,CAC3B,EAAU,EACV,MAAc,EACd,OAAoC,EACpC,OAAiB,EACjB,KAA0B,EAC1B,KAA0B,EAAA;AAE1B,IAAA,OAAO,gBAAgB,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;AAC5E;AAEA;;;;;AAKG;AACH,eAAe,gBAAgB,CAC7B,EAAU,EACV,MAAc,EACd,OAAoC,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ACF;AACA,QAAA,IAAI,KAAK,KAAK,SAAS,EAAE;YACvB,IAAI,SAAS,GAAGa,yEAAoC,CAAC,GAAG,CAAC,KAAK,CAAC;AAC/D,YAAA,IAAI,SAAS,KAAK,SAAS,EAAE;AAC3B,gBAAA,SAAS,GAAG,IAAI,GAAG,EAAE;AACrB,gBAAAA,yEAAoC,CAAC,GAAG,CAAC,KAAK,EAAE,SAAS,CAAC;YAC5D;YACA,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,wBAAwB,IAAI,EAAE,CAAC;AACzD,YAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,gBAAgB,CAAC,yBAAyB;AAClE,YAAA,IAAI,QAAQ,KAAK,SAAS,EAAE;gBAC1B,IAAI,QAAQ,GAAGD,2DAA6B,CAAC,GAAG,CAAC,KAAK,CAAC;AACvD,gBAAA,IAAI,QAAQ,KAAK,SAAS,EAAE;AAC1B,oBAAA,QAAQ,GAAG,IAAI,GAAG,EAAE;AACpB,oBAAAA,2DAA6B,CAAC,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAC;gBACpD;AACA,gBAAA,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC;YAC7B;QACF;AACA,QAAA,IAAI,SAAS;AAAE,YAAA,OAAO,SAAS;AAC/B,QAAA,OAAOH,6CAAsB,CAAC;YAC5B,KAAK;YACL,MAAM;YACN,UAAU;YACV,GAAG;YACH,KAAK;YACL,IAAI;YACJ,MAAM;YACN,KAAK;AACL,YAAA,SAAS,EAAE,cAAc;AAC1B,SAAA,CAAC;IACJ;AACF;;;;"}
@@ -1,4 +1,5 @@
1
1
  import path from 'node:path';
2
+ import { TtscPrecompilation } from './TtscPrecompilation.mjs';
2
3
  import { createAliasPaths } from './alias/createAliasPaths.mjs';
3
4
  import { TERMINAL_TRANSFORM_GENERATIONS } from './cache/TERMINAL_TRANSFORM_GENERATIONS.mjs';
4
5
  import { TRANSFORM_CACHE_CASE_POLICIES } from './cache/TRANSFORM_CACHE_CASE_POLICIES.mjs';
@@ -62,32 +63,25 @@ import { recordedDependencyWitnesses } from './watch/recordedDependencyWitnesses
62
63
  * @param hooks - Optional adapter callbacks; see {@link TtscTransformHooks}.
63
64
  * Dependency notifications fire on cache hits too; watch registrations are
64
65
  * per build, not per compilation.
65
- * @evidence contracts/common.md#principled-implementation Project selection and generation-qualified cache admission preserve compiler disk authority; fresh-only success additionally needs an explicit nonwatching lifecycle, coherent project declaration and actual host-cache withdrawal, because incomplete observation cannot support watch invalidation.
66
- * @evidence contracts/common.md#clear-and-simple-design One delivery coordinator composes project selection, cache admission, compilation, output selection and host notifications; dedicated owners handle proof and lifetime internals.
67
- * @evidence contracts/common.md#prohibited-implementation-shortcuts Wrapper modules cannot poison source baselines; incomplete local results can share only explicitly nonwatching first deliveries in their exact pass. Unknown/watching lifecycles or unsupported withdrawal reject and evict them rather than invent persistent records or dependency closure.
68
- * @evidence contracts/common.md#meaningful-documentation Native paragraphs and argument tags explain project scope, no-transform outcomes, cache epochs and per-build notification responsibilities with links to maintained reference context.
69
- * @evidence contracts/performance.md#efficient-algorithms
70
- * Selection/key construction pays ancestor/config/alias/option/path text work.
71
- * Each iteration may prepare toolchain state, settle native notifications and
72
- * replay source/project/external/universal proofs before selecting output.
73
- * In-flight/valid completed reuse avoids compilation, not those checks or
74
- * output/map/notification/record work. Capture misses pay whole native compile
75
- * and input populations. The common proof owner skips redundant environment
76
- * preparation for proven first deliveries and shares synchronous native proof
77
- * queries; persistent/repeated delivery establishes fresh authority. Concurrent supersession can repeat the outer loop
78
- * without a delivery-level retry/time bound here.
79
- * @evidence contracts/performance.md#reuse-equivalent-work Cache identity covers config/options/plugins/aliases; current generations, pass-qualified terminal verdicts and in-flight Promises are shared only while their source and dependency proof remains valid.
80
- * @evidence contracts/performance.md#bound-retention-and-release-resources
81
- * Optional cache state retains current generation Promises/results and
82
- * per-key dependency/case facts without a byte/key cap here. Native tasks
83
- * belong to compiler/capture owners; uncached captures retain no notification
84
- * or persistent clock probe. Fresh-only delivery releases capture resources,
85
- * retaining only an explicitly admitted local pass result; rejected or failed
86
- * incomplete handoff detaches its generation. Eviction/disposal attempt independent resource release
87
- * and native failures need not close every handle or remove every probe.
88
- * @evidence contracts/portability.md#os-neutral-implementation Native module paths and project coordinates use supported path/filesystem abstractions, while actual case policy and watcher capability come from generation proof rather than OS-name assumptions.
66
+ * @evidence contracts/common.md#principled-implementation Project selection and generation-qualified admission preserve compiler disk authority; preparation shares selection, keys, capture and input proofs with delivery, while host effects and first-delivery permission remain exclusive to actual delivery. Fresh-only success still requires an explicit nonwatching lifecycle, coherent project declaration and supported host-cache withdrawal because incomplete observation cannot establish watch invalidation.
67
+ * @evidence contracts/common.md#clear-and-simple-design One coordinator mode shares project selection, admission, compilation and output selection between preparation and delivery; dedicated owners retain proof and lifetime internals, and delivery alone performs host notification.
68
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Wrapper modules cannot poison source baselines. Preparation skips handoff rather than postcompile proof, and superseded preparation stops without reviving withdrawn generations. Incomplete local results share only explicitly nonwatching first deliveries in their exact pass; unknown/watching lifecycles or unsupported withdrawal reject and evict without invented persistent records or dependency closure.
69
+ * @evidence contracts/common.md#meaningful-documentation Native paragraphs and argument tags explain project scope, no-transform outcomes, cache epochs and per-build notifications; coordinator prose identifies delivery-only effects and postpreparation admission, with maintained invalidation reference context.
70
+ * @evidence contracts/performance.md#efficient-algorithms Selection and keys pay ancestor/config/alias/option/path-text work. Each iteration may prepare toolchains, settle notifications and replay source/project/external/universal proofs; reuse avoids compilation rather than those checks or output/map/notification/record work. Misses pay native compilation and input populations. Proven first deliveries skip redundant environment preparation and share synchronous proof queries; repeated delivery establishes fresh authority. Startup schedules explicit entries concurrently and skips delivery output/map/registration work. Supersession can repeat the outer loop without a retry or time bound.
71
+ * @evidence contracts/performance.md#reuse-equivalent-work Config/options/plugins/aliases key the ordinary project Promise shared by preparation, simultaneous loads and sibling entries; completed generations, pass-qualified terminal verdicts and in-flight work remain reusable only under current source and dependency proof.
72
+ * @evidence contracts/performance.md#bound-retention-and-release-resources Optional cache state retains generation Promises/results and per-key dependency/case facts without a byte/key cap. Native tasks belong to compiler/capture owners; uncached captures retain no notification or persistent clock probe. Fresh-only delivery releases capture resources while retaining an admitted local pass result; failed or rejected incomplete handoff detaches its generation. Superseded preparation preserves the new owner, and withdrawal schedules disposal of its pending fulfilled result. Eviction/disposal attempt independent release; native failure need not close every handle or remove every probe.
73
+ * @evidence contracts/portability.md#os-neutral-implementation Preparation and delivery use the same native project selection, path identity and cache-owned filesystem boundaries, with exact startup entry paths. Generation proof supplies case and watcher policy rather than OS-name assumptions.
89
74
  */
90
- async function transformTtsc(id, source, options, aliases, cache, hooks) {
75
+ function transformTtsc(id, source, options, aliases, cache, hooks) {
76
+ return runTransformTtsc(id, source, options, aliases, cache, hooks, false);
77
+ }
78
+ /**
79
+ * Coordinate capture and actual delivery through the same project cache.
80
+ * Preparation stops before handoff: it cannot mark a module served, publish a
81
+ * host record, acknowledge volatility or emit module diagnostics. A prepared
82
+ * generation must still pass ordinary admission when the host requests it.
83
+ */
84
+ async function runTransformTtsc(id, source, options, aliases, cache, hooks, preparing) {
91
85
  const filesystem = transformFilesystem(cache);
92
86
  const exact = hooks?.exactPath === true;
93
87
  const clean = exact ? id : stripQuery(id);
@@ -111,7 +105,9 @@ async function transformTtsc(id, source, options, aliases, cache, hooks) {
111
105
  // Acquire host-owned storage before any generation observes directory inputs.
112
106
  // Writing the delivered record must not create a new member of that proof.
113
107
  prepareProjectRecordDirectories(hooks?.project);
114
- const selection = resolveProjectSelection(file, options.project, filesystem);
108
+ const selection = hooks?.projectSelection === undefined
109
+ ? resolveProjectSelection(file, options.project, filesystem)
110
+ : { tsconfig: path.resolve(hooks.projectSelection), consulted: [] };
115
111
  const tsconfig = selection.tsconfig;
116
112
  const selectedProjectRoot = path.resolve(options.projectRoot ?? path.dirname(tsconfig));
117
113
  // Reported config reads and failed discovery candidates are watch inputs:
@@ -126,6 +122,9 @@ async function transformTtsc(id, source, options, aliases, cache, hooks) {
126
122
  tsconfig,
127
123
  };
128
124
  const aliasPaths = createAliasPaths(aliases);
125
+ if (!preparing && cache !== undefined) {
126
+ TtscPrecompilation.start(cache, options, aliasPaths, (entry, text) => runTransformTtsc(entry, text, options, aliases, cache, { ...hooks, exactPath: true, projectSelection: undefined }, true));
127
+ }
129
128
  const key = createTransformCacheKey({
130
129
  aliasPaths,
131
130
  compilerOptions: options.compilerOptions,
@@ -146,8 +145,11 @@ async function transformTtsc(id, source, options, aliases, cache, hooks) {
146
145
  if (terminal !== undefined) {
147
146
  if (terminal instanceof TtscUnstableGenerationError) {
148
147
  await preparePluginBuildEnvironments(terminal.validation.cached.result, filesystem, undefined, terminal.validation.cached.projectRoot);
149
- if (cache?.get(key) !== transformed)
148
+ if (cache?.get(key) !== transformed) {
149
+ if (preparing)
150
+ return undefined;
150
151
  continue;
152
+ }
151
153
  }
152
154
  // A terminal verdict is an answer about one observed environment, not an
153
155
  // invitation for every later module to repeat the whole compile.
@@ -156,7 +158,8 @@ async function transformTtsc(id, source, options, aliases, cache, hooks) {
156
158
  currentSource: source,
157
159
  filesystem,
158
160
  })) {
159
- notifyRejectedGenerationInputs(hooks, terminal, file, watchSelection);
161
+ if (!preparing)
162
+ notifyRejectedGenerationInputs(hooks, terminal, file, watchSelection);
160
163
  throw terminal;
161
164
  }
162
165
  evictGeneration(cache, key, transformed);
@@ -168,13 +171,16 @@ async function transformTtsc(id, source, options, aliases, cache, hooks) {
168
171
  }
169
172
  if (transformed !== undefined) {
170
173
  const cached = await awaitOrEvict(cache, key, transformed).catch((rejection) => {
171
- notifyRejectedGenerationInputs(hooks, rejection, file, watchSelection);
174
+ if (!preparing)
175
+ notifyRejectedGenerationInputs(hooks, rejection, file, watchSelection);
172
176
  throw rejection;
173
177
  });
174
178
  TRANSFORM_RESULT_FILESYSTEM.set(cached.result, filesystem);
175
179
  // While this caller awaited the old Promise, another caller may have
176
180
  // invalidated it and installed a newer authoritative generation.
177
181
  if (cache?.get(key) !== transformed) {
182
+ if (preparing)
183
+ return undefined;
178
184
  continue;
179
185
  }
180
186
  // A generation captured while native notifications were trusted keeps
@@ -187,12 +193,17 @@ async function transformTtsc(id, source, options, aliases, cache, hooks) {
187
193
  if (epoch === undefined) {
188
194
  await settleProjectMutationEvents(cached);
189
195
  if (cache?.get(key) !== transformed) {
196
+ if (preparing)
197
+ return undefined;
190
198
  continue;
191
199
  }
192
200
  }
193
201
  await TtscGenerationProof.prepare(cached, file, epoch);
194
- if (cache?.get(key) !== transformed)
202
+ if (cache?.get(key) !== transformed) {
203
+ if (preparing)
204
+ return undefined;
195
205
  continue;
206
+ }
196
207
  // No await between this observation and synchronous admission.
197
208
  const proof = TtscGenerationProof.create(cached, file, epoch);
198
209
  const action = selectCachedGenerationAction({
@@ -204,11 +215,14 @@ async function transformTtsc(id, source, options, aliases, cache, hooks) {
204
215
  generation: transformed,
205
216
  key,
206
217
  source,
218
+ reportDivergence: !preparing,
207
219
  });
208
220
  if (action === "retry") {
209
221
  continue;
210
222
  }
211
223
  if (action === "serve") {
224
+ if (preparing)
225
+ return undefined;
212
226
  return deliverCachedTransform({
213
227
  cache,
214
228
  cached,
@@ -230,6 +244,7 @@ async function transformTtsc(id, source, options, aliases, cache, hooks) {
230
244
  projectRoot: selectedProjectRoot,
231
245
  currentFile: file,
232
246
  currentSource: source,
247
+ reportDivergence: !preparing,
233
248
  // Stamp the pass this compile was started for, not the one it happens
234
249
  // to finish in: a boundary crossed mid-compile leaves the generation
235
250
  // belonging to the earlier pass, so the next pass re-proves it.
@@ -261,10 +276,13 @@ async function transformTtsc(id, source, options, aliases, cache, hooks) {
261
276
  }
262
277
  const generation = transformed;
263
278
  const cached = await awaitOrEvict(cache, key, generation).catch((rejection) => {
264
- notifyRejectedGenerationInputs(hooks, rejection, file, watchSelection);
279
+ if (!preparing)
280
+ notifyRejectedGenerationInputs(hooks, rejection, file, watchSelection);
265
281
  throw rejection;
266
282
  });
267
283
  if (cache !== undefined && cache.get(key) !== generation) {
284
+ if (preparing)
285
+ return undefined;
268
286
  continue;
269
287
  }
270
288
  if (cache !== undefined) {
@@ -284,6 +302,8 @@ async function transformTtsc(id, source, options, aliases, cache, hooks) {
284
302
  policies.set(key, reported);
285
303
  }
286
304
  }
305
+ if (preparing)
306
+ return undefined;
287
307
  return deliverCachedTransform({
288
308
  cache,
289
309
  cached,
@@ -1 +1 @@
1
- {"version":3,"file":"transformTtsc.mjs","sources":["../../../src/core/transform/transformTtsc.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyDG;AACI,eAAe,aAAa,CACjC,EAAU,EACV,MAAc,EACd,OAAoC,EACpC,OAAiB,EACjB,KAA0B,EAC1B,KAA0B,EAAA;AAE1B,IAAA,MAAM,UAAU,GAAG,mBAAmB,CAAC,KAAK,CAAC;AAC7C,IAAA,MAAM,KAAK,GAAG,KAAK,EAAE,SAAS,KAAK,IAAI;AACvC,IAAA,MAAM,KAAK,GAAG,KAAK,GAAG,EAAE,GAAG,UAAU,CAAC,EAAE,CAAC;AACzC,IAAA,IAAI,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;AACxB,QAAA,OAAO,SAAS;IAClB;;;;;IAKA,IAAI,CAAC,KAAK,IAAI,kBAAkB,CAAC,EAAE,CAAC,EAAE;AACpC,QAAA,OAAO,SAAS;IAClB;IACA,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;AAChC,IAAA,IAAI,iBAAiB,CAAC,IAAI,CAAC,EAAE;AAC3B,QAAA,OAAO,SAAS;IAClB;AACA,IAAA,IAAI,kBAAkB,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;AACvC,QAAA,OAAO,SAAS;IAClB;;;AAIA,IAAA,+BAA+B,CAAC,KAAK,EAAE,O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C,wBAAwB,IAAI,EAAE,CAAC;AACzD,YAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,gBAAgB,CAAC,yBAAyB;AAClE,YAAA,IAAI,QAAQ,KAAK,SAAS,EAAE;gBAC1B,IAAI,QAAQ,GAAG,6BAA6B,CAAC,GAAG,CAAC,KAAK,CAAC;AACvD,gBAAA,IAAI,QAAQ,KAAK,SAAS,EAAE;AAC1B,oBAAA,QAAQ,GAAG,IAAI,GAAG,EAAE;AACpB,oBAAA,6BAA6B,CAAC,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAC;gBACpD;AACA,gBAAA,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC;YAC7B;QACF;AACA,QAAA,IAAI,SAAS;AAAE,YAAA,OAAO,SAAS;AAC/B,QAAA,OAAO,sBAAsB,CAAC;YAC5B,KAAK;YACL,MAAM;YACN,UAAU;YACV,GAAG;YACH,KAAK;YACL,IAAI;YACJ,MAAM;YACN,KAAK;AACL,YAAA,SAAS,EAAE,cAAc;AAC1B,SAAA,CAAC;IACJ;AACF;;;;"}
@@ -20,7 +20,7 @@ import type { TtscHostInputValidation } from "./TtscHostInputValidation.cjs";
20
20
  * @evidence contracts/common.md#meaningful-documentation Native prose explains failed admission and successful generation attachment; inline comments justify readable-state, blocker and tree distinctions.
21
21
  * @evidence contracts/portability.md#os-neutral-implementation The generation's filesystem view qualifies metadata and exact native absence. Grouped candidates retain original spelling because directory case policy alone does not define Unicode or short-name equivalence; their joined path follows that view's platform dialect. Physical targets and aliases remain distinct from content identity, and native plugin environment authority is not established by arbitrary filesystem injection.
22
22
  * @evidence contracts/performance.md#bound-retention-and-release-resources The generation retains manifest entries, lexical coverage, raw missing candidates and tree environments proportional to admitted inputs and their path/state text, without a total byte cap or native handle here. Failed attempt records are call-local and diagnostic witness counts are bounded by their owner; replacing or releasing the generation ends manifest ownership.
23
- * @evidence contracts/performance.md#efficient-algorithms Input selection materializes the union of producer lists/proof keys and scans U universal inputs and T plugin source trees. Comparisons include content bytes, physical identity/ancestor/case queries, paired metadata and exact candidate stat; source proof includes tree population/bytes and environment validation. These delegated costs and temporary input/manifest populations are not constant-time map insertion work.
23
+ * @evidence contracts/performance.md#efficient-algorithms Input selection materializes the union of producer lists/proof keys and scans U universal inputs and T plugin source trees. Async-owned environments share one synchronous batch, qualifying common SDK paths once across plugin directories. Comparisons include content bytes, physical identity/ancestor/case queries, paired metadata and exact candidate stat; source proof includes tree population/bytes and environment validation. These delegated costs and temporary input/manifest populations are not constant-time map insertion work.
24
24
  * @evidence contracts/performance.md#reuse-equivalent-work This shared generation manifest records exactly qualified lexical spellings, separable signatures and tree environments for later validators; changed proof requires new admission.
25
25
  */
26
26
  export declare function captureUniversalHostInputValidation(cached: TtscCachedProjectTransform, currentFile: string): {
@@ -20,7 +20,7 @@ import type { TtscHostInputValidation } from "./TtscHostInputValidation.mjs";
20
20
  * @evidence contracts/common.md#meaningful-documentation Native prose explains failed admission and successful generation attachment; inline comments justify readable-state, blocker and tree distinctions.
21
21
  * @evidence contracts/portability.md#os-neutral-implementation The generation's filesystem view qualifies metadata and exact native absence. Grouped candidates retain original spelling because directory case policy alone does not define Unicode or short-name equivalence; their joined path follows that view's platform dialect. Physical targets and aliases remain distinct from content identity, and native plugin environment authority is not established by arbitrary filesystem injection.
22
22
  * @evidence contracts/performance.md#bound-retention-and-release-resources The generation retains manifest entries, lexical coverage, raw missing candidates and tree environments proportional to admitted inputs and their path/state text, without a total byte cap or native handle here. Failed attempt records are call-local and diagnostic witness counts are bounded by their owner; replacing or releasing the generation ends manifest ownership.
23
- * @evidence contracts/performance.md#efficient-algorithms Input selection materializes the union of producer lists/proof keys and scans U universal inputs and T plugin source trees. Comparisons include content bytes, physical identity/ancestor/case queries, paired metadata and exact candidate stat; source proof includes tree population/bytes and environment validation. These delegated costs and temporary input/manifest populations are not constant-time map insertion work.
23
+ * @evidence contracts/performance.md#efficient-algorithms Input selection materializes the union of producer lists/proof keys and scans U universal inputs and T plugin source trees. Async-owned environments share one synchronous batch, qualifying common SDK paths once across plugin directories. Comparisons include content bytes, physical identity/ancestor/case queries, paired metadata and exact candidate stat; source proof includes tree population/bytes and environment validation. These delegated costs and temporary input/manifest populations are not constant-time map insertion work.
24
24
  * @evidence contracts/performance.md#reuse-equivalent-work This shared generation manifest records exactly qualified lexical spellings, separable signatures and tree environments for later validators; changed proof requires new admission.
25
25
  */
26
26
  export declare function captureUniversalHostInputValidation(cached: TtscCachedProjectTransform, currentFile: string): {
@@ -20,7 +20,7 @@ import type { TtscHostInputValidation } from "./TtscHostInputValidation";
20
20
  * @evidence contracts/common.md#meaningful-documentation Native prose explains failed admission and successful generation attachment; inline comments justify readable-state, blocker and tree distinctions.
21
21
  * @evidence contracts/portability.md#os-neutral-implementation The generation's filesystem view qualifies metadata and exact native absence. Grouped candidates retain original spelling because directory case policy alone does not define Unicode or short-name equivalence; their joined path follows that view's platform dialect. Physical targets and aliases remain distinct from content identity, and native plugin environment authority is not established by arbitrary filesystem injection.
22
22
  * @evidence contracts/performance.md#bound-retention-and-release-resources The generation retains manifest entries, lexical coverage, raw missing candidates and tree environments proportional to admitted inputs and their path/state text, without a total byte cap or native handle here. Failed attempt records are call-local and diagnostic witness counts are bounded by their owner; replacing or releasing the generation ends manifest ownership.
23
- * @evidence contracts/performance.md#efficient-algorithms Input selection materializes the union of producer lists/proof keys and scans U universal inputs and T plugin source trees. Comparisons include content bytes, physical identity/ancestor/case queries, paired metadata and exact candidate stat; source proof includes tree population/bytes and environment validation. These delegated costs and temporary input/manifest populations are not constant-time map insertion work.
23
+ * @evidence contracts/performance.md#efficient-algorithms Input selection materializes the union of producer lists/proof keys and scans U universal inputs and T plugin source trees. Async-owned environments share one synchronous batch, qualifying common SDK paths once across plugin directories. Comparisons include content bytes, physical identity/ancestor/case queries, paired metadata and exact candidate stat; source proof includes tree population/bytes and environment validation. These delegated costs and temporary input/manifest populations are not constant-time map insertion work.
24
24
  * @evidence contracts/performance.md#reuse-equivalent-work This shared generation manifest records exactly qualified lexical spellings, separable signatures and tree environments for later validators; changed proof requires new admission.
25
25
  */
26
26
  export declare function captureUniversalHostInputValidation(cached: TtscCachedProjectTransform, currentFile: string): {