@ttsc/unplugin 0.31.0 → 0.31.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 (218) hide show
  1. package/lib/core/bun/bun.d.cts +3 -2
  2. package/lib/core/bun/bun.d.mts +3 -2
  3. package/lib/core/bun/bun.d.ts +3 -2
  4. package/lib/core/bun/bun.js +8 -4
  5. package/lib/core/bun/bun.js.map +1 -1
  6. package/lib/core/bun/bun.mjs +8 -4
  7. package/lib/core/bun/bun.mjs.map +1 -1
  8. package/lib/core/observer/createInputObserver.js +6 -5
  9. package/lib/core/observer/createInputObserver.js.map +1 -1
  10. package/lib/core/observer/createInputObserver.mjs +6 -5
  11. package/lib/core/observer/createInputObserver.mjs.map +1 -1
  12. package/lib/core/observer/openIsolatedRecursiveWatch.d.cts +11 -12
  13. package/lib/core/observer/openIsolatedRecursiveWatch.d.mts +11 -12
  14. package/lib/core/observer/openIsolatedRecursiveWatch.d.ts +11 -12
  15. package/lib/core/observer/openIsolatedRecursiveWatch.js +11 -12
  16. package/lib/core/observer/openIsolatedRecursiveWatch.js.map +1 -1
  17. package/lib/core/observer/openIsolatedRecursiveWatch.mjs +11 -12
  18. package/lib/core/observer/openIsolatedRecursiveWatch.mjs.map +1 -1
  19. package/lib/core/transform/cache/TtscCachedProjectTransform.d.cts +12 -3
  20. package/lib/core/transform/cache/TtscCachedProjectTransform.d.mts +12 -3
  21. package/lib/core/transform/cache/TtscCachedProjectTransform.d.ts +12 -3
  22. package/lib/core/transform/cache/selectCachedGenerationAction.d.cts +2 -0
  23. package/lib/core/transform/cache/selectCachedGenerationAction.d.mts +2 -0
  24. package/lib/core/transform/cache/selectCachedGenerationAction.d.ts +2 -0
  25. package/lib/core/transform/cache/selectCachedGenerationAction.js +1 -1
  26. package/lib/core/transform/cache/selectCachedGenerationAction.js.map +1 -1
  27. package/lib/core/transform/cache/selectCachedGenerationAction.mjs +1 -1
  28. package/lib/core/transform/cache/selectCachedGenerationAction.mjs.map +1 -1
  29. package/lib/core/transform/deliverCachedTransform.d.cts +36 -0
  30. package/lib/core/transform/deliverCachedTransform.d.mts +36 -0
  31. package/lib/core/transform/deliverCachedTransform.d.ts +36 -0
  32. package/lib/core/transform/deliverCachedTransform.js +73 -0
  33. package/lib/core/transform/deliverCachedTransform.js.map +1 -0
  34. package/lib/core/transform/deliverCachedTransform.mjs +71 -0
  35. package/lib/core/transform/deliverCachedTransform.mjs.map +1 -0
  36. package/lib/core/transform/envelope/selectDeclaredProjectInputKeys.d.cts +2 -2
  37. package/lib/core/transform/envelope/selectDeclaredProjectInputKeys.d.mts +2 -2
  38. package/lib/core/transform/envelope/selectDeclaredProjectInputKeys.d.ts +2 -2
  39. package/lib/core/transform/envelope/selectDeclaredProjectInputKeys.js +6 -2
  40. package/lib/core/transform/envelope/selectDeclaredProjectInputKeys.js.map +1 -1
  41. package/lib/core/transform/envelope/selectDeclaredProjectInputKeys.mjs +6 -2
  42. package/lib/core/transform/envelope/selectDeclaredProjectInputKeys.mjs.map +1 -1
  43. package/lib/core/transform/envelope/selectExternalInputPaths.d.cts +3 -5
  44. package/lib/core/transform/envelope/selectExternalInputPaths.d.mts +3 -5
  45. package/lib/core/transform/envelope/selectExternalInputPaths.d.ts +3 -5
  46. package/lib/core/transform/envelope/selectExternalInputPaths.js +8 -7
  47. package/lib/core/transform/envelope/selectExternalInputPaths.js.map +1 -1
  48. package/lib/core/transform/envelope/selectExternalInputPaths.mjs +8 -7
  49. package/lib/core/transform/envelope/selectExternalInputPaths.mjs.map +1 -1
  50. package/lib/core/transform/filesystem/TtscTransformFilesystemOperations.d.cts +15 -12
  51. package/lib/core/transform/filesystem/TtscTransformFilesystemOperations.d.mts +15 -12
  52. package/lib/core/transform/filesystem/TtscTransformFilesystemOperations.d.ts +15 -12
  53. package/lib/core/transform/generation/selectTransformAttemptDisposition.d.cts +3 -1
  54. package/lib/core/transform/generation/selectTransformAttemptDisposition.d.mts +3 -1
  55. package/lib/core/transform/generation/selectTransformAttemptDisposition.d.ts +3 -1
  56. package/lib/core/transform/generation/selectTransformAttemptDisposition.js +3 -1
  57. package/lib/core/transform/generation/selectTransformAttemptDisposition.js.map +1 -1
  58. package/lib/core/transform/generation/selectTransformAttemptDisposition.mjs +3 -1
  59. package/lib/core/transform/generation/selectTransformAttemptDisposition.mjs.map +1 -1
  60. package/lib/core/transform/generation/transformProject.d.cts +9 -7
  61. package/lib/core/transform/generation/transformProject.d.mts +9 -7
  62. package/lib/core/transform/generation/transformProject.d.ts +9 -7
  63. package/lib/core/transform/generation/transformProject.js +14 -9
  64. package/lib/core/transform/generation/transformProject.js.map +1 -1
  65. package/lib/core/transform/generation/transformProject.mjs +14 -9
  66. package/lib/core/transform/generation/transformProject.mjs.map +1 -1
  67. package/lib/core/transform/inputs/preparePluginBuildEnvironments.d.cts +11 -4
  68. package/lib/core/transform/inputs/preparePluginBuildEnvironments.d.mts +11 -4
  69. package/lib/core/transform/inputs/preparePluginBuildEnvironments.d.ts +11 -4
  70. package/lib/core/transform/inputs/preparePluginBuildEnvironments.js +44 -7
  71. package/lib/core/transform/inputs/preparePluginBuildEnvironments.js.map +1 -1
  72. package/lib/core/transform/inputs/preparePluginBuildEnvironments.mjs +44 -7
  73. package/lib/core/transform/inputs/preparePluginBuildEnvironments.mjs.map +1 -1
  74. package/lib/core/transform/tracker/broker/WatchBroker.d.cts +14 -4
  75. package/lib/core/transform/tracker/broker/WatchBroker.d.mts +14 -4
  76. package/lib/core/transform/tracker/broker/WatchBroker.d.ts +14 -4
  77. package/lib/core/transform/tracker/broker/WatchBrokerTransport.d.cts +63 -0
  78. package/lib/core/transform/tracker/broker/WatchBrokerTransport.d.mts +63 -0
  79. package/lib/core/transform/tracker/broker/WatchBrokerTransport.d.ts +63 -0
  80. package/lib/core/transform/tracker/broker/WatchBrokerTransport.js +89 -0
  81. package/lib/core/transform/tracker/broker/WatchBrokerTransport.js.map +1 -0
  82. package/lib/core/transform/tracker/broker/WatchBrokerTransport.mjs +89 -0
  83. package/lib/core/transform/tracker/broker/WatchBrokerTransport.mjs.map +1 -0
  84. package/lib/core/transform/tracker/broker/drainWatchBroker.d.cts +8 -8
  85. package/lib/core/transform/tracker/broker/drainWatchBroker.d.mts +8 -8
  86. package/lib/core/transform/tracker/broker/drainWatchBroker.d.ts +8 -8
  87. package/lib/core/transform/tracker/broker/drainWatchBroker.js +12 -13
  88. package/lib/core/transform/tracker/broker/drainWatchBroker.js.map +1 -1
  89. package/lib/core/transform/tracker/broker/drainWatchBroker.mjs +12 -13
  90. package/lib/core/transform/tracker/broker/drainWatchBroker.mjs.map +1 -1
  91. package/lib/core/transform/tracker/broker/getWatchBroker.d.cts +18 -15
  92. package/lib/core/transform/tracker/broker/getWatchBroker.d.mts +18 -15
  93. package/lib/core/transform/tracker/broker/getWatchBroker.d.ts +18 -15
  94. package/lib/core/transform/tracker/broker/getWatchBroker.js +87 -17
  95. package/lib/core/transform/tracker/broker/getWatchBroker.js.map +1 -1
  96. package/lib/core/transform/tracker/broker/getWatchBroker.mjs +87 -17
  97. package/lib/core/transform/tracker/broker/getWatchBroker.mjs.map +1 -1
  98. package/lib/core/transform/tracker/broker/openBrokeredWatch.d.cts +5 -5
  99. package/lib/core/transform/tracker/broker/openBrokeredWatch.d.mts +5 -5
  100. package/lib/core/transform/tracker/broker/openBrokeredWatch.d.ts +5 -5
  101. package/lib/core/transform/tracker/broker/openBrokeredWatch.js +11 -14
  102. package/lib/core/transform/tracker/broker/openBrokeredWatch.js.map +1 -1
  103. package/lib/core/transform/tracker/broker/openBrokeredWatch.mjs +11 -14
  104. package/lib/core/transform/tracker/broker/openBrokeredWatch.mjs.map +1 -1
  105. package/lib/core/transform/tracker/broker/usesWatchBroker.d.cts +7 -7
  106. package/lib/core/transform/tracker/broker/usesWatchBroker.d.mts +7 -7
  107. package/lib/core/transform/tracker/broker/usesWatchBroker.d.ts +7 -7
  108. package/lib/core/transform/tracker/broker/usesWatchBroker.js +7 -7
  109. package/lib/core/transform/tracker/broker/usesWatchBroker.mjs +7 -7
  110. package/lib/core/transform/tracker/broker/watchBrokerSource.d.cts +9 -10
  111. package/lib/core/transform/tracker/broker/watchBrokerSource.d.mts +9 -10
  112. package/lib/core/transform/tracker/broker/watchBrokerSource.d.ts +9 -10
  113. package/lib/core/transform/tracker/broker/watchBrokerSource.js +10 -11
  114. package/lib/core/transform/tracker/broker/watchBrokerSource.js.map +1 -1
  115. package/lib/core/transform/tracker/broker/watchBrokerSource.mjs +10 -11
  116. package/lib/core/transform/tracker/broker/watchBrokerSource.mjs.map +1 -1
  117. package/lib/core/transform/transformTtsc.d.cts +7 -4
  118. package/lib/core/transform/transformTtsc.d.mts +7 -4
  119. package/lib/core/transform/transformTtsc.d.ts +7 -4
  120. package/lib/core/transform/transformTtsc.js +37 -92
  121. package/lib/core/transform/transformTtsc.js.map +1 -1
  122. package/lib/core/transform/transformTtsc.mjs +37 -92
  123. package/lib/core/transform/transformTtsc.mjs.map +1 -1
  124. package/lib/core/transform/validation/TtscGenerationProof.d.cts +105 -0
  125. package/lib/core/transform/validation/TtscGenerationProof.d.mts +105 -0
  126. package/lib/core/transform/validation/TtscGenerationProof.d.ts +105 -0
  127. package/lib/core/transform/validation/TtscGenerationProof.js +149 -0
  128. package/lib/core/transform/validation/TtscGenerationProof.js.map +1 -0
  129. package/lib/core/transform/validation/TtscGenerationProof.mjs +149 -0
  130. package/lib/core/transform/validation/TtscGenerationProof.mjs.map +1 -0
  131. package/lib/core/transform/validation/matchesCachedSource.d.cts +18 -15
  132. package/lib/core/transform/validation/matchesCachedSource.d.mts +18 -15
  133. package/lib/core/transform/validation/matchesCachedSource.d.ts +18 -15
  134. package/lib/core/transform/validation/matchesCachedSource.js +28 -22
  135. package/lib/core/transform/validation/matchesCachedSource.js.map +1 -1
  136. package/lib/core/transform/validation/matchesCachedSource.mjs +28 -22
  137. package/lib/core/transform/validation/matchesCachedSource.mjs.map +1 -1
  138. package/lib/core/transform/validation/matchesCompleteInputSnapshot.d.cts +3 -2
  139. package/lib/core/transform/validation/matchesCompleteInputSnapshot.d.mts +3 -2
  140. package/lib/core/transform/validation/matchesCompleteInputSnapshot.d.ts +3 -2
  141. package/lib/core/transform/validation/matchesCompleteInputSnapshot.js +4 -4
  142. package/lib/core/transform/validation/matchesCompleteInputSnapshot.js.map +1 -1
  143. package/lib/core/transform/validation/matchesCompleteInputSnapshot.mjs +4 -4
  144. package/lib/core/transform/validation/matchesCompleteInputSnapshot.mjs.map +1 -1
  145. package/lib/core/transform/validation/matchesNarrowPersistentInputs.d.cts +2 -1
  146. package/lib/core/transform/validation/matchesNarrowPersistentInputs.d.mts +2 -1
  147. package/lib/core/transform/validation/matchesNarrowPersistentInputs.d.ts +2 -1
  148. package/lib/core/transform/validation/matchesNarrowPersistentInputs.js +2 -2
  149. package/lib/core/transform/validation/matchesNarrowPersistentInputs.js.map +1 -1
  150. package/lib/core/transform/validation/matchesNarrowPersistentInputs.mjs +2 -2
  151. package/lib/core/transform/validation/matchesNarrowPersistentInputs.mjs.map +1 -1
  152. package/lib/core/transform/validation/matchesUniversalHostInputTrees.d.cts +3 -2
  153. package/lib/core/transform/validation/matchesUniversalHostInputTrees.d.mts +3 -2
  154. package/lib/core/transform/validation/matchesUniversalHostInputTrees.d.ts +3 -2
  155. package/lib/core/transform/validation/matchesUniversalHostInputTrees.js +5 -3
  156. package/lib/core/transform/validation/matchesUniversalHostInputTrees.js.map +1 -1
  157. package/lib/core/transform/validation/matchesUniversalHostInputTrees.mjs +5 -3
  158. package/lib/core/transform/validation/matchesUniversalHostInputTrees.mjs.map +1 -1
  159. package/lib/core/transform/validation/matchesUniversalHostInputs.d.cts +3 -2
  160. package/lib/core/transform/validation/matchesUniversalHostInputs.d.mts +3 -2
  161. package/lib/core/transform/validation/matchesUniversalHostInputs.d.ts +3 -2
  162. package/lib/core/transform/validation/matchesUniversalHostInputs.js +5 -5
  163. package/lib/core/transform/validation/matchesUniversalHostInputs.js.map +1 -1
  164. package/lib/core/transform/validation/matchesUniversalHostInputs.mjs +5 -5
  165. package/lib/core/transform/validation/matchesUniversalHostInputs.mjs.map +1 -1
  166. package/lib/core/transform/validation/nativeInputPredicatesHold.d.cts +5 -4
  167. package/lib/core/transform/validation/nativeInputPredicatesHold.d.mts +5 -4
  168. package/lib/core/transform/validation/nativeInputPredicatesHold.d.ts +5 -4
  169. package/lib/core/transform/validation/nativeInputPredicatesHold.js +31 -12
  170. package/lib/core/transform/validation/nativeInputPredicatesHold.js.map +1 -1
  171. package/lib/core/transform/validation/nativeInputPredicatesHold.mjs +31 -12
  172. package/lib/core/transform/validation/nativeInputPredicatesHold.mjs.map +1 -1
  173. package/lib/core/transform/validation/notificationsProveProgramUnchanged.d.cts +2 -1
  174. package/lib/core/transform/validation/notificationsProveProgramUnchanged.d.mts +2 -1
  175. package/lib/core/transform/validation/notificationsProveProgramUnchanged.d.ts +2 -1
  176. package/lib/core/transform/validation/notificationsProveProgramUnchanged.js +2 -2
  177. package/lib/core/transform/validation/notificationsProveProgramUnchanged.js.map +1 -1
  178. package/lib/core/transform/validation/notificationsProveProgramUnchanged.mjs +2 -2
  179. package/lib/core/transform/validation/notificationsProveProgramUnchanged.mjs.map +1 -1
  180. package/lib/core/transform/watch/notifyWatchInputs.js +3 -0
  181. package/lib/core/transform/watch/notifyWatchInputs.js.map +1 -1
  182. package/lib/core/transform/watch/notifyWatchInputs.mjs +3 -0
  183. package/lib/core/transform/watch/notifyWatchInputs.mjs.map +1 -1
  184. package/lib/core/turbopack/turbopack.js +2 -1
  185. package/lib/core/turbopack/turbopack.js.map +1 -1
  186. package/lib/core/turbopack/turbopack.mjs +2 -1
  187. package/lib/core/turbopack/turbopack.mjs.map +1 -1
  188. package/package.json +3 -3
  189. package/src/core/bun/bun.ts +8 -4
  190. package/src/core/observer/createInputObserver.ts +6 -5
  191. package/src/core/observer/openIsolatedRecursiveWatch.ts +11 -12
  192. package/src/core/transform/cache/TtscCachedProjectTransform.ts +13 -3
  193. package/src/core/transform/cache/selectCachedGenerationAction.ts +9 -1
  194. package/src/core/transform/deliverCachedTransform.ts +97 -0
  195. package/src/core/transform/envelope/selectDeclaredProjectInputKeys.ts +5 -2
  196. package/src/core/transform/envelope/selectExternalInputPaths.ts +7 -7
  197. package/src/core/transform/filesystem/TtscTransformFilesystemOperations.ts +15 -12
  198. package/src/core/transform/generation/selectTransformAttemptDisposition.ts +3 -1
  199. package/src/core/transform/generation/transformProject.ts +13 -9
  200. package/src/core/transform/inputs/preparePluginBuildEnvironments.ts +41 -7
  201. package/src/core/transform/tracker/broker/WatchBroker.ts +15 -4
  202. package/src/core/transform/tracker/broker/WatchBrokerTransport.ts +82 -0
  203. package/src/core/transform/tracker/broker/drainWatchBroker.ts +12 -13
  204. package/src/core/transform/tracker/broker/getWatchBroker.ts +89 -18
  205. package/src/core/transform/tracker/broker/openBrokeredWatch.ts +11 -14
  206. package/src/core/transform/tracker/broker/usesWatchBroker.ts +7 -7
  207. package/src/core/transform/tracker/broker/watchBrokerSource.ts +10 -11
  208. package/src/core/transform/transformTtsc.ts +36 -92
  209. package/src/core/transform/validation/TtscGenerationProof.ts +201 -0
  210. package/src/core/transform/validation/matchesCachedSource.ts +27 -21
  211. package/src/core/transform/validation/matchesCompleteInputSnapshot.ts +5 -3
  212. package/src/core/transform/validation/matchesNarrowPersistentInputs.ts +3 -1
  213. package/src/core/transform/validation/matchesUniversalHostInputTrees.ts +6 -2
  214. package/src/core/transform/validation/matchesUniversalHostInputs.ts +6 -4
  215. package/src/core/transform/validation/nativeInputPredicatesHold.ts +36 -14
  216. package/src/core/transform/validation/notificationsProveProgramUnchanged.ts +3 -1
  217. package/src/core/transform/watch/notifyWatchInputs.ts +3 -0
  218. package/src/core/turbopack/turbopack.ts +2 -1
