@dzhechkov/harness-core 0.8.31 → 0.8.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.dz-manifest.json +97 -37
- package/README.md +30 -0
- package/dist/apply-leg.d.ts +13 -1
- package/dist/apply-leg.d.ts.map +1 -1
- package/dist/apply-leg.js +123 -10
- package/dist/apply-leg.js.map +1 -1
- package/dist/embed-socket-path.d.ts +65 -0
- package/dist/embed-socket-path.d.ts.map +1 -0
- package/dist/embed-socket-path.js +100 -0
- package/dist/embed-socket-path.js.map +1 -0
- package/dist/index.d.ts +9 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/operations.d.ts.map +1 -1
- package/dist/operations.js +66 -3
- package/dist/operations.js.map +1 -1
- package/dist/packed-install-smoke.d.ts +108 -0
- package/dist/packed-install-smoke.d.ts.map +1 -0
- package/dist/packed-install-smoke.js +172 -0
- package/dist/packed-install-smoke.js.map +1 -0
- package/dist/publish-sibling-drift.d.ts +67 -0
- package/dist/publish-sibling-drift.d.ts.map +1 -0
- package/dist/publish-sibling-drift.js +262 -0
- package/dist/publish-sibling-drift.js.map +1 -0
- package/dist/publish.d.ts +44 -0
- package/dist/publish.d.ts.map +1 -1
- package/dist/publish.js +243 -24
- package/dist/publish.js.map +1 -1
- package/dist/qe-bridge.d.ts +16 -0
- package/dist/qe-bridge.d.ts.map +1 -1
- package/dist/qe-bridge.js +1 -0
- package/dist/qe-bridge.js.map +1 -1
- package/dist/release.d.ts +19 -0
- package/dist/release.d.ts.map +1 -1
- package/dist/release.js +81 -2
- package/dist/release.js.map +1 -1
- package/dist/setup.d.ts +36 -0
- package/dist/setup.d.ts.map +1 -1
- package/dist/setup.js +96 -2
- package/dist/setup.js.map +1 -1
- package/package.json +23 -23
- package/sbom.json +186 -36
- package/src/apply-leg.ts +123 -10
- package/src/embed-socket-path.ts +113 -0
- package/src/index.ts +35 -2
- package/src/operations.ts +67 -3
- package/src/packed-install-smoke.ts +273 -0
- package/src/publish-sibling-drift.ts +293 -0
- package/src/publish.ts +280 -25
- package/src/qe-bridge.ts +14 -0
- package/src/release.ts +103 -2
- package/src/setup.ts +108 -2
package/.dz-manifest.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
11
|
"path": "README.md",
|
|
12
|
-
"sha256": "
|
|
12
|
+
"sha256": "70cf5d858ca889a834345fe7c00f7312fc65477f5e5c3f6d2f4dd7d742ca2ed3"
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"path": "dist/__tests__/golden-baseline.test.d.ts",
|
|
@@ -125,19 +125,19 @@
|
|
|
125
125
|
},
|
|
126
126
|
{
|
|
127
127
|
"path": "dist/apply-leg.d.ts",
|
|
128
|
-
"sha256": "
|
|
128
|
+
"sha256": "a3b35c162ce1059ec52e66250f4d5eb40ea80031bc6ba211cf2c239125da2dab"
|
|
129
129
|
},
|
|
130
130
|
{
|
|
131
131
|
"path": "dist/apply-leg.d.ts.map",
|
|
132
|
-
"sha256": "
|
|
132
|
+
"sha256": "a16afc919647db2ea568e29bf0e835df023a025716bf73e60ab5294300fee486"
|
|
133
133
|
},
|
|
134
134
|
{
|
|
135
135
|
"path": "dist/apply-leg.js",
|
|
136
|
-
"sha256": "
|
|
136
|
+
"sha256": "604ff5b789bf969728c174c560a0b463d64307f0120699feb28ed839d0e42afa"
|
|
137
137
|
},
|
|
138
138
|
{
|
|
139
139
|
"path": "dist/apply-leg.js.map",
|
|
140
|
-
"sha256": "
|
|
140
|
+
"sha256": "78b6f40ca672f6ea40ce4d29c9ae9baab74c74252400a5e05540272a612201b1"
|
|
141
141
|
},
|
|
142
142
|
{
|
|
143
143
|
"path": "dist/apply.d.ts",
|
|
@@ -747,6 +747,22 @@
|
|
|
747
747
|
"path": "dist/downloads.js.map",
|
|
748
748
|
"sha256": "05587a82779e82165de0c21aebe85a6b43a182d24889180b845105f0010a55af"
|
|
749
749
|
},
|
|
750
|
+
{
|
|
751
|
+
"path": "dist/embed-socket-path.d.ts",
|
|
752
|
+
"sha256": "d1e9b3cb7982f012b3da1de5b97b2a584b14e00c74a8de4bdc481e48b52f414b"
|
|
753
|
+
},
|
|
754
|
+
{
|
|
755
|
+
"path": "dist/embed-socket-path.d.ts.map",
|
|
756
|
+
"sha256": "67d855dd419e6221658bd96039db2328b4f0336f236dd5304de604f8b6d99045"
|
|
757
|
+
},
|
|
758
|
+
{
|
|
759
|
+
"path": "dist/embed-socket-path.js",
|
|
760
|
+
"sha256": "c5d11ebcd03e0b952a7021206cdffe6474cbd79101dfdaf0dfcd302fec1d4302"
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
"path": "dist/embed-socket-path.js.map",
|
|
764
|
+
"sha256": "aa0bcf9922795cd37e0be3fed8b8de7750e981e5cc6c373848fc283a9a581926"
|
|
765
|
+
},
|
|
750
766
|
{
|
|
751
767
|
"path": "dist/embedding-config.d.ts",
|
|
752
768
|
"sha256": "850450c883fe4c0355df3e450fe7157f45fd35ab6d38874352822803d1e3eff2"
|
|
@@ -1021,19 +1037,19 @@
|
|
|
1021
1037
|
},
|
|
1022
1038
|
{
|
|
1023
1039
|
"path": "dist/index.d.ts",
|
|
1024
|
-
"sha256": "
|
|
1040
|
+
"sha256": "9268dcea6b76bcc172de258f26b263384be72751ecd80bf695d30fa956ce3255"
|
|
1025
1041
|
},
|
|
1026
1042
|
{
|
|
1027
1043
|
"path": "dist/index.d.ts.map",
|
|
1028
|
-
"sha256": "
|
|
1044
|
+
"sha256": "525593dc52d74876f41071fc906828b3b1807d5b8d1bf0e570589b8f5e23a6cd"
|
|
1029
1045
|
},
|
|
1030
1046
|
{
|
|
1031
1047
|
"path": "dist/index.js",
|
|
1032
|
-
"sha256": "
|
|
1048
|
+
"sha256": "645544ee8ebb51df85c94f1150134c76885678ac0c54dfaaacfaa38090549ee6"
|
|
1033
1049
|
},
|
|
1034
1050
|
{
|
|
1035
1051
|
"path": "dist/index.js.map",
|
|
1036
|
-
"sha256": "
|
|
1052
|
+
"sha256": "0a45a791953cdecc4fb0bff3d39ea158f1d204ba5c3507783affd94fc38c559a"
|
|
1037
1053
|
},
|
|
1038
1054
|
{
|
|
1039
1055
|
"path": "dist/integration-apply.d.ts",
|
|
@@ -1473,15 +1489,15 @@
|
|
|
1473
1489
|
},
|
|
1474
1490
|
{
|
|
1475
1491
|
"path": "dist/operations.d.ts.map",
|
|
1476
|
-
"sha256": "
|
|
1492
|
+
"sha256": "f147b33e2edd6766f4d8256f980315a1458f0408bb0683f5324ccee28e0b8223"
|
|
1477
1493
|
},
|
|
1478
1494
|
{
|
|
1479
1495
|
"path": "dist/operations.js",
|
|
1480
|
-
"sha256": "
|
|
1496
|
+
"sha256": "568d5ea2e70f3672deadf656384e0dedc8f02136e1aacfbff18b523ee0c90fa9"
|
|
1481
1497
|
},
|
|
1482
1498
|
{
|
|
1483
1499
|
"path": "dist/operations.js.map",
|
|
1484
|
-
"sha256": "
|
|
1500
|
+
"sha256": "43e8044e64abc740d5db2486e149acdc943c58a046d9b0c94038e53c207fc0af"
|
|
1485
1501
|
},
|
|
1486
1502
|
{
|
|
1487
1503
|
"path": "dist/package-skill-layouts.d.ts",
|
|
@@ -1499,6 +1515,22 @@
|
|
|
1499
1515
|
"path": "dist/package-skill-layouts.js.map",
|
|
1500
1516
|
"sha256": "cfafe66b3e3a46524fdbaa3404163441c17fdd0245c353dca5fc5c8f35fed2ca"
|
|
1501
1517
|
},
|
|
1518
|
+
{
|
|
1519
|
+
"path": "dist/packed-install-smoke.d.ts",
|
|
1520
|
+
"sha256": "5fab8ab0b347d09711324875be550ce44724dca46d56be901f86dffd471e0506"
|
|
1521
|
+
},
|
|
1522
|
+
{
|
|
1523
|
+
"path": "dist/packed-install-smoke.d.ts.map",
|
|
1524
|
+
"sha256": "3f3bdc901c79b61534649c138306756cc2b59df0682def6ca903d3632e9fcfa7"
|
|
1525
|
+
},
|
|
1526
|
+
{
|
|
1527
|
+
"path": "dist/packed-install-smoke.js",
|
|
1528
|
+
"sha256": "440ae2f1a8876ffae09f3a01534973a9fb7666b6ca963d7ecd01760d6abb32f5"
|
|
1529
|
+
},
|
|
1530
|
+
{
|
|
1531
|
+
"path": "dist/packed-install-smoke.js.map",
|
|
1532
|
+
"sha256": "0b929c1db7a5cc426160c4e2c19b16bf3db5e4a54a55719b46ea6d69d016277e"
|
|
1533
|
+
},
|
|
1502
1534
|
{
|
|
1503
1535
|
"path": "dist/parity.d.ts",
|
|
1504
1536
|
"sha256": "ada951eddf7fc9d5873b63943e45517129072440ad5ec2ed7cf32ec33d638025"
|
|
@@ -1643,6 +1675,22 @@
|
|
|
1643
1675
|
"path": "dist/provenance.js.map",
|
|
1644
1676
|
"sha256": "74f4d718f0ca68857448c043eb8f439c841604db64ee2d799ddec9f66dc15556"
|
|
1645
1677
|
},
|
|
1678
|
+
{
|
|
1679
|
+
"path": "dist/publish-sibling-drift.d.ts",
|
|
1680
|
+
"sha256": "63e4bb439f1366114d21b9796489fec34308c34818bddeb6b69f590b8882c0fd"
|
|
1681
|
+
},
|
|
1682
|
+
{
|
|
1683
|
+
"path": "dist/publish-sibling-drift.d.ts.map",
|
|
1684
|
+
"sha256": "6c564150ddcb07ce2994c63764a0acb3d282bd702ed79dc906c886affc3e84e9"
|
|
1685
|
+
},
|
|
1686
|
+
{
|
|
1687
|
+
"path": "dist/publish-sibling-drift.js",
|
|
1688
|
+
"sha256": "b99fca72e63868d9177052aefe47390e9f5e08ff6869d65299dc0286c8bdfd18"
|
|
1689
|
+
},
|
|
1690
|
+
{
|
|
1691
|
+
"path": "dist/publish-sibling-drift.js.map",
|
|
1692
|
+
"sha256": "504ecc5393016745aef5c60dfa9162a6531625a56b34ced46f4f8ee31d72bf11"
|
|
1693
|
+
},
|
|
1646
1694
|
{
|
|
1647
1695
|
"path": "dist/publish-signing.d.ts",
|
|
1648
1696
|
"sha256": "693c45518c7d13bef56f08b1af32955db990235922243c077c2e81fec7c000a3"
|
|
@@ -1661,35 +1709,35 @@
|
|
|
1661
1709
|
},
|
|
1662
1710
|
{
|
|
1663
1711
|
"path": "dist/publish.d.ts",
|
|
1664
|
-
"sha256": "
|
|
1712
|
+
"sha256": "c2494e9728e80aecd427671f17f252d250ea8866e5b1770efa74f64e37ced8d7"
|
|
1665
1713
|
},
|
|
1666
1714
|
{
|
|
1667
1715
|
"path": "dist/publish.d.ts.map",
|
|
1668
|
-
"sha256": "
|
|
1716
|
+
"sha256": "a4cedae6fed2af78018ae9db1d57f71008373df4c42a9d23f6b73e0a1fde00a1"
|
|
1669
1717
|
},
|
|
1670
1718
|
{
|
|
1671
1719
|
"path": "dist/publish.js",
|
|
1672
|
-
"sha256": "
|
|
1720
|
+
"sha256": "5521d2668e6ddb77086a911166eee4b7df1776ff94b23b5bab9ba927d479b6d4"
|
|
1673
1721
|
},
|
|
1674
1722
|
{
|
|
1675
1723
|
"path": "dist/publish.js.map",
|
|
1676
|
-
"sha256": "
|
|
1724
|
+
"sha256": "2dae5163293e7aa626a27d8da7642a82437b8bdac98b2735706f535572ec71c1"
|
|
1677
1725
|
},
|
|
1678
1726
|
{
|
|
1679
1727
|
"path": "dist/qe-bridge.d.ts",
|
|
1680
|
-
"sha256": "
|
|
1728
|
+
"sha256": "7bf6a9f4bbd79eef7858d3a5e073fbb897d7af01accf9257894635664432f449"
|
|
1681
1729
|
},
|
|
1682
1730
|
{
|
|
1683
1731
|
"path": "dist/qe-bridge.d.ts.map",
|
|
1684
|
-
"sha256": "
|
|
1732
|
+
"sha256": "6eac09175e7d75786e831dc07a79fa17574a61cbe607ffecbe263ac4248f818d"
|
|
1685
1733
|
},
|
|
1686
1734
|
{
|
|
1687
1735
|
"path": "dist/qe-bridge.js",
|
|
1688
|
-
"sha256": "
|
|
1736
|
+
"sha256": "c61ce95a1fe307b340cb247cb7eb82708525452a12621fa42345e1561eb200e8"
|
|
1689
1737
|
},
|
|
1690
1738
|
{
|
|
1691
1739
|
"path": "dist/qe-bridge.js.map",
|
|
1692
|
-
"sha256": "
|
|
1740
|
+
"sha256": "5f9c7d67e269024896199f171d84e918d6adb71d022983bfc959b3697d78be67"
|
|
1693
1741
|
},
|
|
1694
1742
|
{
|
|
1695
1743
|
"path": "dist/qe-rounds.d.ts",
|
|
@@ -1853,19 +1901,19 @@
|
|
|
1853
1901
|
},
|
|
1854
1902
|
{
|
|
1855
1903
|
"path": "dist/release.d.ts",
|
|
1856
|
-
"sha256": "
|
|
1904
|
+
"sha256": "cf5750b9c6d474c45cfd81b7cbb2f92a18b452fa1c069e4e3fbfc4dac06267d9"
|
|
1857
1905
|
},
|
|
1858
1906
|
{
|
|
1859
1907
|
"path": "dist/release.d.ts.map",
|
|
1860
|
-
"sha256": "
|
|
1908
|
+
"sha256": "6eaca079115921991149d68189ed8ef8c61be6efd12c426df8d091c1b39da5b9"
|
|
1861
1909
|
},
|
|
1862
1910
|
{
|
|
1863
1911
|
"path": "dist/release.js",
|
|
1864
|
-
"sha256": "
|
|
1912
|
+
"sha256": "627e5efa90298701d01bee346790647f5688dc0f10c4727b348298490c35d219"
|
|
1865
1913
|
},
|
|
1866
1914
|
{
|
|
1867
1915
|
"path": "dist/release.js.map",
|
|
1868
|
-
"sha256": "
|
|
1916
|
+
"sha256": "a539f499cf28923856c6cb6f40417d67d662c6771b4df8fe4e7fe5ab9f2a7121"
|
|
1869
1917
|
},
|
|
1870
1918
|
{
|
|
1871
1919
|
"path": "dist/repo-boundary.d.ts",
|
|
@@ -2125,19 +2173,19 @@
|
|
|
2125
2173
|
},
|
|
2126
2174
|
{
|
|
2127
2175
|
"path": "dist/setup.d.ts",
|
|
2128
|
-
"sha256": "
|
|
2176
|
+
"sha256": "f83a15a0c183e2dc67d95323a3eae1eddfd8b375ca92a0de488081ec9d020603"
|
|
2129
2177
|
},
|
|
2130
2178
|
{
|
|
2131
2179
|
"path": "dist/setup.d.ts.map",
|
|
2132
|
-
"sha256": "
|
|
2180
|
+
"sha256": "baefa9d4a927880e51b8dc9ec4b899e7625c029de82ed397501b32cb1d3e925a"
|
|
2133
2181
|
},
|
|
2134
2182
|
{
|
|
2135
2183
|
"path": "dist/setup.js",
|
|
2136
|
-
"sha256": "
|
|
2184
|
+
"sha256": "6f8cbb59ffc98b5f8722134b9b28b4d2bd5d847fe50edc38d2f539ebc9980151"
|
|
2137
2185
|
},
|
|
2138
2186
|
{
|
|
2139
2187
|
"path": "dist/setup.js.map",
|
|
2140
|
-
"sha256": "
|
|
2188
|
+
"sha256": "f859ac7532e6b9d2232fbdbe6f7b3cb5e0a739842bc70024544c9263f78ec67e"
|
|
2141
2189
|
},
|
|
2142
2190
|
{
|
|
2143
2191
|
"path": "dist/shell-veto-policy.d.ts",
|
|
@@ -2685,7 +2733,7 @@
|
|
|
2685
2733
|
},
|
|
2686
2734
|
{
|
|
2687
2735
|
"path": "package.json",
|
|
2688
|
-
"sha256": "
|
|
2736
|
+
"sha256": "a6f86350222413a151c6d4f73d9c80f4e2d3c21297000e2fe7b0708248d77724"
|
|
2689
2737
|
},
|
|
2690
2738
|
{
|
|
2691
2739
|
"path": "src/__tests__/golden-baseline.test.ts",
|
|
@@ -2717,7 +2765,7 @@
|
|
|
2717
2765
|
},
|
|
2718
2766
|
{
|
|
2719
2767
|
"path": "src/apply-leg.ts",
|
|
2720
|
-
"sha256": "
|
|
2768
|
+
"sha256": "15feafe9dedd298f2d8f7815d2a100cedaf4864223affb80f8e8c34317e4b0f6"
|
|
2721
2769
|
},
|
|
2722
2770
|
{
|
|
2723
2771
|
"path": "src/apply.ts",
|
|
@@ -2875,6 +2923,10 @@
|
|
|
2875
2923
|
"path": "src/downloads.ts",
|
|
2876
2924
|
"sha256": "1442c789d2519c1b621b326411fcee4a57ab933ce332dbc60d271e64b49ec5db"
|
|
2877
2925
|
},
|
|
2926
|
+
{
|
|
2927
|
+
"path": "src/embed-socket-path.ts",
|
|
2928
|
+
"sha256": "2168f61719813abe70d90493a1e12936e084ae43bfc59cf131d9ad9bcbe27939"
|
|
2929
|
+
},
|
|
2878
2930
|
{
|
|
2879
2931
|
"path": "src/embedding-config.ts",
|
|
2880
2932
|
"sha256": "1323977cbf0a5e648e9c319c2584ff3fb71a15bc7c97e35c6a5154deb900ec56"
|
|
@@ -2945,7 +2997,7 @@
|
|
|
2945
2997
|
},
|
|
2946
2998
|
{
|
|
2947
2999
|
"path": "src/index.ts",
|
|
2948
|
-
"sha256": "
|
|
3000
|
+
"sha256": "307f2d574fd2d7a0f2b8ebe7a36047f0c3d8cade6e8fdda9e10e26d344914912"
|
|
2949
3001
|
},
|
|
2950
3002
|
{
|
|
2951
3003
|
"path": "src/integration-apply.ts",
|
|
@@ -3061,12 +3113,16 @@
|
|
|
3061
3113
|
},
|
|
3062
3114
|
{
|
|
3063
3115
|
"path": "src/operations.ts",
|
|
3064
|
-
"sha256": "
|
|
3116
|
+
"sha256": "fd66a40569fd53cbf0d621643ace1e4f89777e9634bcda24a730e971dc240ccd"
|
|
3065
3117
|
},
|
|
3066
3118
|
{
|
|
3067
3119
|
"path": "src/package-skill-layouts.ts",
|
|
3068
3120
|
"sha256": "d51f2eb3054716bf2c52113cef46445203f13e365a4efd551ce8d9936f1d7953"
|
|
3069
3121
|
},
|
|
3122
|
+
{
|
|
3123
|
+
"path": "src/packed-install-smoke.ts",
|
|
3124
|
+
"sha256": "c6c9ed22e4e06fc6de233efc1214349e60f66ea012c5162ef9fb1fcbc0a169d5"
|
|
3125
|
+
},
|
|
3070
3126
|
{
|
|
3071
3127
|
"path": "src/parity.ts",
|
|
3072
3128
|
"sha256": "8a444c993eb7b117b2606abec7783c1209833bd51af89c5828f43f96152c00ba"
|
|
@@ -3103,17 +3159,21 @@
|
|
|
3103
3159
|
"path": "src/provenance.ts",
|
|
3104
3160
|
"sha256": "09930294d2b7fcd2938c15b8d8a62a9d1615c064a2479cae1918e0ea4d4ba045"
|
|
3105
3161
|
},
|
|
3162
|
+
{
|
|
3163
|
+
"path": "src/publish-sibling-drift.ts",
|
|
3164
|
+
"sha256": "2bd607ec044e2bca2a7336e10d69cee99db53e6f41b60bfa770711d756dd9116"
|
|
3165
|
+
},
|
|
3106
3166
|
{
|
|
3107
3167
|
"path": "src/publish-signing.ts",
|
|
3108
3168
|
"sha256": "e190a24c144667843283268fcec3b0ee08a184a33f876c151f2b562eebe4f892"
|
|
3109
3169
|
},
|
|
3110
3170
|
{
|
|
3111
3171
|
"path": "src/publish.ts",
|
|
3112
|
-
"sha256": "
|
|
3172
|
+
"sha256": "00024c5a639339c5184bdad4d0ccf2e2e7d609cd74f25e64b624a43c22ac8625"
|
|
3113
3173
|
},
|
|
3114
3174
|
{
|
|
3115
3175
|
"path": "src/qe-bridge.ts",
|
|
3116
|
-
"sha256": "
|
|
3176
|
+
"sha256": "abea068557211791925c6a046c71d49fa67753ec46c8f982f8f4351feb539970"
|
|
3117
3177
|
},
|
|
3118
3178
|
{
|
|
3119
3179
|
"path": "src/qe-rounds.ts",
|
|
@@ -3157,7 +3217,7 @@
|
|
|
3157
3217
|
},
|
|
3158
3218
|
{
|
|
3159
3219
|
"path": "src/release.ts",
|
|
3160
|
-
"sha256": "
|
|
3220
|
+
"sha256": "b7e248afaadc503642ef3b22eb86817e8ecb12744493c1780065de87772483a4"
|
|
3161
3221
|
},
|
|
3162
3222
|
{
|
|
3163
3223
|
"path": "src/repo-boundary.ts",
|
|
@@ -3221,7 +3281,7 @@
|
|
|
3221
3281
|
},
|
|
3222
3282
|
{
|
|
3223
3283
|
"path": "src/setup.ts",
|
|
3224
|
-
"sha256": "
|
|
3284
|
+
"sha256": "795f796ad5093244807d5fd0c80478c89e28e3e3ef26540e8f636eb24d517038"
|
|
3225
3285
|
},
|
|
3226
3286
|
{
|
|
3227
3287
|
"path": "src/shell-veto-policy.ts",
|
|
@@ -3365,5 +3425,5 @@
|
|
|
3365
3425
|
}
|
|
3366
3426
|
]
|
|
3367
3427
|
},
|
|
3368
|
-
"signature": "
|
|
3428
|
+
"signature": "9lkZG7XpDHs9qtNmKiBJYt3PMKTOAhxXxEU3F4n2uOYQps/u6lY0vb50bdKsxMoZem8/R2qORHxYCU4kN+iYAQ=="
|
|
3369
3429
|
}
|
package/README.md
CHANGED
|
@@ -244,6 +244,10 @@ into this core input. Empty or omitted values are still absent from state, prese
|
|
|
244
244
|
compatibility path.
|
|
245
245
|
| `operations` | `runInit`, `runSync`, `runVerify`, `runDoctor` | The harness operations, returning structured reports. `InitReport` and `SyncReport` carry an additive, always-present `failures: readonly SkillLoadFailure[]` (empty when nothing failed): a single unloadable `SKILL.md` used to throw out of the whole loop, so `dz init`/`dz install`/`dz sync` reported NOTHING at all. They now skip, collect and name — skipping without a record would only trade a loud failure for a silent one. `runDoctor` is deliberately untouched: it was never a throw site, and a negative test asserts it gained no `failures` field |
|
|
246
246
|
| `release` | `collectPackageFacts`, `selectAffectedPackages`, `planReleaseGates`, `classifyGateExecutions`, `buildFailureIssue`, `firstOutputLine` | Pure verified-release engine behind `dz release`: plans 4 HARD gates (tests / `pnpm audit --prod` / `node --check` / bin smoke-boot) as DATA and classifies injected results fail-closed — an unbuilt package (declared `build` script, no dist JS) is a `MISSING_DIST` failure, a template-only pack is a named `SKIP_NO_ARTIFACTS` skip, `selectAffectedPackages` fail-opens to the full set when the changed-file list is unavailable |
|
|
247
|
+
| `publish-sibling-drift` | `detectSiblingDrift`, `normalizedPackageJsonText` | Pure sibling-drift detector behind the `dz publish` gate: for every `workspace:*` sibling, the registry tarball's dist/files/bin and the SHIPPING fields of package.json (name/type/main/module/types/exports/bin/files/engines/os/cpu + dependency names) are hashed against the workspace; any difference is a named violation that blocks the batch unless the sibling joins it (`--include-drifted`). |
|
|
248
|
+
| `packed-install-smoke` | `planPackedInstallSmoke`, `judgePackedInstallSmoke`, `packedTarballName` | Pure plan/judge halves of the post-bump smoke: pack each package that declares a `bin` (workspace specs rewritten to exact sibling versions), install the tarballs into a clean directory under `/var/tmp` (npm no-ops `file:` tarballs under `/tmp`), run `<bin> --version`; exit 0 with non-empty stdout is the only PASS. |
|
|
249
|
+
| `setup` (memory backend) | `resolveSetupMemoryBackend`, `memoryBackendSourceLabel` | `dz setup` backend resolution flag > `.dz/config.json` > default, with the source named (`flag`/`config`/`default`/`default-unreadable`/`disabled`); a downgrade rewrites only `memory.backend`. |
|
|
250
|
+
| `embed-socket-path` | `resolveEmbedSocketPath`, `embedSocketPointerPath`, `readEmbedSocketPointer`, `resolveEffectiveEmbedSocketPath`, `EMBED_SOCKET_PATH_BYTES_LIMIT` | Unix-socket path resolver shared by the embed daemon, the recall hook and `dz doctor`: env override > project `.dz/embed.sock` when ≤ 100 bytes > `<tmpdir>/dz-<uid>/embed-<sha1[12]>.sock` (`tooLong` when even that overflows); the pointer file `.dz/embed.sock.path` is trusted only while its target exists. |
|
|
247
251
|
| `parity` | `TARGET_CAPABILITIES`, `PARITY_FEATURES`, `computeParity`, `buildParityMatrix` | Declarative target-parity model behind `dz parity`: verified capability flags per target × feature FORMS with requirements; the feature×target matrix is always COMPUTED (never hand-written), and the model must classify exactly `TARGET_NAMES` — an unclassified new target refuses to compile |
|
|
248
252
|
| `delivery-check` | `PLANE_SPECS`, `collectDeliveryFacts`, `planDeliveryCheck`, `renderDeliveryBrief`, `classifyDelivery`, `renderDeliveryReview` | Pure portable Step-10 Delivery Gate engine behind `dz delivery-check`: the four review planes as shared DATA (prose-identical to the workflow's inline `planePrompts`, held by a drift-guard test), a deterministic plan/classify over injected facts+findings, and the FAIL-CLOSED hand-off verdict — `ready` only off complete, cross-validated, clean evidence; classification reads only numeric severity counts so injected instruction-like text cannot move the verdict. No `child_process`; the only fs is `existsSync` in `collectDeliveryFacts` |
|
|
249
253
|
| `skills-verify` | `scanSkillsLayout`, `parseInitFacts`, `verifyRegistration`, `registrationExitCode`, `renderRegistrationReport` | Pure registration-gate engine behind `dz skills-verify`: a static scan of `.claude/skills/` (which dirs CAN register + the shapes that never can) and a **sealed** verdict over one atomic evidence bundle (`RegistrationEvidence` = the whole scan + a tagged probe result + a provenance record). Cardinality and parse integrity are derived INSIDE from the raw `system/init` stream, so no caller can omit or falsify them. FAIL-CLOSED: an unobservable registration is `inconclusive`, never `pass`; a plugin-shaped container is advisory and its fate is decided by whether the session says that plugin LOADED, never by the layout. Also exports `findNonRegistrableSkillDirs` — the publish-time guard fact behind the `skills-registrable` rule (a pack counts only if it already has one registrable skill; a dir is flagged only when a `SKILL.md` exists inside but below depth 1 — the discriminator was chosen after MEASURING the real packs, since a naive rule flagged ~40 healthy dirs across 9 npx toolkits). Plugin containers are attributed by `init.plugins[].path`, never by directory name; a container whose plugin did not load FAILS, one that loaded PASSES with an advisory that its individual skills are unverified (modelling Claude Code's command-name resolution produced a new wrong verdict in every review round — the gap is disclosed, not guessed). Sees SLASH COMMANDS too: `InitFacts.slash_commands` carries the session's command listing (MEASURED on Claude Code 2.1.233 — `system/init` emits `slash_commands`, and a plugin command registers as `<plugin>:<file basename>`, not as its frontmatter name), `RegistrationEvidence.expectedCommands` names what must appear, and an ABSENT `slash_commands` key is `inconclusive` exactly like an absent `skills` key — never an empty list, because schema drift and "the commands did not load" are different facts. `declaredPluginSurface(dir)` derives the expected names from a plugin's own manifest so a gate run cannot drift from the manifest it checks, and returns `null` (never an empty, vacuously-passing expectation) for an unreadable one. Also ships the ADVISORY content layer (`buildContentProbePrompt` / `classifyContentProbe`): registration is not usability, so an extra model turn asks for a VERBATIM quote as evidence — advisory by construction, it never gates. No `child_process` — the CLI owns the probe |
|
|
@@ -574,6 +578,32 @@ generator (with the hub's own `coreDistDir`, via `harnessCoreDistDir()`) — a t
|
|
|
574
578
|
(`test/apply-leg-twins.test.ts`) keeps the two byte-identical, the same discipline `feature-adr`'s
|
|
575
579
|
workflow twins test applies to its own generated scripts.
|
|
576
580
|
|
|
581
|
+
### Short socket path for deeply nested projects (`embed-socket-path.ts`)
|
|
582
|
+
|
|
583
|
+
A unix domain socket path is capped by the platform's `sun_path` buffer — 108 bytes on Linux, 104 on
|
|
584
|
+
macOS, NUL included — measured in BYTES (`Buffer.byteLength`, not `.length`: a multi-byte path
|
|
585
|
+
component costs more bytes than characters). Past that limit the embed daemon's `.dz/embed.sock`
|
|
586
|
+
bind used to fail while everything ELSE about the daemon looked healthy — the daemon logged "ready",
|
|
587
|
+
and the recall hook and `dz doctor` both independently recomputed the SAME too-long path and reported
|
|
588
|
+
it absent, three consumers agreeing on a wrong answer for three unrelated reasons.
|
|
589
|
+
|
|
590
|
+
`resolveEmbedSocketPath(projectRoot, env?)` is the ONE resolver all three now share: `DZ_EMBED_SOCKET`
|
|
591
|
+
wins if set; otherwise `<projectRoot>/.dz/embed.sock` if its byte length is ≤100 (a safety margin
|
|
592
|
+
under both platform limits); otherwise a short, deterministic path under `os.tmpdir()` keyed by a
|
|
593
|
+
12-hex-char SHA-1 of `projectRoot` (`{reason: 'tmpdir-short'}`). When the daemon binds on the
|
|
594
|
+
tmpdir-short branch it writes `<projectRoot>/.dz/embed.sock.path` — a pointer to the path it actually
|
|
595
|
+
bound — so a reader whose `os.tmpdir()` might differ (a different `TMPDIR`) still finds it via
|
|
596
|
+
`resolveEffectiveEmbedSocketPath`, which prefers the pointer ONLY on that branch (the `env`/`project`
|
|
597
|
+
branches don't depend on `os.tmpdir()`, so there is nothing for a pointer to protect against there).
|
|
598
|
+
The daemon and the recall hook — both standalone generated files that cannot `import` a compiled
|
|
599
|
+
module — carry this logic inlined as TEXT, kept in lockstep with the exported function by
|
|
600
|
+
`test/apply-leg-twins.test.ts`; `dz doctor`'s liveness check is a real `import` and now names the
|
|
601
|
+
ACTUAL resolved path (`embed socket present at <path> (tmpdir-short: project path N bytes > 100)`)
|
|
602
|
+
instead of only ever checking the plain project path. The daemon also now prints `ready` ONLY after
|
|
603
|
+
`existsSync(SOCKET)` confirms the bind landed post-`listen()` — a bind failure logs `bind failed: …
|
|
604
|
+
(path N bytes)` and exits non-zero, never a silent "ready" for a socket that was never created
|
|
605
|
+
(`APPLY_LEG_VERSION` bumped 3→4 for this and the resolver change).
|
|
606
|
+
|
|
577
607
|
## Run a plan without the Claude host
|
|
578
608
|
|
|
579
609
|
`runWorkflow` (`workflow-run.ts`) is the PURE scheduler behind `dz workflow run`: it INTERPRETS a
|
package/dist/apply-leg.d.ts
CHANGED
|
@@ -36,8 +36,15 @@
|
|
|
36
36
|
* `recallHookSource`'s `loadCoreModule` candidate list is now built with a conditional spread so a
|
|
37
37
|
* `null` `coreDistDir` (the hub's own portable marker, C-6/finding-6) degrades cleanly to the
|
|
38
38
|
* project-relative fallbacks — the generated BYTES changed for every caller, hub and consumer alike.
|
|
39
|
+
*
|
|
40
|
+
* Bumped 3→4 (feature `embed-socket-short-path`): both generated files now resolve the socket path
|
|
41
|
+
* through the same `DZ_EMBED_SOCKET` → project-path-if-short → tmpdir-short-hash logic as
|
|
42
|
+
* {@link resolveEmbedSocketPath} (inlined as TEXT in both — a template string cannot `import` a
|
|
43
|
+
* compiled module), the daemon writes a `.dz/embed.sock.path` pointer when it picks the tmpdir-short
|
|
44
|
+
* branch, and `ready` is now printed only after `existsSync(SOCKET)` confirms the bind actually
|
|
45
|
+
* landed (previously logged unconditionally, before `listen` even ran).
|
|
39
46
|
*/
|
|
40
|
-
export declare const APPLY_LEG_VERSION =
|
|
47
|
+
export declare const APPLY_LEG_VERSION = 4;
|
|
41
48
|
/**
|
|
42
49
|
* Parse the `dz-apply-leg-version` stamp from a deployed helper file. Unlike
|
|
43
50
|
* `writerVersionOf` (which floors an absent stamp at `0`), this returns `-1` for "no stamp at
|
|
@@ -76,6 +83,11 @@ export declare function bakedCoreDistDirOf(content: string): string | null | und
|
|
|
76
83
|
* Behaviourally identical to the pre-existing hand-committed hub file except for: the version
|
|
77
84
|
* stamp (new, line 2) and the candidate list in `loadCoreModule` (baked path first when present,
|
|
78
85
|
* `/usr/lib/...` dropped — FR-3).
|
|
86
|
+
*
|
|
87
|
+
* Also carries the `embed-socket-short-path` fix (FR-1/FR-2): `SOCKET` is resolved through the
|
|
88
|
+
* same env → project-path-if-short → tmpdir-short-hash logic as
|
|
89
|
+
* {@link "./embed-socket-path.js".resolveEmbedSocketPath}, inlined as text and preferring an
|
|
90
|
+
* on-disk pointer when the resolver itself would land on the tmpdir-short branch.
|
|
79
91
|
*/
|
|
80
92
|
export declare function recallHookSource(coreDistDir: string | null): string;
|
|
81
93
|
/** `setTimeout`'s delay argument is a 32-bit signed int in Node — see {@link resolveIdleMs}. */
|
package/dist/apply-leg.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply-leg.d.ts","sourceRoot":"","sources":["../src/apply-leg.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAMH
|
|
1
|
+
{"version":3,"file":"apply-leg.d.ts","sourceRoot":"","sources":["../src/apply-leg.ts"],"names":[],"mappings":"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"}
|
package/dist/apply-leg.js
CHANGED
|
@@ -39,8 +39,15 @@ import { hookCommandsOf } from './managed-hooks.js';
|
|
|
39
39
|
* `recallHookSource`'s `loadCoreModule` candidate list is now built with a conditional spread so a
|
|
40
40
|
* `null` `coreDistDir` (the hub's own portable marker, C-6/finding-6) degrades cleanly to the
|
|
41
41
|
* project-relative fallbacks — the generated BYTES changed for every caller, hub and consumer alike.
|
|
42
|
+
*
|
|
43
|
+
* Bumped 3→4 (feature `embed-socket-short-path`): both generated files now resolve the socket path
|
|
44
|
+
* through the same `DZ_EMBED_SOCKET` → project-path-if-short → tmpdir-short-hash logic as
|
|
45
|
+
* {@link resolveEmbedSocketPath} (inlined as TEXT in both — a template string cannot `import` a
|
|
46
|
+
* compiled module), the daemon writes a `.dz/embed.sock.path` pointer when it picks the tmpdir-short
|
|
47
|
+
* branch, and `ready` is now printed only after `existsSync(SOCKET)` confirms the bind actually
|
|
48
|
+
* landed (previously logged unconditionally, before `listen` even ran).
|
|
42
49
|
*/
|
|
43
|
-
export const APPLY_LEG_VERSION =
|
|
50
|
+
export const APPLY_LEG_VERSION = 4;
|
|
44
51
|
/**
|
|
45
52
|
* Parse the `dz-apply-leg-version` stamp from a deployed helper file. Unlike
|
|
46
53
|
* `writerVersionOf` (which floors an absent stamp at `0`), this returns `-1` for "no stamp at
|
|
@@ -96,6 +103,11 @@ export function bakedCoreDistDirOf(content) {
|
|
|
96
103
|
* Behaviourally identical to the pre-existing hand-committed hub file except for: the version
|
|
97
104
|
* stamp (new, line 2) and the candidate list in `loadCoreModule` (baked path first when present,
|
|
98
105
|
* `/usr/lib/...` dropped — FR-3).
|
|
106
|
+
*
|
|
107
|
+
* Also carries the `embed-socket-short-path` fix (FR-1/FR-2): `SOCKET` is resolved through the
|
|
108
|
+
* same env → project-path-if-short → tmpdir-short-hash logic as
|
|
109
|
+
* {@link "./embed-socket-path.js".resolveEmbedSocketPath}, inlined as text and preferring an
|
|
110
|
+
* on-disk pointer when the resolver itself would land on the tmpdir-short branch.
|
|
99
111
|
*/
|
|
100
112
|
export function recallHookSource(coreDistDir) {
|
|
101
113
|
return `#!/usr/bin/env node
|
|
@@ -121,11 +133,46 @@ export function recallHookSource(coreDistDir) {
|
|
|
121
133
|
const net = require('node:net');
|
|
122
134
|
const path = require('node:path');
|
|
123
135
|
const fs = require('node:fs');
|
|
136
|
+
const crypto = require('node:crypto');
|
|
137
|
+
const os = require('node:os');
|
|
124
138
|
const { pathToFileURL } = require('node:url');
|
|
125
139
|
|
|
126
140
|
const PROJECT = process.env.CLAUDE_PROJECT_DIR || process.cwd();
|
|
127
141
|
const CORE_DIST_DIR = ${coreDistDir === null ? 'null' : JSON.stringify(coreDistDir)};
|
|
128
|
-
|
|
142
|
+
|
|
143
|
+
// embed-socket-short-path (FR-1/FR-2): byte-for-byte the same logic as \`resolveEmbedSocketPath\` /
|
|
144
|
+
// \`resolveEffectiveEmbedSocketPath\` in \`embed-socket-path.ts\` — inlined as TEXT because this file
|
|
145
|
+
// is standalone and cannot \`import\` a compiled core module (apply-leg-twins.test.ts pins the copies
|
|
146
|
+
// to the same behavior as the daemon's own inlined copy).
|
|
147
|
+
const EMBED_SOCKET_PATH_BYTES_LIMIT = 100;
|
|
148
|
+
function resolveEmbedSocketPath(projectRoot, env) {
|
|
149
|
+
const fromEnv = env.DZ_EMBED_SOCKET;
|
|
150
|
+
if (typeof fromEnv === 'string' && fromEnv !== '') return { path: fromEnv, reason: 'env' };
|
|
151
|
+
const projectPath = path.join(projectRoot, '.dz', 'embed.sock');
|
|
152
|
+
if (Buffer.byteLength(projectPath, 'utf8') <= EMBED_SOCKET_PATH_BYTES_LIMIT) return { path: projectPath, reason: 'project' };
|
|
153
|
+
const hash = crypto.createHash('sha1').update(projectRoot).digest('hex').slice(0, 12);
|
|
154
|
+
const uid = String(process.getuid?.() ?? 'u');
|
|
155
|
+
const shortPath = path.join(os.tmpdir(), \`dz-\${uid}\`, \`embed-\${hash}.sock\`);
|
|
156
|
+
const tooLong = Buffer.byteLength(shortPath, 'utf8') > EMBED_SOCKET_PATH_BYTES_LIMIT;
|
|
157
|
+
return tooLong ? { path: shortPath, reason: 'tmpdir-short', tooLong: true } : { path: shortPath, reason: 'tmpdir-short' };
|
|
158
|
+
}
|
|
159
|
+
function readEmbedSocketPointer(projectRoot) {
|
|
160
|
+
const pointerPath = path.join(projectRoot, '.dz', 'embed.sock.path');
|
|
161
|
+
if (!fs.existsSync(pointerPath)) return undefined;
|
|
162
|
+
try {
|
|
163
|
+
const raw = fs.readFileSync(pointerPath, 'utf-8').trim();
|
|
164
|
+
return raw !== '' ? raw : undefined;
|
|
165
|
+
} catch {
|
|
166
|
+
return undefined;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
function resolveEffectiveEmbedSocketPath(projectRoot, env) {
|
|
170
|
+
const resolved = resolveEmbedSocketPath(projectRoot, env);
|
|
171
|
+
if (resolved.reason !== 'tmpdir-short') return resolved;
|
|
172
|
+
const pointer = readEmbedSocketPointer(projectRoot);
|
|
173
|
+
return pointer !== undefined && fs.existsSync(pointer) ? { path: pointer, reason: 'tmpdir-short' } : resolved;
|
|
174
|
+
}
|
|
175
|
+
const SOCKET = resolveEffectiveEmbedSocketPath(PROJECT, process.env).path;
|
|
129
176
|
const USAGE_LOG = process.env.DZ_RECALL_USAGE_LOG || path.join(PROJECT, '.dz', 'recall-usage.jsonl');
|
|
130
177
|
const TIMEOUT_MS = Number(process.env.DZ_RECALL_HOOK_TIMEOUT_MS || 800);
|
|
131
178
|
|
|
@@ -555,10 +602,12 @@ export function embedDaemonSource() {
|
|
|
555
602
|
*/
|
|
556
603
|
|
|
557
604
|
import { createServer } from 'node:net';
|
|
558
|
-
import { existsSync, unlinkSync, readFileSync } from 'node:fs';
|
|
559
|
-
import { join } from 'node:path';
|
|
605
|
+
import { existsSync, unlinkSync, readFileSync, mkdirSync, writeFileSync, renameSync, statSync } from 'node:fs';
|
|
606
|
+
import { join, dirname } from 'node:path';
|
|
560
607
|
import { createRequire } from 'node:module';
|
|
561
608
|
import { connect } from 'node:net';
|
|
609
|
+
import { createHash } from 'node:crypto';
|
|
610
|
+
import { tmpdir } from 'node:os';
|
|
562
611
|
|
|
563
612
|
const log = (...a) => console.error('[dz-embed]', ...a);
|
|
564
613
|
|
|
@@ -566,7 +615,26 @@ const log = (...a) => console.error('[dz-embed]', ...a);
|
|
|
566
615
|
console.log = (...a) => console.error(...a);
|
|
567
616
|
|
|
568
617
|
const PROJECT = process.env['DZ_PROJECT_ROOT'] ?? process.cwd();
|
|
569
|
-
|
|
618
|
+
// embed-socket-short-path (FR-1): a unix socket path has a hard platform limit on \`sun_path\`
|
|
619
|
+
// (Linux 108 bytes incl. NUL, macOS 104) — a deeply nested project's \`.dz/embed.sock\` can exceed
|
|
620
|
+
// it, and \`listen()\` then fails while every OTHER part of the daemon looks healthy. This mirrors
|
|
621
|
+
// {@link resolveEmbedSocketPath} in \`embed-socket-path.ts\` byte-for-byte (this file is generated
|
|
622
|
+
// TEXT, standalone, and cannot \`import\` a compiled core module — apply-leg-twins.test.ts pins the
|
|
623
|
+
// two copies to the same behavior).
|
|
624
|
+
const EMBED_SOCKET_PATH_BYTES_LIMIT = 100;
|
|
625
|
+
function resolveEmbedSocketPath(projectRoot, env) {
|
|
626
|
+
const fromEnv = env['DZ_EMBED_SOCKET'];
|
|
627
|
+
if (typeof fromEnv === 'string' && fromEnv !== '') return { path: fromEnv, reason: 'env' };
|
|
628
|
+
const projectPath = join(projectRoot, '.dz', 'embed.sock');
|
|
629
|
+
if (Buffer.byteLength(projectPath, 'utf8') <= EMBED_SOCKET_PATH_BYTES_LIMIT) return { path: projectPath, reason: 'project' };
|
|
630
|
+
const hash = createHash('sha1').update(projectRoot).digest('hex').slice(0, 12);
|
|
631
|
+
const uid = String(process.getuid?.() ?? 'u');
|
|
632
|
+
const shortPath = join(tmpdir(), \`dz-\${uid}\`, \`embed-\${hash}.sock\`);
|
|
633
|
+
const tooLong = Buffer.byteLength(shortPath, 'utf8') > EMBED_SOCKET_PATH_BYTES_LIMIT;
|
|
634
|
+
return tooLong ? { path: shortPath, reason: 'tmpdir-short', tooLong: true } : { path: shortPath, reason: 'tmpdir-short' };
|
|
635
|
+
}
|
|
636
|
+
const { path: SOCKET, reason: SOCKET_REASON, tooLong: SOCKET_TOO_LONG } = resolveEmbedSocketPath(PROJECT, process.env);
|
|
637
|
+
const SOCKET_POINTER = join(PROJECT, '.dz', 'embed.sock.path');
|
|
570
638
|
// AM-10 (issue #10 defect 7): a setTimeout delay is a 32-bit signed int in Node — anything
|
|
571
639
|
// above 2_147_483_647 ms silently becomes ~1ms (a "30 days" idle setting exited in ~1 second,
|
|
572
640
|
// MEASURED). 0/NaN/negative disables the idle exit outright rather than firing immediately.
|
|
@@ -723,7 +791,6 @@ async function main() {
|
|
|
723
791
|
|
|
724
792
|
let patterns = loadPatterns();
|
|
725
793
|
let patternsAt = Date.now();
|
|
726
|
-
log(\`ready: \${patterns.length} pattern vectors, model \${model}, socket \${SOCKET}\`);
|
|
727
794
|
|
|
728
795
|
let idleTimer;
|
|
729
796
|
let lastActivityAt = Date.now();
|
|
@@ -804,16 +871,62 @@ async function main() {
|
|
|
804
871
|
} catch {
|
|
805
872
|
/* ignore */
|
|
806
873
|
}
|
|
874
|
+
try {
|
|
875
|
+
// Only OUR pointer is removed — one that already names another daemon's socket stays.
|
|
876
|
+
if (SOCKET_REASON === 'tmpdir-short' && existsSync(SOCKET_POINTER) && readFileSync(SOCKET_POINTER, 'utf-8').trim() === SOCKET) unlinkSync(SOCKET_POINTER);
|
|
877
|
+
} catch {
|
|
878
|
+
/* ignore */
|
|
879
|
+
}
|
|
807
880
|
process.exit(code);
|
|
808
881
|
}
|
|
809
882
|
|
|
810
883
|
for (const sig of ['SIGINT', 'SIGTERM', 'SIGHUP']) process.on(sig, () => shutdown(0));
|
|
811
884
|
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
885
|
+
// FR-3 ("absence of a receipt is not success"): \`ready\` is printed ONLY after \`listen\`'s callback
|
|
886
|
+
// AND a fresh \`existsSync(SOCKET)\` both confirm the socket file is actually on disk — a caller
|
|
887
|
+
// that greps stderr for "ready" must never see it for a socket that silently failed to bind.
|
|
888
|
+
function bindFailed(detail) {
|
|
889
|
+
log(\`bind failed: \${detail} (path \${Buffer.byteLength(SOCKET, 'utf8')} bytes)\`);
|
|
890
|
+
process.exit(3);
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
// A fresh project's SOCKET directory (\`.dz/\`, or a caller-injected DZ_EMBED_SOCKET's own parent)
|
|
894
|
+
// may not exist yet — \`dz setup\` usually creates \`.dz/\` before this daemon ever runs, but a
|
|
895
|
+
// missing parent must not surface as an opaque platform EACCES/ENOENT when a plain mkdir fixes it.
|
|
896
|
+
if (SOCKET_TOO_LONG) bindFailed('even the tmpdir-short fallback exceeds the unix socket path limit — set DZ_EMBED_SOCKET to a short path');
|
|
897
|
+
try {
|
|
898
|
+
// Lead edit after Codex review (finding 2): the private per-user directory is created 0700 and
|
|
899
|
+
// verified — a socket in a world-writable tmpdir could be pre-bound or hijacked by a neighbour.
|
|
900
|
+
mkdirSync(dirname(SOCKET), { recursive: true, mode: 0o700 });
|
|
901
|
+
if (SOCKET_REASON === 'tmpdir-short') {
|
|
902
|
+
const st = statSync(dirname(SOCKET));
|
|
903
|
+
const ownUid = typeof process.getuid === 'function' ? process.getuid() : st.uid;
|
|
904
|
+
if (st.uid !== ownUid || (st.mode & 0o077) !== 0) bindFailed(\`socket directory \${dirname(SOCKET)} is not private (uid \${st.uid}, mode \${(st.mode & 0o777).toString(8)})\`);
|
|
905
|
+
}
|
|
906
|
+
} catch (err) {
|
|
907
|
+
if (SOCKET_REASON === 'tmpdir-short') bindFailed(\`cannot prepare socket directory: \${err?.message ?? err}\`);
|
|
908
|
+
/* project branch: listen() below reports the real reason if the directory truly cannot be created */
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
server.listen(SOCKET, () => {
|
|
912
|
+
if (!existsSync(SOCKET)) return bindFailed('socket file missing after listen');
|
|
913
|
+
if (SOCKET_REASON === 'tmpdir-short') {
|
|
914
|
+
// Lead edit after Codex review (finding 3): the pointer is published ATOMICALLY (tmp + rename)
|
|
915
|
+
// and BEFORE \`ready\` — a reader never sees a half-written or missing pointer after \`ready\`;
|
|
916
|
+
// a pointer that cannot be published is a bind failure, not a warning.
|
|
917
|
+
try {
|
|
918
|
+
mkdirSync(join(PROJECT, '.dz'), { recursive: true });
|
|
919
|
+
const tmp = \`\${SOCKET_POINTER}.\${process.pid}.tmp\`;
|
|
920
|
+
writeFileSync(tmp, SOCKET);
|
|
921
|
+
renameSync(tmp, SOCKET_POINTER);
|
|
922
|
+
} catch (err) {
|
|
923
|
+
return bindFailed(\`could not publish socket pointer: \${err?.message ?? err}\`);
|
|
924
|
+
}
|
|
925
|
+
}
|
|
926
|
+
log(\`ready: \${patterns.length} pattern vectors, model \${model}, socket \${SOCKET}\`);
|
|
927
|
+
touch();
|
|
816
928
|
});
|
|
929
|
+
server.on('error', (err) => bindFailed(err?.message ?? String(err)));
|
|
817
930
|
}
|
|
818
931
|
|
|
819
932
|
main().catch((err) => {
|