@simplexai/localmodels 0.1.0-dev.35 → 0.1.0-dev.37

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 (4) hide show
  1. package/package.json +1 -1
  2. package/release.json +56 -56
  3. package/stack.ps1 +80 -45
  4. package/stack.sh +11 -11
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simplexai/localmodels",
3
- "version": "0.1.0-dev.35",
3
+ "version": "0.1.0-dev.37",
4
4
  "license": "UNLICENSED",
5
5
  "files": [
6
6
  "**/*"
package/release.json CHANGED
@@ -1,83 +1,83 @@
1
1
  {
2
- "baseUrl": "https://d2ikbbcl3j6jz9.cloudfront.net/cli/localmodels/0.1.0.dev35",
2
+ "baseUrl": "https://d2ikbbcl3j6jz9.cloudfront.net/cli/localmodels/0.1.0.dev37",
3
3
  "kits": {
4
4
  "darwin-arm64": {
5
5
  "bootstrap": {
6
- "entries": 1479,
7
- "files": 1339,
8
- "inventorySha256": "77a56e7172c96b5ddef182b8f44c591fbee2866f2d0a4f1e09566ecd9d0fde1f",
6
+ "entries": 1501,
7
+ "files": 1361,
8
+ "inventorySha256": "bac945c12b3791e7991560bbfdc621897fc9c24b000b5f4519045dacae962706",
9
9
  "moduleDir": "modules",
10
10
  "python": "python/bin/python3.12"
11
11
  },
12
- "bytes": 14795716,
13
- "manifestSha256": "9db8e1b56c15040f50e7df3b8bcf4a2385f5c65bcd41f19ea020d00f7aed6254",
14
- "sha256": "330c6dde5dbee15ce9885d3ca9aeeda67dad5cbd45d4b8f2ded8b9d7e84fd8af",
15
- "sourceCommit": "a7eab155b4d6c691ab1e144c41549f1e94ae1578",
16
- "url": "https://registry.npmjs.org/@simplexai/localmodels-darwin-arm64/-/localmodels-darwin-arm64-0.1.0-dev.35.tgz"
12
+ "bytes": 14875686,
13
+ "manifestSha256": "61e02656830e49eeae9f891bfdd84ca62423dbc963f3d7ed534c9e0f0d620685",
14
+ "sha256": "6db617ba450c1d705472d784dff559665a58a8ac5abab6fe09ab3276d95eb09a",
15
+ "sourceCommit": "8faa238fd597660a29922b37b18e0d9bf511b6ba",
16
+ "url": "https://registry.npmjs.org/@simplexai/localmodels-darwin-arm64/-/localmodels-darwin-arm64-0.1.0-dev.37.tgz"
17
17
  },
18
18
  "darwin-x64": {
19
19
  "bootstrap": {
20
- "entries": 1475,
21
- "files": 1336,
22
- "inventorySha256": "a0619f9e61aacfeba59d5116ba3c99b9448c1e89fa18a95323ef505dca2ff726",
20
+ "entries": 1497,
21
+ "files": 1358,
22
+ "inventorySha256": "1f0b1659785d0625b4b75fd40417f6f014252c49fff1609526d706beb68db8ef",
23
23
  "moduleDir": "modules",
24
24
  "python": "python/bin/python3.12"
25
25
  },
26
- "bytes": 14628578,
27
- "manifestSha256": "583bc226274a4c9f726b6451f45cd06f25df34b43a63e702f4713da86bae03eb",
28
- "sha256": "004e8cd07acffaaa42ba508d7a5c78b32ce832233ec757bd50dbfaf7a0944e78",
29
- "sourceCommit": "a7eab155b4d6c691ab1e144c41549f1e94ae1578",
30
- "url": "https://registry.npmjs.org/@simplexai/localmodels-darwin-x64/-/localmodels-darwin-x64-0.1.0-dev.35.tgz"
26
+ "bytes": 14709066,
27
+ "manifestSha256": "ccf762b31a50d2b6651f9095c0b99f31cb3b689118eda576b01be1e2163cd621",
28
+ "sha256": "e9718432b2e3df4dbef2224ceb102470919fe445c54e1e8db1a8ad777afcbce7",
29
+ "sourceCommit": "8faa238fd597660a29922b37b18e0d9bf511b6ba",
30
+ "url": "https://registry.npmjs.org/@simplexai/localmodels-darwin-x64/-/localmodels-darwin-x64-0.1.0-dev.37.tgz"
31
31
  },
32
32
  "linux-arm64": {
33
33
  "bootstrap": {
34
- "entries": 4394,
35
- "files": 4210,
36
- "inventorySha256": "6eb65cebea3d00bf579e7e38e7d36a0a4a42a596e5f6facf9e1cfd2e7f8e1a73",
34
+ "entries": 4416,
35
+ "files": 4232,
36
+ "inventorySha256": "ebbf2b72380974dce23fae75a3f246663af0169a6f7165002d4238b5a0b31da3",
37
37
  "moduleDir": "modules",
38
38
  "python": "python/bin/python3.12"
39
39
  },
40
- "bytes": 17305252,
41
- "manifestSha256": "a9167b0831cdd8e8b1f974a37dbd98c995f3980362ea6cab78bde3453f74065d",
42
- "sha256": "655210198217c068e4e618d6cd338be19e5aa77511d0b58d979dce0bfa670fd8",
43
- "sourceCommit": "a7eab155b4d6c691ab1e144c41549f1e94ae1578",
44
- "url": "https://registry.npmjs.org/@simplexai/localmodels-linux-arm64/-/localmodels-linux-arm64-0.1.0-dev.35.tgz"
40
+ "bytes": 17385607,
41
+ "manifestSha256": "877f17321468f9e607156b5198a84bd16aaa1460d853ebcd08e40ab0fc0d96a5",
42
+ "sha256": "2cb813dea04723a183d6f26c4f214047dbf81fb6dd9febedc11676aba573122e",
43
+ "sourceCommit": "8faa238fd597660a29922b37b18e0d9bf511b6ba",
44
+ "url": "https://registry.npmjs.org/@simplexai/localmodels-linux-arm64/-/localmodels-linux-arm64-0.1.0-dev.37.tgz"
45
45
  },
46
46
  "linux-x64": {
47
47
  "bootstrap": {
48
- "entries": 4394,
49
- "files": 4210,
50
- "inventorySha256": "8cf1ec24bd2111935daa0723e5b5d382d0a761362ad98dc96157f97e183f5c44",
48
+ "entries": 4416,
49
+ "files": 4232,
50
+ "inventorySha256": "50664482bc02e570c3b82ac81c733685ca023737effe5354e632372d064656c8",
51
51
  "moduleDir": "modules",
52
52
  "python": "python/bin/python3.12"
53
53
  },
54
- "bytes": 20632512,
55
- "manifestSha256": "11f1cab90914ac27d6b7977d23c40bab040b429c9e18a607d237bea23ce442b5",
56
- "sha256": "802985cd55a263d3e3a400979612ba1b1cfba7370cbb946fa2a5ef60d512bc1f",
57
- "sourceCommit": "a7eab155b4d6c691ab1e144c41549f1e94ae1578",
58
- "url": "https://registry.npmjs.org/@simplexai/localmodels-linux-x64/-/localmodels-linux-x64-0.1.0-dev.35.tgz"
54
+ "bytes": 20715789,
55
+ "manifestSha256": "df7171c4d87008cb4c96db0fc7cb92d0f0b05bf9b3b51f0c9e2a1cb4a92ad75c",
56
+ "sha256": "9afd0f80b7610c6339745aa4fd9eed4efd24d6db58ae2f69a3d5f4b4b2ef781c",
57
+ "sourceCommit": "8faa238fd597660a29922b37b18e0d9bf511b6ba",
58
+ "url": "https://registry.npmjs.org/@simplexai/localmodels-linux-x64/-/localmodels-linux-x64-0.1.0-dev.37.tgz"
59
59
  },
60
60
  "win32-x64": {
61
61
  "bootstrap": {
62
- "entries": 3647,
63
- "files": 3380,
64
- "inventorySha256": "2743907d8f205f0b45fc6886d918adc7fc5e79a822177dc60cab8991b97ce647",
62
+ "entries": 3669,
63
+ "files": 3402,
64
+ "inventorySha256": "be9a1012650a89a6ee8882eeebf53c9f8782816271e84177da9020e87dae4592",
65
65
  "moduleDir": "modules",
66
66
  "python": "python/python.exe"
67
67
  },
68
- "bytes": 23034149,
69
- "manifestSha256": "f5c676b2f17d2dff14b885f5e009a866599ca6b16460d9fc5f40d3174fd25b63",
70
- "sha256": "c4ce105f6cb05f94cac573392ad8ade1cd9a25706219c3f1778bc99777d9b179",
71
- "sourceCommit": "a7eab155b4d6c691ab1e144c41549f1e94ae1578",
72
- "url": "https://registry.npmjs.org/@simplexai/localmodels-win32-x64/-/localmodels-win32-x64-0.1.0-dev.35.tgz"
68
+ "bytes": 23115104,
69
+ "manifestSha256": "f44da996f1af181026249c5766c5ae36ec9b768c404a9c5e1103600bed779a63",
70
+ "sha256": "2fb0e50f288d66ae9543f4f27e4628fced94e64f65d4b2f8add8f20cd8dd9a94",
71
+ "sourceCommit": "8faa238fd597660a29922b37b18e0d9bf511b6ba",
72
+ "url": "https://registry.npmjs.org/@simplexai/localmodels-win32-x64/-/localmodels-win32-x64-0.1.0-dev.37.tgz"
73
73
  }
74
74
  },
75
75
  "launchers": {
76
76
  "stack.ps1": {
77
- "bytes": 30668,
77
+ "bytes": 32584,
78
78
  "schema": "localmodels.kit-location/v1",
79
- "sha256": "b3f30c9b424dd3b047c969aa24ee1aa42b10c3ddce07390faaea5dafb6ac9c34",
80
- "sourceCommit": "a7eab155b4d6c691ab1e144c41549f1e94ae1578",
79
+ "sha256": "4a93ec650650e3a73bf56433c3483316782d640d98b998fafa13a50af51ac8e0",
80
+ "sourceCommit": "8faa238fd597660a29922b37b18e0d9bf511b6ba",
81
81
  "targets": [
82
82
  "darwin-arm64",
83
83
  "darwin-x64",
@@ -85,31 +85,31 @@
85
85
  "linux-x64",
86
86
  "win32-x64"
87
87
  ],
88
- "url": "https://cdn.jsdelivr.net/npm/@simplexai/localmodels@0.1.0-dev.35/stack.ps1",
89
- "version": "0.1.0.dev35"
88
+ "url": "https://cdn.jsdelivr.net/npm/@simplexai/localmodels@0.1.0-dev.37/stack.ps1",
89
+ "version": "0.1.0.dev37"
90
90
  },
91
91
  "stack.sh": {
92
92
  "bytes": 15225,
93
93
  "schema": "localmodels.kit-location/v1",
94
- "sha256": "9e92274d76b665bc2cf571cf06d1586a450d23fec9a970cb6cb01ef5b2f805b8",
95
- "sourceCommit": "a7eab155b4d6c691ab1e144c41549f1e94ae1578",
94
+ "sha256": "dbc3b8437ae039dbd77afdd08dfad0638014123588b61556aa33653723a18138",
95
+ "sourceCommit": "8faa238fd597660a29922b37b18e0d9bf511b6ba",
96
96
  "targets": [
97
97
  "darwin-arm64",
98
98
  "darwin-x64",
99
99
  "linux-arm64",
100
100
  "linux-x64"
101
101
  ],
102
- "url": "https://cdn.jsdelivr.net/npm/@simplexai/localmodels@0.1.0-dev.35/stack.sh",
103
- "version": "0.1.0.dev35"
102
+ "url": "https://cdn.jsdelivr.net/npm/@simplexai/localmodels@0.1.0-dev.37/stack.sh",
103
+ "version": "0.1.0.dev37"
104
104
  }
105
105
  },
106
- "npmVersion": "0.1.0-dev.35",
106
+ "npmVersion": "0.1.0-dev.37",
107
107
  "schemaVersion": 1,
108
- "sourceCommit": "a7eab155b4d6c691ab1e144c41549f1e94ae1578",
109
- "version": "0.1.0.dev35",
108
+ "sourceCommit": "8faa238fd597660a29922b37b18e0d9bf511b6ba",
109
+ "version": "0.1.0.dev37",
110
110
  "wheel": {
111
- "bytes": 1487156,
112
- "file": "simplex_localmodels-0.1.0.dev35-py3-none-any.whl",
113
- "sha256": "e56a655f4fbc3665f9b02f8fec8e6ab5a00b5aa976ea60c1797d77d68db1ea6b"
111
+ "bytes": 1579635,
112
+ "file": "simplex_localmodels-0.1.0.dev37-py3-none-any.whl",
113
+ "sha256": "e2b93fb1b4bdea764595883ce4c17f4bdd5533b7f452ff8d593b0ee658130262"
114
114
  }
115
115
  }
package/stack.ps1 CHANGED
@@ -3,59 +3,59 @@ $ErrorActionPreference = 'Stop'
3
3
  $ProgressPreference = 'SilentlyContinue'
4
4
 
5
5
  # >>> release pin
6
- $StackVersion = '0.1.0.dev35'
7
- $StackSourceCommit = 'a7eab155b4d6c691ab1e144c41549f1e94ae1578'
8
- $StackNpmVersion = '0.1.0-dev.35'
6
+ $StackVersion = '0.1.0.dev37'
7
+ $StackSourceCommit = '8faa238fd597660a29922b37b18e0d9bf511b6ba'
8
+ $StackNpmVersion = '0.1.0-dev.37'
9
9
  $StackKits = @{
10
- 'darwin-arm64' = '330c6dde5dbee15ce9885d3ca9aeeda67dad5cbd45d4b8f2ded8b9d7e84fd8af'
11
- 'darwin-x64' = '004e8cd07acffaaa42ba508d7a5c78b32ce832233ec757bd50dbfaf7a0944e78'
12
- 'linux-arm64' = '655210198217c068e4e618d6cd338be19e5aa77511d0b58d979dce0bfa670fd8'
13
- 'linux-x64' = '802985cd55a263d3e3a400979612ba1b1cfba7370cbb946fa2a5ef60d512bc1f'
14
- 'win32-x64' = 'c4ce105f6cb05f94cac573392ad8ade1cd9a25706219c3f1778bc99777d9b179'
10
+ 'darwin-arm64' = '6db617ba450c1d705472d784dff559665a58a8ac5abab6fe09ab3276d95eb09a'
11
+ 'darwin-x64' = 'e9718432b2e3df4dbef2224ceb102470919fe445c54e1e8db1a8ad777afcbce7'
12
+ 'linux-arm64' = '2cb813dea04723a183d6f26c4f214047dbf81fb6dd9febedc11676aba573122e'
13
+ 'linux-x64' = '9afd0f80b7610c6339745aa4fd9eed4efd24d6db58ae2f69a3d5f4b4b2ef781c'
14
+ 'win32-x64' = '2fb0e50f288d66ae9543f4f27e4628fced94e64f65d4b2f8add8f20cd8dd9a94'
15
15
  }
16
16
  $StackBootstrap = @{
17
17
  'darwin-arm64' = @{
18
- manifest = '9db8e1b56c15040f50e7df3b8bcf4a2385f5c65bcd41f19ea020d00f7aed6254'
19
- inventory = '77a56e7172c96b5ddef182b8f44c591fbee2866f2d0a4f1e09566ecd9d0fde1f'
20
- bytes = '14795716'
21
- files = '1339'
22
- entries = '1479'
18
+ manifest = '61e02656830e49eeae9f891bfdd84ca62423dbc963f3d7ed534c9e0f0d620685'
19
+ inventory = 'bac945c12b3791e7991560bbfdc621897fc9c24b000b5f4519045dacae962706'
20
+ bytes = '14875686'
21
+ files = '1361'
22
+ entries = '1501'
23
23
  python = 'python/bin/python3.12'
24
24
  modules = 'modules'
25
25
  }
26
26
  'darwin-x64' = @{
27
- manifest = '583bc226274a4c9f726b6451f45cd06f25df34b43a63e702f4713da86bae03eb'
28
- inventory = 'a0619f9e61aacfeba59d5116ba3c99b9448c1e89fa18a95323ef505dca2ff726'
29
- bytes = '14628578'
30
- files = '1336'
31
- entries = '1475'
27
+ manifest = 'ccf762b31a50d2b6651f9095c0b99f31cb3b689118eda576b01be1e2163cd621'
28
+ inventory = '1f0b1659785d0625b4b75fd40417f6f014252c49fff1609526d706beb68db8ef'
29
+ bytes = '14709066'
30
+ files = '1358'
31
+ entries = '1497'
32
32
  python = 'python/bin/python3.12'
33
33
  modules = 'modules'
34
34
  }
35
35
  'linux-arm64' = @{
36
- manifest = 'a9167b0831cdd8e8b1f974a37dbd98c995f3980362ea6cab78bde3453f74065d'
37
- inventory = '6eb65cebea3d00bf579e7e38e7d36a0a4a42a596e5f6facf9e1cfd2e7f8e1a73'
38
- bytes = '17305252'
39
- files = '4210'
40
- entries = '4394'
36
+ manifest = '877f17321468f9e607156b5198a84bd16aaa1460d853ebcd08e40ab0fc0d96a5'
37
+ inventory = 'ebbf2b72380974dce23fae75a3f246663af0169a6f7165002d4238b5a0b31da3'
38
+ bytes = '17385607'
39
+ files = '4232'
40
+ entries = '4416'
41
41
  python = 'python/bin/python3.12'
42
42
  modules = 'modules'
43
43
  }
44
44
  'linux-x64' = @{
45
- manifest = '11f1cab90914ac27d6b7977d23c40bab040b429c9e18a607d237bea23ce442b5'
46
- inventory = '8cf1ec24bd2111935daa0723e5b5d382d0a761362ad98dc96157f97e183f5c44'
47
- bytes = '20632512'
48
- files = '4210'
49
- entries = '4394'
45
+ manifest = 'df7171c4d87008cb4c96db0fc7cb92d0f0b05bf9b3b51f0c9e2a1cb4a92ad75c'
46
+ inventory = '50664482bc02e570c3b82ac81c733685ca023737effe5354e632372d064656c8'
47
+ bytes = '20715789'
48
+ files = '4232'
49
+ entries = '4416'
50
50
  python = 'python/bin/python3.12'
51
51
  modules = 'modules'
52
52
  }
53
53
  'win32-x64' = @{
54
- manifest = 'f5c676b2f17d2dff14b885f5e009a866599ca6b16460d9fc5f40d3174fd25b63'
55
- inventory = '2743907d8f205f0b45fc6886d918adc7fc5e79a822177dc60cab8991b97ce647'
56
- bytes = '23034149'
57
- files = '3380'
58
- entries = '3647'
54
+ manifest = 'f44da996f1af181026249c5766c5ae36ec9b768c404a9c5e1103600bed779a63'
55
+ inventory = 'be9a1012650a89a6ee8882eeebf53c9f8782816271e84177da9020e87dae4592'
56
+ bytes = '23115104'
57
+ files = '3402'
58
+ entries = '3669'
59
59
  python = 'python/python.exe'
60
60
  modules = 'modules'
61
61
  }
@@ -108,18 +108,16 @@ function Assert-Item([string]$Path, [bool]$Directory) {
108
108
  }
109
109
  return $item
110
110
  }
111
- function Assert-WindowsPrivate([string]$Path, [bool]$Repair, [bool]$AllowInherited = $false) {
112
- $item = Get-Item -LiteralPath $Path -Force
111
+ function Assert-WindowsParents([string]$Path) {
113
112
  $sid = [Security.Principal.WindowsIdentity]::GetCurrent().User
114
113
  $system = [Security.Principal.SecurityIdentifier]::new('S-1-5-18')
115
114
  $admins = 'S-1-5-32-544'
116
115
  $trustedInstaller = 'S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464'
117
- if ($item.Attributes -band [IO.FileAttributes]::ReparsePoint) { Stop-Stack 'linked private path' }
118
- $acl = Get-Acl -LiteralPath $Path
119
- $owner = $acl.GetOwner([Security.Principal.SecurityIdentifier]).Value
120
- if ($owner -ne $sid.Value -and -not ($Repair -and $owner -eq $admins)) { Stop-Stack 'foreign kit owner' }
121
- $parent = if (($item -is [IO.DirectoryInfo])) { $item.Parent } else { $item.Directory }
116
+ $parent = [IO.Directory]::GetParent([IO.Path]::GetFullPath($Path))
122
117
  while ($parent) {
118
+ if (-not (Test-Path -LiteralPath $parent.FullName)) { $parent = $parent.Parent; continue }
119
+ $parent = Get-Item -LiteralPath $parent.FullName -Force
120
+ if ($parent -isnot [IO.DirectoryInfo]) { Stop-Stack 'unsafe private parent path' }
123
121
  if ($parent.Attributes -band [IO.FileAttributes]::ReparsePoint) { Stop-Stack 'linked private parent' }
124
122
  $parentAcl = Get-Acl -LiteralPath $parent.FullName
125
123
  if ($parentAcl.GetOwner([Security.Principal.SecurityIdentifier]).Value -notin @($sid.Value, $system.Value, $admins, $trustedInstaller)) {
@@ -134,6 +132,41 @@ function Assert-WindowsPrivate([string]$Path, [bool]$Repair, [bool]$AllowInherit
134
132
  }
135
133
  $parent = $parent.Parent
136
134
  }
135
+ }
136
+ function Get-KitRoot([bool]$Windows, [string]$CacheBase) {
137
+ if ($env:LOCALMODELS_KIT_HOME) { return [IO.Path]::GetFullPath($env:LOCALMODELS_KIT_HOME) }
138
+ $preferred = [IO.Path]::GetFullPath((Join-Path $CacheBase 'simplex-localmodels/kits'))
139
+ if ($Windows) {
140
+ try { Assert-WindowsParents $preferred } catch {
141
+ if (-not $_.Exception.Data['StackError'] -or $_.Exception.Message -notin @(
142
+ 'unsafe private parent permissions', 'foreign private parent',
143
+ 'linked private parent', 'unsafe private parent path'
144
+ )) { throw }
145
+ if (-not $env:USERPROFILE -or -not [IO.Path]::IsPathRooted($env:USERPROFILE)) { throw }
146
+ # AppData can grant app capabilities broad rights; verify a separate cache instead.
147
+ $preferred = [IO.Path]::GetFullPath((Join-Path $env:USERPROFILE '.cache/simplex-localmodels/kits'))
148
+ Assert-WindowsParents $preferred
149
+ }
150
+ }
151
+ return $preferred
152
+ }
153
+ function Get-WindowsAcl([IO.FileSystemInfo]$Item) {
154
+ $sections = [Security.AccessControl.AccessControlSections]'Owner,Access'
155
+ if ($PSVersionTable.PSEdition -eq 'Core') {
156
+ return [IO.FileSystemAclExtensions]::GetAccessControl($Item, $sections)
157
+ }
158
+ return $Item.GetAccessControl($sections)
159
+ }
160
+ function Assert-WindowsPrivate([string]$Path, [bool]$Repair, [bool]$AllowInherited = $false, [bool]$PrivateTree = $false) {
161
+ $item = Get-Item -LiteralPath $Path -Force
162
+ $sid = [Security.Principal.WindowsIdentity]::GetCurrent().User
163
+ $system = [Security.Principal.SecurityIdentifier]::new('S-1-5-18')
164
+ $admins = 'S-1-5-32-544'
165
+ if ($item.Attributes -band [IO.FileAttributes]::ReparsePoint) { Stop-Stack 'linked private path' }
166
+ $acl = Get-WindowsAcl $item
167
+ $owner = $acl.GetOwner([Security.Principal.SecurityIdentifier]).Value
168
+ if ($owner -ne $sid.Value -and -not ($Repair -and $owner -eq $admins)) { Stop-Stack 'foreign kit owner' }
169
+ if (-not $PrivateTree) { Assert-WindowsParents $Path }
137
170
  if ($Repair) {
138
171
  $acl = if (($item -is [IO.DirectoryInfo])) { [Security.AccessControl.DirectorySecurity]::new() } else { [Security.AccessControl.FileSecurity]::new() }
139
172
  $acl.SetOwner($sid)
@@ -145,7 +178,7 @@ function Assert-WindowsPrivate([string]$Path, [bool]$Repair, [bool]$AllowInherit
145
178
  $acl.AddAccessRule($rule)
146
179
  }
147
180
  if ($PSVersionTable.PSEdition -eq 'Core') { [IO.FileSystemAclExtensions]::SetAccessControl($item, $acl) } else { $item.SetAccessControl($acl) }
148
- $acl = Get-Acl -LiteralPath $Path
181
+ $acl = Get-WindowsAcl $item
149
182
  }
150
183
  if (($item -is [IO.DirectoryInfo]) -and -not $AllowInherited -and -not $acl.AreAccessRulesProtected) { Stop-Stack 'inherited private permissions' }
151
184
  $allowed = $false
@@ -200,10 +233,12 @@ function Assert-Kit([string]$Directory) {
200
233
  $tree = @(Get-KitTree $Directory)
201
234
  $payload = @($tree | Where-Object { $_ -isnot [IO.DirectoryInfo] })
202
235
  if ($tree.Count -ne [int]$pin.entries -or $payload.Count -ne [int]$pin.files) { Stop-Stack 'kit tree mismatch' }
236
+ if ($onWindows) { Assert-WindowsParents $Directory }
203
237
  foreach ($item in $tree) {
204
238
  if ($item.Attributes -band [IO.FileAttributes]::ReparsePoint) { Stop-Stack 'linked kit path' }
205
239
  if ($onWindows) {
206
- Assert-WindowsPrivate $item.FullName $false
240
+ # The tree walk checks every private ancestor once, before its descendants.
241
+ Assert-WindowsPrivate $item.FullName $false $false $true
207
242
  } else {
208
243
  $modes = if (($item -is [IO.DirectoryInfo])) { @('500') } else { @('400', '500') }
209
244
  Assert-PosixMode $item.FullName $modes
@@ -252,10 +287,11 @@ function Assert-Kit([string]$Directory) {
252
287
  }
253
288
  function Set-KitMode([string]$Directory) {
254
289
  $tree = @(Get-KitTree $Directory)
290
+ if ($onWindows) { Assert-WindowsParents $Directory }
255
291
  foreach ($item in $tree) {
256
292
  if ($item.Attributes -band [IO.FileAttributes]::ReparsePoint) { Stop-Stack 'linked kit path' }
257
293
  if ($onWindows) {
258
- Assert-WindowsPrivate $item.FullName $true
294
+ Assert-WindowsPrivate $item.FullName $true $false $true
259
295
  if (-not ($item -is [IO.DirectoryInfo])) { $item.IsReadOnly = $true }
260
296
  } else {
261
297
  $mode = if (($item -is [IO.DirectoryInfo])) { '500' } else { 'a-w,go-rwx' }
@@ -563,8 +599,7 @@ try {
563
599
  }
564
600
  if (-not $target -or -not $StackKits.ContainsKey($target)) { Stop-Stack 'release has no kit for this platform' }
565
601
  $kit = $StackKits[$target]; $pin = $StackBootstrap[$target]
566
- $root = if ($env:LOCALMODELS_KIT_HOME) { $env:LOCALMODELS_KIT_HOME } else { Join-Path $cacheBase 'simplex-localmodels/kits' }
567
- $root = [IO.Path]::GetFullPath($root)
602
+ $root = Get-KitRoot $onWindows $cacheBase
568
603
  $final = Join-Path $root $kit
569
604
  if ($cleanup) { Remove-OperationStage; exit 0 }
570
605
  $valid = $false
package/stack.sh CHANGED
@@ -2,13 +2,13 @@
2
2
  set -eu
3
3
 
4
4
  # >>> release pin
5
- STACK_VERSION='0.1.0.dev35'
6
- STACK_SOURCE_COMMIT='a7eab155b4d6c691ab1e144c41549f1e94ae1578'
7
- STACK_NPM_VERSION='0.1.0-dev.35'
8
- STACK_KIT_darwin_arm64='330c6dde5dbee15ce9885d3ca9aeeda67dad5cbd45d4b8f2ded8b9d7e84fd8af'
9
- STACK_KIT_darwin_x64='004e8cd07acffaaa42ba508d7a5c78b32ce832233ec757bd50dbfaf7a0944e78'
10
- STACK_KIT_linux_arm64='655210198217c068e4e618d6cd338be19e5aa77511d0b58d979dce0bfa670fd8'
11
- STACK_KIT_linux_x64='802985cd55a263d3e3a400979612ba1b1cfba7370cbb946fa2a5ef60d512bc1f'
5
+ STACK_VERSION='0.1.0.dev37'
6
+ STACK_SOURCE_COMMIT='8faa238fd597660a29922b37b18e0d9bf511b6ba'
7
+ STACK_NPM_VERSION='0.1.0-dev.37'
8
+ STACK_KIT_darwin_arm64='6db617ba450c1d705472d784dff559665a58a8ac5abab6fe09ab3276d95eb09a'
9
+ STACK_KIT_darwin_x64='e9718432b2e3df4dbef2224ceb102470919fe445c54e1e8db1a8ad777afcbce7'
10
+ STACK_KIT_linux_arm64='2cb813dea04723a183d6f26c4f214047dbf81fb6dd9febedc11676aba573122e'
11
+ STACK_KIT_linux_x64='9afd0f80b7610c6339745aa4fd9eed4efd24d6db58ae2f69a3d5f4b4b2ef781c'
12
12
  # <<< release pin
13
13
 
14
14
  die() {
@@ -46,10 +46,10 @@ esac
46
46
  manifest='' inventory='' bytes='' files='' entries='' python='' modules=''
47
47
  # >>> bootstrap targets
48
48
  case "$target" in
49
- darwin-arm64) manifest='9db8e1b56c15040f50e7df3b8bcf4a2385f5c65bcd41f19ea020d00f7aed6254'; inventory='77a56e7172c96b5ddef182b8f44c591fbee2866f2d0a4f1e09566ecd9d0fde1f'; bytes='14795716'; files='1339'; entries='1479'; python='python/bin/python3.12'; modules='modules' ;;
50
- darwin-x64) manifest='583bc226274a4c9f726b6451f45cd06f25df34b43a63e702f4713da86bae03eb'; inventory='a0619f9e61aacfeba59d5116ba3c99b9448c1e89fa18a95323ef505dca2ff726'; bytes='14628578'; files='1336'; entries='1475'; python='python/bin/python3.12'; modules='modules' ;;
51
- linux-arm64) manifest='a9167b0831cdd8e8b1f974a37dbd98c995f3980362ea6cab78bde3453f74065d'; inventory='6eb65cebea3d00bf579e7e38e7d36a0a4a42a596e5f6facf9e1cfd2e7f8e1a73'; bytes='17305252'; files='4210'; entries='4394'; python='python/bin/python3.12'; modules='modules' ;;
52
- linux-x64) manifest='11f1cab90914ac27d6b7977d23c40bab040b429c9e18a607d237bea23ce442b5'; inventory='8cf1ec24bd2111935daa0723e5b5d382d0a761362ad98dc96157f97e183f5c44'; bytes='20632512'; files='4210'; entries='4394'; python='python/bin/python3.12'; modules='modules' ;;
49
+ darwin-arm64) manifest='61e02656830e49eeae9f891bfdd84ca62423dbc963f3d7ed534c9e0f0d620685'; inventory='bac945c12b3791e7991560bbfdc621897fc9c24b000b5f4519045dacae962706'; bytes='14875686'; files='1361'; entries='1501'; python='python/bin/python3.12'; modules='modules' ;;
50
+ darwin-x64) manifest='ccf762b31a50d2b6651f9095c0b99f31cb3b689118eda576b01be1e2163cd621'; inventory='1f0b1659785d0625b4b75fd40417f6f014252c49fff1609526d706beb68db8ef'; bytes='14709066'; files='1358'; entries='1497'; python='python/bin/python3.12'; modules='modules' ;;
51
+ linux-arm64) manifest='877f17321468f9e607156b5198a84bd16aaa1460d853ebcd08e40ab0fc0d96a5'; inventory='ebbf2b72380974dce23fae75a3f246663af0169a6f7165002d4238b5a0b31da3'; bytes='17385607'; files='4232'; entries='4416'; python='python/bin/python3.12'; modules='modules' ;;
52
+ linux-x64) manifest='df7171c4d87008cb4c96db0fc7cb92d0f0b05bf9b3b51f0c9e2a1cb4a92ad75c'; inventory='50664482bc02e570c3b82ac81c733685ca023737effe5354e632372d064656c8'; bytes='20715789'; files='4232'; entries='4416'; python='python/bin/python3.12'; modules='modules' ;;
53
53
  *) die 'release lacks bootstrap pins' ;;
54
54
  esac
55
55
  # <<< bootstrap targets