@@ -1,15 +1,16 @@
1
1
  import { WATCH_PROBE_TIMEOUT_MS } from './WATCH_PROBE_TIMEOUT_MS.mjs';
2
+ import { WatchBrokerTransport } from './WatchBrokerTransport.mjs';
2
3
 
3
4
  /**
4
5
  * Ask the watch broker to acknowledge, and resolve with whether it did.
5
6
  *
6
- * The child answers after two turns of its own loop, so a watch callback it had
7
- * already queued has run, and the ordered IPC channel puts every message it
8
- * sent before the reply ahead of the reply. That is the same proof an
9
- * in-process watcher gets from a macrotask turn, rather than the fixed wait
10
- * this replaces, which guessed at the crossing (samchon/ttsc#1272). On macOS
11
- * the child answers once each stream it can prove has delivered a probe, which
12
- * takes the service's latency (samchon/ttsc#1453).
7
+ * Windows answers after consuming currently queued native completions to an
8
+ * observed empty port. macOS answers once each provable stream has delivered a
9
+ * probe, including the service's latency (#1453). Ordered transport applies
10
+ * every preceding event before the reply. These are current backend frontiers,
11
+ * not atomic timestamp classification of concurrent writes. The optional direct
12
+ * fs.watch program retains its explicit two-turn frontier for protocol tests;
13
+ * it does not supply Windows production proof (#1719).
13
14
  *
14
15
  * A broker that never answers must not hold a delivery, so the wait gives up
15
16
  * after a threshold of twice the probe timeout: the child itself gives up on a
@@ -49,7 +50,7 @@ import { WATCH_PROBE_TIMEOUT_MS } from './WATCH_PROBE_TIMEOUT_MS.mjs';
49
50
  * Native paragraphs and parameters explain ordering, coverage, sharing and
50
51
  * false deadlines under the documentation skill.
51
52
  * @evidence contracts/portability.md#os-neutral-implementation
52
- * OS-neutral host delivery delegates Windows loop ordering and macOS stream
53
+ * OS-neutral host delivery delegates Windows completion-port drainage and macOS stream
53
54
  * probing to the native broker rather than applying one universal timing guess.
54
55
  * @evidence contracts/performance.md#efficient-algorithms
55
56
  * A covering memo query uses fixed identity/id lookup. New requests copy all N
@@ -106,8 +107,7 @@ function startWatchBrokerDrain(broker, timeout, scope) {
106
107
  broker.drainScopes?.delete(id);
107
108
  broker.pendingDrains -= 1;
108
109
  if (broker.pendingDrains === 0 && broker.pendingRegistrations === 0) {
109
- broker.child.unref();
110
- broker.child.channel?.unref?.();
110
+ WatchBrokerTransport.reference(broker, false);
111
111
  }
112
112
  resolve(answered);
113
113
  };
@@ -117,12 +117,11 @@ function startWatchBrokerDrain(broker, timeout, scope) {
117
117
  // the reference the loop can empty while a delivery waits here, and the
118
118
  // process exits mid-build with nothing to report.
119
119
  broker.pendingDrains += 1;
120
- broker.child.ref();
121
- broker.child.channel?.ref?.();
120
+ WatchBrokerTransport.reference(broker, true);
122
121
  const timer = setTimeout(() => release(false), timeout);
123
122
  broker.drains.set(id, release);
124
123
  (broker.drainScopes ??= new Map()).set(id, scope);
125
- if (broker.child.send?.({ id, op: "drain" }) !== true) {
124
+ if (WatchBrokerTransport.send(broker, { id, op: "drain" }) !== true) {
126
125
  release(false);
127
126
  }
128
127
  });
@@ -1 +1 @@
1
- {"version":3,"file":"drainWatchBroker.mjs","sources":["../../../../../src/core/transform/tracker/broker/drainWatchBroker.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuEG;AACG,SAAU,gBAAgB,CAC9B,MAAmB,EACnB,UAAkB,CAAC,GAAG,sBAAsB,EAC5C,YAAqB,EAAA;;;AAIrB,IAAA,IACE,MAAM,CAAC,QAAQ,KAAK,SAAS;SAC5B,YAAY,KAAK,SAAS;YACzB,MAAM,CAAC,aAAa,EAAE,GAAG,CAAC,YAAY,CAAC,KAAK,IAAI,CAAC,EACnD;QACA,OAAO,MAAM,CAAC,QAAQ;IACxB;IACA,MAAM,KAAK,GAAG,IAAI,GAAG,CACnB,CAAC,GAAG,MAAM,CAAC,aAAa;AACrB,SAAA,MAAM,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,KAAK,CAAC,MAAM;SAClC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,CACrB;AACD,IAAA,MAAM,QAAQ,GAAqB,qBAAqB,CACtD,MAAM,EACN,OAAO,EACP,KAAK,CACN,CAAC,OAAO,CAAC,MAAK;AACb,QAAA,IAAI,MAAM,CAAC,QAAQ,KAAK,QAAQ,EAAE;AAChC,YAAA,MAAM,CAAC,QA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C,GAAG,CAAC,EAAE,EAAE,OAAO,CAAC;AAC9B,QAAA,CAAC,MAAM,CAAC,WAAW,KAAK,IAAI,GAAG,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,KAAK,CAAC;AACjD,QAAA,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,KAAK,IAAI,EAAE;YACrD,OAAO,CAAC,KAAK,CAAC;QAChB;AACF,IAAA,CAAC,CAAC;AACJ;;;;"}
1
+ {"version":3,"file":"drainWatchBroker.mjs","sources":["../../../../../src/core/transform/tracker/broker/drainWatchBroker.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuEG;AACG,SAAU,gBAAgB,CAC9B,MAAmB,EACnB,UAAkB,CAAC,GAAG,sBAAsB,EAC5C,YAAqB,EAAA;;;AAIrB,IAAA,IACE,MAAM,CAAC,QAAQ,KAAK,SAAS;SAC5B,YAAY,KAAK,SAAS;YACzB,MAAM,CAAC,aAAa,EAAE,GAAG,CAAC,YAAY,CAAC,KAAK,IAAI,CAAC,EACnD;QACA,OAAO,MAAM,CAAC,QAAQ;IACxB;IACA,MAAM,KAAK,GAAG,IAAI,GAAG,CACnB,CAAC,GAAG,MAAM,CAAC,aAAa;AACrB,SAAA,MAAM,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,KAAK,CAAC,MAAM;SAClC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,CACrB;AACD,IAAA,MAAM,QAAQ,GAAqB,qBAAqB,CACtD,MAAM,EACN,OAAO,EACP,KAAK,CACN,CAAC,OAAO,CAAC,MAAK;AACb,QAAA,IAAI,MAAM,CAAC,QAAQ,KAAK,QAAQ,EAAE;AAChC,YAAA,MAAM,CAAC,QAAQ,GAAG,SAAS;AAC3B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AE,GAAG,CAAC,EAAE,EAAE,KAAK,CAAC;AACjD,QAAA,IAAI,oBAAoB,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,KAAK,IAAI,EAAE;YACnE,OAAO,CAAC,KAAK,CAAC;QAChB;AACF,IAAA,CAAC,CAAC;AACJ;;;;"}
@@ -6,11 +6,11 @@ import type { WatchBroker } from "./WatchBroker.cjs";
6
6
  * caller-supplied watch capabilities can bypass it. Isolation has a reason on
7
7
  * each native backend:
8
8
  *
9
- * - Node's Windows fs-event backend can hit a native assertion that aborts the
10
- * whole process when a watched temporary tree is deleted. In the child that
11
- * crash becomes an ordinary exit that fails the affected trackers, and those
12
- * generations fall back to proving themselves from recorded state instead of
13
- * taking the host down.
9
+ * - Windows runs ttsc's native completion-port helper directly. Its directory
10
+ * filter excludes access-time notifications: reads must not masquerade as
11
+ * writes (#1719). Actual writes, metadata changes, native loss and failed
12
+ * coverage remain observable; equal bytes cannot erase an A-B-A event. No
13
+ * Node fs-event handle is opened in the host or an intermediate process.
14
14
  * - On macOS, libuv serves every directory watch of one event loop through a
15
15
  * single FSEventStream and re-creates it whenever any watch in that loop
16
16
  * opens or closes, losing the events in between (samchon/ttsc#1418), and it
@@ -19,10 +19,11 @@ import type { WatchBroker } from "./WatchBroker.cjs";
19
19
  * passes each drop on as a gap (samchon/ttsc#1425); see
20
20
  * {@link watchBrokerSource}.
21
21
  *
22
- * Registration/drain owners unreference the child and IPC channel after their
22
+ * Registration/drain owners unreference the child and its transport after their
23
23
  * outstanding acknowledgments finish; startup itself returns a referenced
24
- * child. Last-registration closure attempts disconnection and termination. This
25
- * accessor has no independent shutdown deadline or exit wait.
24
+ * child. Last-registration closure ends the request stream and attempts
25
+ * termination. This accessor has no independent shutdown deadline or exit
26
+ * wait.
26
27
  *
27
28
  * @evidence contracts/common.md#principled-implementation
28
29
  * Native watches run in a protocol child. Error/exit dispatch reports failure
@@ -38,13 +39,15 @@ import type { WatchBroker } from "./WatchBroker.cjs";
38
39
  * Native platform-reason list and lifecycle paragraph explain isolation and
39
40
  * process ownership under the documentation skill.
40
41
  * @evidence contracts/portability.md#os-neutral-implementation
41
- * OS-neutral startup uses this process's executable and argument-array spawn;
42
- * native FSEvents loading and platform differences remain in this boundary.
42
+ * Windows resolves the same ttsc binary as its compiler owner and uses the
43
+ * native __watch command; macOS uses this runtime and supported FSEvents.
44
+ * Argument-array spawn, hidden Windows processes and ordered transport stay
45
+ * inside this boundary.
43
46
  * @evidence contracts/performance.md#efficient-algorithms
44
- * A current-holder read is fixed work. Cold startup includes optional native
45
- * module resolution/warning, child source construction and native process/IPC
46
- * creation; resolution/path/source bytes and process startup cost do not
47
- * vanish into one spawn call. Failure visits R registrations and D drain
47
+ * A current-holder read is fixed work. Windows cold startup resolves the ttsc
48
+ * binary and opens native protocol pipes; macOS resolves the optional binding,
49
+ * reports missing capability and constructs its child program and IPC channel.
50
+ * Resolution/path/source bytes and native process startup cost remain real. Failure visits R registrations and D drain
48
51
  * callbacks, whose native/reference/sink work remains delegated; it does not
49
52
  * enumerate watched source trees.
50
53
  * Enabled private tracing serializes the actual executable/source argv and
@@ -56,7 +59,7 @@ import type { WatchBroker } from "./WatchBroker.cjs";
56
59
  * a health certificate; binding installation changes are not re-resolved
57
60
  * while it remains current, and sink exceptions can interrupt failure handling.
58
61
  * @evidence contracts/performance.md#bound-retention-and-release-resources
59
- * One current module holder retains a child and registration/drain maps;
62
+ * One current module holder retains a direct child and registration/drain maps;
60
63
  * those populations and caller-retained retired brokers have no cap here.
61
64
  * Request owners manage references/timers, and last closure attempts native
62
65
  * disconnection/kill rather than proving exit. Completed failure routing
@@ -6,11 +6,11 @@ import type { WatchBroker } from "./WatchBroker.mjs";
6
6
  * caller-supplied watch capabilities can bypass it. Isolation has a reason on
7
7
  * each native backend:
8
8
  *
9
- * - Node's Windows fs-event backend can hit a native assertion that aborts the
10
- * whole process when a watched temporary tree is deleted. In the child that
11
- * crash becomes an ordinary exit that fails the affected trackers, and those
12
- * generations fall back to proving themselves from recorded state instead of
13
- * taking the host down.
9
+ * - Windows runs ttsc's native completion-port helper directly. Its directory
10
+ * filter excludes access-time notifications: reads must not masquerade as
11
+ * writes (#1719). Actual writes, metadata changes, native loss and failed
12
+ * coverage remain observable; equal bytes cannot erase an A-B-A event. No
13
+ * Node fs-event handle is opened in the host or an intermediate process.
14
14
  * - On macOS, libuv serves every directory watch of one event loop through a
15
15
  * single FSEventStream and re-creates it whenever any watch in that loop
16
16
  * opens or closes, losing the events in between (samchon/ttsc#1418), and it
@@ -19,10 +19,11 @@ import type { WatchBroker } from "./WatchBroker.mjs";
19
19
  * passes each drop on as a gap (samchon/ttsc#1425); see
20
20
  * {@link watchBrokerSource}.
21
21
  *
22
- * Registration/drain owners unreference the child and IPC channel after their
22
+ * Registration/drain owners unreference the child and its transport after their
23
23
  * outstanding acknowledgments finish; startup itself returns a referenced
24
- * child. Last-registration closure attempts disconnection and termination. This
25
- * accessor has no independent shutdown deadline or exit wait.
24
+ * child. Last-registration closure ends the request stream and attempts
25
+ * termination. This accessor has no independent shutdown deadline or exit
26
+ * wait.
26
27
  *
27
28
  * @evidence contracts/common.md#principled-implementation
28
29
  * Native watches run in a protocol child. Error/exit dispatch reports failure
@@ -38,13 +39,15 @@ import type { WatchBroker } from "./WatchBroker.mjs";
38
39
  * Native platform-reason list and lifecycle paragraph explain isolation and
39
40
  * process ownership under the documentation skill.
40
41
  * @evidence contracts/portability.md#os-neutral-implementation
41
- * OS-neutral startup uses this process's executable and argument-array spawn;
42
- * native FSEvents loading and platform differences remain in this boundary.
42
+ * Windows resolves the same ttsc binary as its compiler owner and uses the
43
+ * native __watch command; macOS uses this runtime and supported FSEvents.
44
+ * Argument-array spawn, hidden Windows processes and ordered transport stay
45
+ * inside this boundary.
43
46
  * @evidence contracts/performance.md#efficient-algorithms
44
- * A current-holder read is fixed work. Cold startup includes optional native
45
- * module resolution/warning, child source construction and native process/IPC
46
- * creation; resolution/path/source bytes and process startup cost do not
47
- * vanish into one spawn call. Failure visits R registrations and D drain
47
+ * A current-holder read is fixed work. Windows cold startup resolves the ttsc
48
+ * binary and opens native protocol pipes; macOS resolves the optional binding,
49
+ * reports missing capability and constructs its child program and IPC channel.
50
+ * Resolution/path/source bytes and native process startup cost remain real. Failure visits R registrations and D drain
48
51
  * callbacks, whose native/reference/sink work remains delegated; it does not
49
52
  * enumerate watched source trees.
50
53
  * Enabled private tracing serializes the actual executable/source argv and
@@ -56,7 +59,7 @@ import type { WatchBroker } from "./WatchBroker.mjs";
56
59
  * a health certificate; binding installation changes are not re-resolved
57
60
  * while it remains current, and sink exceptions can interrupt failure handling.
58
61
  * @evidence contracts/performance.md#bound-retention-and-release-resources
59
- * One current module holder retains a child and registration/drain maps;
62
+ * One current module holder retains a direct child and registration/drain maps;
60
63
  * those populations and caller-retained retired brokers have no cap here.
61
64
  * Request owners manage references/timers, and last closure attempts native
62
65
  * disconnection/kill rather than proving exit. Completed failure routing
@@ -6,11 +6,11 @@ import type { WatchBroker } from "./WatchBroker";
6
6
  * caller-supplied watch capabilities can bypass it. Isolation has a reason on
7
7
  * each native backend:
8
8
  *
9
- * - Node's Windows fs-event backend can hit a native assertion that aborts the
10
- * whole process when a watched temporary tree is deleted. In the child that
11
- * crash becomes an ordinary exit that fails the affected trackers, and those
12
- * generations fall back to proving themselves from recorded state instead of
13
- * taking the host down.
9
+ * - Windows runs ttsc's native completion-port helper directly. Its directory
10
+ * filter excludes access-time notifications: reads must not masquerade as
11
+ * writes (#1719). Actual writes, metadata changes, native loss and failed
12
+ * coverage remain observable; equal bytes cannot erase an A-B-A event. No
13
+ * Node fs-event handle is opened in the host or an intermediate process.
14
14
  * - On macOS, libuv serves every directory watch of one event loop through a
15
15
  * single FSEventStream and re-creates it whenever any watch in that loop
16
16
  * opens or closes, losing the events in between (samchon/ttsc#1418), and it
@@ -19,10 +19,11 @@ import type { WatchBroker } from "./WatchBroker";
19
19
  * passes each drop on as a gap (samchon/ttsc#1425); see
20
20
  * {@link watchBrokerSource}.
21
21
  *
22
- * Registration/drain owners unreference the child and IPC channel after their
22
+ * Registration/drain owners unreference the child and its transport after their
23
23
  * outstanding acknowledgments finish; startup itself returns a referenced
24
- * child. Last-registration closure attempts disconnection and termination. This
25
- * accessor has no independent shutdown deadline or exit wait.
24
+ * child. Last-registration closure ends the request stream and attempts
25
+ * termination. This accessor has no independent shutdown deadline or exit
26
+ * wait.
26
27
  *
27
28
  * @evidence contracts/common.md#principled-implementation
28
29
  * Native watches run in a protocol child. Error/exit dispatch reports failure
@@ -38,13 +39,15 @@ import type { WatchBroker } from "./WatchBroker";
38
39
  * Native platform-reason list and lifecycle paragraph explain isolation and
39
40
  * process ownership under the documentation skill.
40
41
  * @evidence contracts/portability.md#os-neutral-implementation
41
- * OS-neutral startup uses this process's executable and argument-array spawn;
42
- * native FSEvents loading and platform differences remain in this boundary.
42
+ * Windows resolves the same ttsc binary as its compiler owner and uses the
43
+ * native __watch command; macOS uses this runtime and supported FSEvents.
44
+ * Argument-array spawn, hidden Windows processes and ordered transport stay
45
+ * inside this boundary.
43
46
  * @evidence contracts/performance.md#efficient-algorithms
44
- * A current-holder read is fixed work. Cold startup includes optional native
45
- * module resolution/warning, child source construction and native process/IPC
46
- * creation; resolution/path/source bytes and process startup cost do not
47
- * vanish into one spawn call. Failure visits R registrations and D drain
47
+ * A current-holder read is fixed work. Windows cold startup resolves the ttsc
48
+ * binary and opens native protocol pipes; macOS resolves the optional binding,
49
+ * reports missing capability and constructs its child program and IPC channel.
50
+ * Resolution/path/source bytes and native process startup cost remain real. Failure visits R registrations and D drain
48
51
  * callbacks, whose native/reference/sink work remains delegated; it does not
49
52
  * enumerate watched source trees.
50
53
  * Enabled private tracing serializes the actual executable/source argv and
@@ -56,7 +59,7 @@ import type { WatchBroker } from "./WatchBroker";
56
59
  * a health certificate; binding installation changes are not re-resolved
57
60
  * while it remains current, and sink exceptions can interrupt failure handling.
58
61
  * @evidence contracts/performance.md#bound-retention-and-release-resources
59
- * One current module holder retains a child and registration/drain maps;
62
+ * One current module holder retains a direct child and registration/drain maps;
60
63
  * those populations and caller-retained retired brokers have no cap here.
61
64
  * Request owners manage references/timers, and last closure attempts native
62
65
  * disconnection/kill rather than proving exit. Completed failure routing
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ var readline = require('node:readline');
4
+ var binary = require('ttsc/binary');
3
5
  var traceProcessSpawn = require('../../../tracing/traceProcessSpawn.js');
4
6
  var WATCH_BROKER = require('./WATCH_BROKER.js');
5
7
  var fseventsBindingPath = require('./fseventsBindingPath.js');
@@ -14,11 +16,11 @@ var watchBrokerSource = require('./watchBrokerSource.js');
14
16
  * caller-supplied watch capabilities can bypass it. Isolation has a reason on
15
17
  * each native backend:
16
18
  *
17
- * - Node's Windows fs-event backend can hit a native assertion that aborts the
18
- * whole process when a watched temporary tree is deleted. In the child that
19
- * crash becomes an ordinary exit that fails the affected trackers, and those
20
- * generations fall back to proving themselves from recorded state instead of
21
- * taking the host down.
19
+ * - Windows runs ttsc's native completion-port helper directly. Its directory
20
+ * filter excludes access-time notifications: reads must not masquerade as
21
+ * writes (#1719). Actual writes, metadata changes, native loss and failed
22
+ * coverage remain observable; equal bytes cannot erase an A-B-A event. No
23
+ * Node fs-event handle is opened in the host or an intermediate process.
22
24
  * - On macOS, libuv serves every directory watch of one event loop through a
23
25
  * single FSEventStream and re-creates it whenever any watch in that loop
24
26
  * opens or closes, losing the events in between (samchon/ttsc#1418), and it
@@ -27,10 +29,11 @@ var watchBrokerSource = require('./watchBrokerSource.js');
27
29
  * passes each drop on as a gap (samchon/ttsc#1425); see
28
30
  * {@link watchBrokerSource}.
29
31
  *
30
- * Registration/drain owners unreference the child and IPC channel after their
32
+ * Registration/drain owners unreference the child and its transport after their
31
33
  * outstanding acknowledgments finish; startup itself returns a referenced
32
- * child. Last-registration closure attempts disconnection and termination. This
33
- * accessor has no independent shutdown deadline or exit wait.
34
+ * child. Last-registration closure ends the request stream and attempts
35
+ * termination. This accessor has no independent shutdown deadline or exit
36
+ * wait.
34
37
  *
35
38
  * @evidence contracts/common.md#principled-implementation
36
39
  * Native watches run in a protocol child. Error/exit dispatch reports failure
@@ -46,13 +49,15 @@ var watchBrokerSource = require('./watchBrokerSource.js');
46
49
  * Native platform-reason list and lifecycle paragraph explain isolation and
47
50
  * process ownership under the documentation skill.
48
51
  * @evidence contracts/portability.md#os-neutral-implementation
49
- * OS-neutral startup uses this process's executable and argument-array spawn;
50
- * native FSEvents loading and platform differences remain in this boundary.
52
+ * Windows resolves the same ttsc binary as its compiler owner and uses the
53
+ * native __watch command; macOS uses this runtime and supported FSEvents.
54
+ * Argument-array spawn, hidden Windows processes and ordered transport stay
55
+ * inside this boundary.
51
56
  * @evidence contracts/performance.md#efficient-algorithms
52
- * A current-holder read is fixed work. Cold startup includes optional native
53
- * module resolution/warning, child source construction and native process/IPC
54
- * creation; resolution/path/source bytes and process startup cost do not
55
- * vanish into one spawn call. Failure visits R registrations and D drain
57
+ * A current-holder read is fixed work. Windows cold startup resolves the ttsc
58
+ * binary and opens native protocol pipes; macOS resolves the optional binding,
59
+ * reports missing capability and constructs its child program and IPC channel.
60
+ * Resolution/path/source bytes and native process startup cost remain real. Failure visits R registrations and D drain
56
61
  * callbacks, whose native/reference/sink work remains delegated; it does not
57
62
  * enumerate watched source trees.
58
63
  * Enabled private tracing serializes the actual executable/source argv and
@@ -64,7 +69,7 @@ var watchBrokerSource = require('./watchBrokerSource.js');
64
69
  * a health certificate; binding installation changes are not re-resolved
65
70
  * while it remains current, and sink exceptions can interrupt failure handling.
66
71
  * @evidence contracts/performance.md#bound-retention-and-release-resources
67
- * One current module holder retains a child and registration/drain maps;
72
+ * One current module holder retains a direct child and registration/drain maps;
68
73
  * those populations and caller-retained retired brokers have no cap here.
69
74
  * Request owners manage references/timers, and last closure attempts native
70
75
  * disconnection/kill rather than proving exit. Completed failure routing
@@ -78,8 +83,14 @@ function getWatchBroker() {
78
83
  const fsevents = process.platform === "darwin" ? fseventsBindingPath.fseventsBindingPath() : undefined;
79
84
  if (fsevents === null)
80
85
  warnMissingFseventsBinding.warnMissingFseventsBinding();
81
- const child = traceProcessSpawn.traceProcessSpawn(process.execPath, ["-e", watchBrokerSource.watchBrokerSource(fsevents)], {
82
- stdio: ["ignore", "ignore", "ignore", "ipc"],
86
+ const native = process.platform === "win32";
87
+ const binary$1 = native ? binary.resolveBinary() : process.execPath;
88
+ if (binary$1 === null)
89
+ throw new Error("No ttsc native watch helper is available");
90
+ const child = traceProcessSpawn.traceProcessSpawn(binary$1, native ? ["__watch"] : ["-e", watchBrokerSource.watchBrokerSource(fsevents)], {
91
+ stdio: native
92
+ ? ["pipe", "pipe", "ignore"]
93
+ : ["ignore", "ignore", "ignore", "ipc"],
83
94
  windowsHide: true,
84
95
  });
85
96
  const broker = {
@@ -108,6 +119,65 @@ function getWatchBroker() {
108
119
  WATCH_BROKER.WATCH_BROKER.current = undefined;
109
120
  }
110
121
  };
122
+ if (native) {
123
+ // All Windows registrations share one direct native child. No Node watcher,
124
+ // nested child, global runtime patch, or access-time system change is needed.
125
+ const input = child.stdin;
126
+ const output = child.stdout;
127
+ if (input === null || output === null) {
128
+ child.kill();
129
+ throw new Error("The native watch helper has no protocol pipes");
130
+ }
131
+ broker.transport = {
132
+ send(message) {
133
+ if (input.destroyed || input.writableEnded)
134
+ return false;
135
+ // write(false) means buffered backpressure, not refusal. The callback
136
+ // reports a real transport failure to every still-live registration.
137
+ input.write(JSON.stringify(message) + "\n", (error) => {
138
+ if (error !== null && error !== undefined) {
139
+ fail();
140
+ child.kill();
141
+ }
142
+ });
143
+ return true;
144
+ },
145
+ reference(active) {
146
+ const pipe = output;
147
+ if (active) {
148
+ child.ref();
149
+ pipe.ref?.();
150
+ }
151
+ else {
152
+ child.unref();
153
+ pipe.unref?.();
154
+ }
155
+ },
156
+ close() {
157
+ input.end();
158
+ },
159
+ };
160
+ const lost = () => {
161
+ fail();
162
+ child.kill();
163
+ };
164
+ input.on("error", lost);
165
+ output.on("error", lost);
166
+ output.on("end", lost);
167
+ readline
168
+ .createInterface({ input: output, crlfDelay: Infinity })
169
+ .on("line", (line) => {
170
+ let message;
171
+ try {
172
+ message = JSON.parse(line);
173
+ }
174
+ catch {
175
+ lost();
176
+ return;
177
+ }
178
+ routeWatchBrokerMessage.routeWatchBrokerMessage(broker, message);
179
+ });
180
+ }
111
181
  child.on("error", fail);
112
182
  child.on("exit", fail);
113
183
  child.on("message", (message) => routeWatchBrokerMessage.routeWatchBrokerMessage(broker, message));
@@ -1 +1 @@
1
- {"version":3,"file":"getWatchBroker.js","sources":["../../../../../src/core/transform/tracker/broker/getWatchBroker.ts"],"sourcesContent":[null],"names":["WATCH_BROKER","fseventsBindingPath","warnMissingFseventsBinding","traceProcessSpawn","watchBrokerSource","routeWatchBrokerMessage"],"mappings":";;;;;;;;;AAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+DG;SACa,cAAc,GAAA;AAC5B,IAAA,IAAIA,yBAAY,CAAC,OAAO,KAAK,SAAS,EAAE;QACtC,OAAOA,yBAAY,CAAC,OAAO;IAC7B;AACA,IAAA,MAAM,QAAQ,GACZ,OAAO,CAAC,QAAQ,KAAK,QAAQ,GAAGC,uCAAmB,EAAE,GAAG,SAAS;IACnE,IAAI,QAAQ,KAAK,IAAI;AAAE,QAAAC,qDAA0B,EAAE;AACnD,IAAA,MAAM,KAAK,GAAGC,mCAAiB,CAC7B,OAAO,CAAC,QAAQ,EAChB,CAAC,IAAI,EAAEC,mCAAiB,CAAC,QAAQ,CAAC,CAAC,EACnC;QACE,KAAK,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,CAAC;AAC5C,QAAA,WAAW,EAAE,IAAI;AAClB,KAAA,CACF;AACD,IAAA,MAAM,MAAM,GAAgB;QAC1B,KAAK;QACL,MAAM,EAAE,IAAI,GAAG,EAAE;AACjB,QAAA,MAAM,EAAE,CAAC;AACT,QAAA,aAAa,EAAE,CAAC;AAChB,QAAA,oBAAoB,EAAE,CAAC;AACvB,QAAA,MAAM,EAAE,OAAO,QAAQ,KAAK,QAAQ;QACpC,aAAa,EAAE,IAAI,GAAG,EAAE;KACzB;IACD,MAAM,IAAI,GAAG,MAAW;QACtB,KAAK,MAAM,YAAY,IAAI,MAAM,CAAC,aAAa,CAAC,MAAM,EAAE,EAAE;AACxD,YAAA,YAAY,CAAC,IAAI,CAAC,MAAM,EAAE;YAC1B,YAAY,CAAC,KAAK,EAAE;QACtB;AACA,QAAA,MAAM,CAAC,aAAa,CAAC,KAAK,EAAE;;;;;QAK5B,KAAK,MAAM,OAAO,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE;YAAE,OAAO,CAAC,KAAK,CAAC;AAC5D,QAAA,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE;AACrB,QAAA,IAAIJ,yBAAY,CAAC,OAAO,KAAK,MAAM,EAAE;AACnC,YAAAA,yBAAY,CAAC,OAAO,GAAG,SAAS;QAClC;AACF,IAAA,CAAC;AACD,IAAA,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC;AACvB,IAAA,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC;AACtB,IAAA,KAAK,CAAC,EAAE,CAAC,SAAS,EAAE,CAAC,OAAgB,KACnCK,+CAAuB,CAAC,MAAM,EAAE,OAAO,CAAC,CACzC;AACD,IAAAL,yBAAY,CAAC,OAAO,GAAG,MAAM;AAC7B,IAAA,OAAO,MAAM;AACf;;;;"}
1
+ {"version":3,"file":"getWatchBroker.js","sources":["../../../../../src/core/transform/tracker/broker/getWatchBroker.ts"],"sourcesContent":[null],"names":["WATCH_BROKER","fseventsBindingPath","warnMissingFseventsBinding","binary","resolveBinary","traceProcessSpawn","watchBrokerSource","routeWatchBrokerMessage"],"mappings":";;;;;;;;;;;AAWA;;;;;;;;;;;;;;;;;;;;;;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2
+ import { resolveBinary } from 'ttsc/binary';
1
3
  import { traceProcessSpawn } from '../../../tracing/traceProcessSpawn.mjs';
2
4
  import { WATCH_BROKER } from './WATCH_BROKER.mjs';
3
5
  import { fseventsBindingPath } from './fseventsBindingPath.mjs';
@@ -12,11 +14,11 @@ import { watchBrokerSource } from './watchBrokerSource.mjs';
12
14
  * caller-supplied watch capabilities can bypass it. Isolation has a reason on
13
15
  * each native backend:
14
16
  *
15
- * - Node's Windows fs-event backend can hit a native assertion that aborts the
16
- * whole process when a watched temporary tree is deleted. In the child that
17
- * crash becomes an ordinary exit that fails the affected trackers, and those
18
- * generations fall back to proving themselves from recorded state instead of
19
- * taking the host down.
17
+ * - Windows runs ttsc's native completion-port helper directly. Its directory
18
+ * filter excludes access-time notifications: reads must not masquerade as
19
+ * writes (#1719). Actual writes, metadata changes, native loss and failed
20
+ * coverage remain observable; equal bytes cannot erase an A-B-A event. No
21
+ * Node fs-event handle is opened in the host or an intermediate process.
20
22
  * - On macOS, libuv serves every directory watch of one event loop through a
21
23
  * single FSEventStream and re-creates it whenever any watch in that loop
22
24
  * opens or closes, losing the events in between (samchon/ttsc#1418), and it
@@ -25,10 +27,11 @@ import { watchBrokerSource } from './watchBrokerSource.mjs';
25
27
  * passes each drop on as a gap (samchon/ttsc#1425); see
26
28
  * {@link watchBrokerSource}.
27
29
  *
28
- * Registration/drain owners unreference the child and IPC channel after their
30
+ * Registration/drain owners unreference the child and its transport after their
29
31
  * outstanding acknowledgments finish; startup itself returns a referenced
30
- * child. Last-registration closure attempts disconnection and termination. This
31
- * accessor has no independent shutdown deadline or exit wait.
32
+ * child. Last-registration closure ends the request stream and attempts
33
+ * termination. This accessor has no independent shutdown deadline or exit
34
+ * wait.
32
35
  *
33
36
  * @evidence contracts/common.md#principled-implementation
34
37
  * Native watches run in a protocol child. Error/exit dispatch reports failure
@@ -44,13 +47,15 @@ import { watchBrokerSource } from './watchBrokerSource.mjs';
44
47
  * Native platform-reason list and lifecycle paragraph explain isolation and
45
48
  * process ownership under the documentation skill.
46
49
  * @evidence contracts/portability.md#os-neutral-implementation
47
- * OS-neutral startup uses this process's executable and argument-array spawn;
48
- * native FSEvents loading and platform differences remain in this boundary.
50
+ * Windows resolves the same ttsc binary as its compiler owner and uses the
51
+ * native __watch command; macOS uses this runtime and supported FSEvents.
52
+ * Argument-array spawn, hidden Windows processes and ordered transport stay
53
+ * inside this boundary.
49
54
  * @evidence contracts/performance.md#efficient-algorithms
50
- * A current-holder read is fixed work. Cold startup includes optional native
51
- * module resolution/warning, child source construction and native process/IPC
52
- * creation; resolution/path/source bytes and process startup cost do not
53
- * vanish into one spawn call. Failure visits R registrations and D drain
55
+ * A current-holder read is fixed work. Windows cold startup resolves the ttsc
56
+ * binary and opens native protocol pipes; macOS resolves the optional binding,
57
+ * reports missing capability and constructs its child program and IPC channel.
58
+ * Resolution/path/source bytes and native process startup cost remain real. Failure visits R registrations and D drain
54
59
  * callbacks, whose native/reference/sink work remains delegated; it does not
55
60
  * enumerate watched source trees.
56
61
  * Enabled private tracing serializes the actual executable/source argv and
@@ -62,7 +67,7 @@ import { watchBrokerSource } from './watchBrokerSource.mjs';
62
67
  * a health certificate; binding installation changes are not re-resolved
63
68
  * while it remains current, and sink exceptions can interrupt failure handling.
64
69
  * @evidence contracts/performance.md#bound-retention-and-release-resources
65
- * One current module holder retains a child and registration/drain maps;
70
+ * One current module holder retains a direct child and registration/drain maps;
66
71
  * those populations and caller-retained retired brokers have no cap here.
67
72
  * Request owners manage references/timers, and last closure attempts native
68
73
  * disconnection/kill rather than proving exit. Completed failure routing
@@ -76,8 +81,14 @@ function getWatchBroker() {
76
81
  const fsevents = process.platform === "darwin" ? fseventsBindingPath() : undefined;
77
82
  if (fsevents === null)
78
83
  warnMissingFseventsBinding();
79
- const child = traceProcessSpawn(process.execPath, ["-e", watchBrokerSource(fsevents)], {
80
- stdio: ["ignore", "ignore", "ignore", "ipc"],
84
+ const native = process.platform === "win32";
85
+ const binary = native ? resolveBinary() : process.execPath;
86
+ if (binary === null)
87
+ throw new Error("No ttsc native watch helper is available");
88
+ const child = traceProcessSpawn(binary, native ? ["__watch"] : ["-e", watchBrokerSource(fsevents)], {
89
+ stdio: native
90
+ ? ["pipe", "pipe", "ignore"]
91
+ : ["ignore", "ignore", "ignore", "ipc"],
81
92
  windowsHide: true,
82
93
  });
83
94
  const broker = {
@@ -106,6 +117,65 @@ function getWatchBroker() {
106
117
  WATCH_BROKER.current = undefined;
107
118
  }
108
119
  };
120
+ if (native) {
121
+ // All Windows registrations share one direct native child. No Node watcher,
122
+ // nested child, global runtime patch, or access-time system change is needed.
123
+ const input = child.stdin;
124
+ const output = child.stdout;
125
+ if (input === null || output === null) {
126
+ child.kill();
127
+ throw new Error("The native watch helper has no protocol pipes");
128
+ }
129
+ broker.transport = {
130
+ send(message) {
131
+ if (input.destroyed || input.writableEnded)
132
+ return false;
133
+ // write(false) means buffered backpressure, not refusal. The callback
134
+ // reports a real transport failure to every still-live registration.
135
+ input.write(JSON.stringify(message) + "\n", (error) => {
136
+ if (error !== null && error !== undefined) {
137
+ fail();
138
+ child.kill();
139
+ }
140
+ });
141
+ return true;
142
+ },
143
+ reference(active) {
144
+ const pipe = output;
145
+ if (active) {
146
+ child.ref();
147
+ pipe.ref?.();
148
+ }
149
+ else {
150
+ child.unref();
151
+ pipe.unref?.();
152
+ }
153
+ },
154
+ close() {
155
+ input.end();
156
+ },
157
+ };
158
+ const lost = () => {
159
+ fail();
160
+ child.kill();
161
+ };
162
+ input.on("error", lost);
163
+ output.on("error", lost);
164
+ output.on("end", lost);
165
+ readline
166
+ .createInterface({ input: output, crlfDelay: Infinity })
167
+ .on("line", (line) => {
168
+ let message;
169
+ try {
170
+ message = JSON.parse(line);
171
+ }
172
+ catch {
173
+ lost();
174
+ return;
175
+ }
176
+ routeWatchBrokerMessage(broker, message);
177
+ });
178
+ }
109
179
  child.on("error", fail);
110
180
  child.on("exit", fail);
111
181
  child.on("message", (message) => routeWatchBrokerMessage(broker, message));
@@ -1 +1 @@
1
- {"version":3,"file":"getWatchBroker.mjs","sources":["../../../../../src/core/transform/tracker/broker/getWatchBroker.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+DG;SACa,cAAc,GAAA;AAC5B,IAAA,IAAI,YAAY,CAAC,OAAO,KAAK,SAAS,EAAE;QACtC,OAAO,YAAY,CAAC,OAAO;IAC7B;AACA,IAAA,MAAM,QAAQ,GACZ,OAAO,CAAC,QAAQ,KAAK,QAAQ,GAAG,mBAAmB,EAAE,GAAG,SAAS;IACnE,IAAI,QAAQ,KAAK,IAAI;AAAE,QAAA,0BAA0B,EAAE;AACnD,IAAA,MAAM,KAAK,GAAG,iBAAiB,CAC7B,OAAO,CAAC,QAAQ,EAChB,CAAC,IAAI,EAAE,iBAAiB,CAAC,QAAQ,CAAC,CAAC,EACnC;QACE,KAAK,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,CAAC;AAC5C,QAAA,WAAW,EAAE,IAAI;AAClB,KAAA,CACF;AACD,IAAA,MAAM,MAAM,GAAgB;QAC1B,KAAK;QACL,MAAM,EAAE,IAAI,GAAG,EAAE;AACjB,QAAA,MAAM,EAAE,CAAC;AACT,QAAA,aAAa,EAAE,CAAC;AAChB,QAAA,oBAAoB,EAAE,CAAC;AACvB,QAAA,MAAM,EAAE,OAAO,QAAQ,KAAK,QAAQ;QACpC,aAAa,EAAE,IAAI,GAAG,EAAE;KACzB;IACD,MAAM,IAAI,GAAG,MAAW;QACtB,KAAK,MAAM,YAAY,IAAI,MAAM,CAAC,aAAa,CAAC,MAAM,EAAE,EAAE;AACxD,YAAA,YAAY,CAAC,IAAI,CAAC,MAAM,EAAE;YAC1B,YAAY,CAAC,KAAK,EAAE;QACtB;AACA,QAAA,MAAM,CAAC,aAAa,CAAC,KAAK,EAAE;;;;;QAK5B,K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